当前位置: 首页>>代码示例>>Java>>正文


Java RichTextArea.getExtendedFormatter方法代码示例

本文整理汇总了Java中com.google.gwt.user.client.ui.RichTextArea.getExtendedFormatter方法的典型用法代码示例。如果您正苦于以下问题:Java RichTextArea.getExtendedFormatter方法的具体用法?Java RichTextArea.getExtendedFormatter怎么用?Java RichTextArea.getExtendedFormatter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.google.gwt.user.client.ui.RichTextArea的用法示例。


在下文中一共展示了RichTextArea.getExtendedFormatter方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: RichTextToolbar

import com.google.gwt.user.client.ui.RichTextArea; //导入方法依赖的package包/类
/**
 * Creates a new toolbar that drives the given rich text area.
 * 
 * @param richText the rich text area to be controlled
 */
public RichTextToolbar(RichTextArea richText) {
  this.richText = richText;
  this.basic = richText.getBasicFormatter();
  this.extended = richText.getExtendedFormatter();

  outer.add(topPanel);
  outer.add(bottomPanel);
  topPanel.setWidth("100%");
  bottomPanel.setWidth("100%");

  initWidget(outer);
  setStyleName("gwt-RichTextToolbar");
  richText.addStyleName("hasRichTextToolbar");

  if (basic != null) {
    topPanel.add(bold = createToggleButton(images.bold(), strings.bold()));
    topPanel.add(italic = createToggleButton(images.italic(), strings.italic()));
    topPanel.add(underline = createToggleButton(images.underline(),
        strings.underline()));
    topPanel.add(subscript = createToggleButton(images.subscript(),
        strings.subscript()));
    topPanel.add(superscript = createToggleButton(images.superscript(),
        strings.superscript()));
    topPanel.add(justifyLeft = createPushButton(images.justifyLeft(),
        strings.justifyLeft()));
    topPanel.add(justifyCenter = createPushButton(images.justifyCenter(),
        strings.justifyCenter()));
    topPanel.add(justifyRight = createPushButton(images.justifyRight(),
        strings.justifyRight()));
  }

  if (extended != null) {
    topPanel.add(strikethrough = createToggleButton(images.strikeThrough(),
        strings.strikeThrough()));
    topPanel.add(indent = createPushButton(images.indent(), strings.indent()));
    topPanel.add(outdent = createPushButton(images.outdent(), strings.outdent()));
    topPanel.add(hr = createPushButton(images.hr(), strings.hr()));
    topPanel.add(ol = createPushButton(images.ol(), strings.ol()));
    topPanel.add(ul = createPushButton(images.ul(), strings.ul()));
    topPanel.add(insertImage = createPushButton(images.insertImage(),
        strings.insertImage()));
    topPanel.add(createLink = createPushButton(images.createLink(),
        strings.createLink()));
    topPanel.add(removeLink = createPushButton(images.removeLink(),
        strings.removeLink()));
    topPanel.add(removeFormat = createPushButton(images.removeFormat(),
        strings.removeFormat()));
  }

  if (basic != null) {
    bottomPanel.add(backColors = createColorList("Background"));
    bottomPanel.add(foreColors = createColorList("Foreground"));
    bottomPanel.add(fonts = createFontList());
    bottomPanel.add(fontSizes = createFontSizes());

    // We only use these listeners for updating status, so don't hook them up
    // unless at least basic editing is supported.
    richText.addKeyboardListener(listener);
    richText.addClickListener(listener);
  }
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:67,代码来源:RichTextToolbar.java

示例2: RichTextToolbar

import com.google.gwt.user.client.ui.RichTextArea; //导入方法依赖的package包/类
/**
 * Creates a new toolbar that drives the given rich text area.
 *
 * @param richText the rich text area to be controlled
 */
public RichTextToolbar(RichTextArea richText) {
  this.richText = richText;
  this.basic = richText.getBasicFormatter();
  this.extended = richText.getExtendedFormatter();

  outer.add(topPanel);
  outer.add(bottomPanel);
  topPanel.setWidth("100%");
  bottomPanel.setWidth("100%");

  initWidget(outer);
  setStyleName("gwt-RichTextToolbar");
  richText.addStyleName("hasRichTextToolbar");

  if (basic != null) {
    topPanel.add(bold = createToggleButton(images.bold(), strings.bold()));
    topPanel.add(italic = createToggleButton(images.italic(),
        strings.italic()));
    topPanel.add(underline = createToggleButton(images.underline(),
        strings.underline()));
    topPanel.add(subscript = createToggleButton(images.subscript(),
        strings.subscript()));
    topPanel.add(superscript = createToggleButton(images.superscript(),
        strings.superscript()));
    topPanel.add(justifyLeft = createPushButton(images.justifyLeft(),
        strings.justifyLeft()));
    topPanel.add(justifyCenter = createPushButton(images.justifyCenter(),
        strings.justifyCenter()));
    topPanel.add(justifyRight = createPushButton(images.justifyRight(),
        strings.justifyRight()));
  }

  if (extended != null) {
    topPanel.add(strikethrough = createToggleButton(images.strikeThrough(),
        strings.strikeThrough()));
    topPanel.add(indent = createPushButton(images.indent(), strings.indent()));
    topPanel.add(outdent = createPushButton(images.outdent(),
        strings.outdent()));
    topPanel.add(hr = createPushButton(images.hr(), strings.hr()));
    topPanel.add(ol = createPushButton(images.ol(), strings.ol()));
    topPanel.add(ul = createPushButton(images.ul(), strings.ul()));
    topPanel.add(insertImage = createPushButton(images.insertImage(),
        strings.insertImage()));
    topPanel.add(createLink = createPushButton(images.createLink(),
        strings.createLink()));
    topPanel.add(removeLink = createPushButton(images.removeLink(),
        strings.removeLink()));
    topPanel.add(removeFormat = createPushButton(images.removeFormat(),
        strings.removeFormat()));
  }

  if (basic != null) {
    bottomPanel.add(backColors = createColorList("Background"));
    bottomPanel.add(foreColors = createColorList("Foreground"));
    bottomPanel.add(fonts = createFontList());
    bottomPanel.add(fontSizes = createFontSizes());

    // We only use these handlers for updating status, so don't hook them up
    // unless at least basic editing is supported.
    richText.addKeyUpHandler(handler);
    richText.addClickHandler(handler);
  }
}
 
开发者ID:qafedev,项目名称:qafe-platform,代码行数:69,代码来源:RichTextToolbar.java

示例3: RichTextToolbar

import com.google.gwt.user.client.ui.RichTextArea; //导入方法依赖的package包/类
/**
 * Creates a new toolbar that drives the given rich text area.
 * 
 * @param richText
 *            the rich text area to be controlled
 */
public RichTextToolbar(RichTextArea richText) {
    this.richText = richText;
    this.basic = richText.getBasicFormatter();
    this.extended = richText.getExtendedFormatter();

    outer.add(topPanel);
    outer.add(bottomPanel);
    topPanel.setWidth("100%");
    bottomPanel.setWidth("100%");

    initWidget(outer);
    setStyleName("gwt-RichTextToolbar");
    richText.addStyleName("hasRichTextToolbar");

    if (basic != null) {
        topPanel.add(bold = createToggleButton(images.bold(), strings.bold()));
        topPanel.add(italic = createToggleButton(images.italic(), strings.italic()));
        topPanel.add(underline = createToggleButton(images.underline(), strings.underline()));
        topPanel.add(subscript = createToggleButton(images.subscript(), strings.subscript()));
        topPanel
            .add(superscript = createToggleButton(images.superscript(), strings.superscript()));
        topPanel
            .add(justifyLeft = createPushButton(images.justifyLeft(), strings.justifyLeft()));
        topPanel.add(
            justifyCenter = createPushButton(images.justifyCenter(), strings.justifyCenter()));
        topPanel.add(
            justifyRight = createPushButton(images.justifyRight(), strings.justifyRight()));
    }

    if (extended != null) {
        topPanel.add(
            strikethrough = createToggleButton(
                images.strikeThrough(),
                strings.strikeThrough()));
        topPanel.add(indent = createPushButton(images.indent(), strings.indent()));
        topPanel.add(outdent = createPushButton(images.outdent(), strings.outdent()));
        topPanel.add(hr = createPushButton(images.hr(), strings.hr()));
        topPanel.add(ol = createPushButton(images.ol(), strings.ol()));
        topPanel.add(ul = createPushButton(images.ul(), strings.ul()));
        topPanel
            .add(insertImage = createPushButton(images.insertImage(), strings.insertImage()));
        topPanel.add(createLink = createPushButton(images.createLink(), strings.createLink()));
        topPanel.add(removeLink = createPushButton(images.removeLink(), strings.removeLink()));
        topPanel.add(
            removeFormat = createPushButton(images.removeFormat(), strings.removeFormat()));
    }

    if (basic != null) {
        bottomPanel.add(backColors = createColorList("Background"));
        bottomPanel.add(foreColors = createColorList("Foreground"));
        bottomPanel.add(fonts = createFontList());
        bottomPanel.add(fontSizes = createFontSizes());

        // We only use these handlers for updating status, so don't hook
        // them up
        // unless at least basic editing is supported.
        richText.addKeyUpHandler(handler);
        richText.addClickHandler(handler);
    }
}
 
开发者ID:inepex,项目名称:ineform,代码行数:67,代码来源:RichTextToolbar.java

示例4: RichTextToolbar

import com.google.gwt.user.client.ui.RichTextArea; //导入方法依赖的package包/类
/**
 * Creates a new toolbar that drives the given rich text area.
 * 
 * @param richText
 *            the rich text area to be controlled
 */
public RichTextToolbar(RichTextArea richText) {
	this.richText = richText;
	this.basic = richText.getBasicFormatter();
	this.extended = richText.getExtendedFormatter();

	outer.add(topPanel);
	outer.add(bottomPanel);
	topPanel.setWidth("100%");
	bottomPanel.setWidth("100%");

	initWidget(outer);
	setStyleName("gwt-RichTextToolbar");
	richText.addStyleName("hasRichTextToolbar");

	if (basic != null) {
		topPanel.add(bold = createToggleButton(images.bold(),
				strings.bold()));
		topPanel.add(italic = createToggleButton(images.italic(),
				strings.italic()));
		topPanel.add(underline = createToggleButton(images.underline(),
				strings.underline()));
		topPanel.add(subscript = createToggleButton(images.subscript(),
				strings.subscript()));
		topPanel.add(superscript = createToggleButton(images.superscript(),
				strings.superscript()));
		topPanel.add(justifyLeft = createPushButton(images.justifyLeft(),
				strings.justifyLeft()));
		topPanel.add(justifyCenter = createPushButton(
				images.justifyCenter(), strings.justifyCenter()));
		topPanel.add(justifyRight = createPushButton(images.justifyRight(),
				strings.justifyRight()));
	}

	if (extended != null) {
		topPanel.add(strikethrough = createToggleButton(
				images.strikeThrough(), strings.strikeThrough()));
		topPanel.add(indent = createPushButton(images.indent(), strings.indent()));
		topPanel.add(outdent = createPushButton(images.outdent(), strings.outdent()));
		topPanel.add(hr = createPushButton(images.hr(), strings.hr()));
		topPanel.add(ol = createPushButton(images.ol(), strings.ol()));
		topPanel.add(ul = createPushButton(images.ul(), strings.ul()));
		topPanel.add(insertImage = createPushButton(images.insertImage(), strings.insertImage()));
		topPanel.add(createLink = createPushButton(images.createLink(), strings.createLink()));
		topPanel.add(removeLink = createPushButton(images.removeLink(), strings.removeLink()));
		topPanel.add(removeFormat = createPushButton(images.removeFormat(),	strings.removeFormat()));
	}

	if (basic != null) {
		bottomPanel.add(fonts = createFontList());
		bottomPanel.add(fontSizes = createFontSizes());
		
		// bottomPanel.add(foreColors = createColorList("Foreground"));
		bottomPanel.add(foreColors);
		foreColors.addValueChangeHandler(handler);
		foreColors.setText(TEXT_FOREGROUND);
		foreColors.addStyleName("rdn-TextBoxShort");
		
		// bottomPanel.add(backColors = createColorList("Background"));
		bottomPanel.add(backColors);
		backColors.addValueChangeHandler(handler);
		backColors.setText(TEXT_BACKGROUND);
		backColors.addStyleName("rdn-TextBoxShort");

		// We only use these handlers for updating status, so don't hook
		// them up unless at least basic editing is supported.
		richText.addKeyUpHandler(handler);
		richText.addClickHandler(handler);
	}
}
 
开发者ID:Rise-Vision,项目名称:rva,代码行数:76,代码来源:RichTextToolbar.java

示例5: RichTextToolbar

import com.google.gwt.user.client.ui.RichTextArea; //导入方法依赖的package包/类
/**
 * Creates a new toolbar that drives the given rich text area.
 * 
 * @param richText
 *            the rich text area to be controlled
 */
public RichTextToolbar(RichTextArea richText) {
	this.richText = richText;
	this.basic = richText.getBasicFormatter();
	this.extended = richText.getExtendedFormatter();

	outer.add(topPanel);
	outer.add(bottomPanel);
	topPanel.setWidth("100%");
	bottomPanel.setWidth("100%");

	initWidget(outer);
	setStyleName("gwt-RichTextToolbar");
	richText.addStyleName("hasRichTextToolbar");

	if (basic != null) {
		topPanel.add(bold = createToggleButton(images.bold(), strings.bold()));
		topPanel.add(italic = createToggleButton(images.italic(), strings.italic()));
		topPanel.add(underline = createToggleButton(images.underline(), strings.underline()));
		topPanel.add(subscript = createToggleButton(images.subscript(), strings.subscript()));
		topPanel.add(superscript = createToggleButton(images.superscript(),
				strings.superscript()));
		topPanel.add(justifyLeft = createPushButton(images.justifyLeft(), strings.justifyLeft()));
		topPanel.add(justifyCenter = createPushButton(images.justifyCenter(),
				strings.justifyCenter()));
		topPanel.add(justifyRight = createPushButton(images.justifyRight(),
				strings.justifyRight()));
	}

	if (extended != null) {
		topPanel.add(strikethrough = createToggleButton(images.strikeThrough(),
				strings.strikeThrough()));
		topPanel.add(indent = createPushButton(images.indent(), strings.indent()));
		topPanel.add(outdent = createPushButton(images.outdent(), strings.outdent()));
		topPanel.add(hr = createPushButton(images.hr(), strings.hr()));
		topPanel.add(ol = createPushButton(images.ol(), strings.ol()));
		topPanel.add(ul = createPushButton(images.ul(), strings.ul()));
		topPanel.add(insertImage = createPushButton(images.insertImage(), strings.insertImage()));
		topPanel.add(createLink = createPushButton(images.createLink(), strings.createLink()));
		topPanel.add(removeLink = createPushButton(images.removeLink(), strings.removeLink()));
		topPanel.add(removeFormat = createPushButton(images.removeFormat(),
				strings.removeFormat()));
	}

	if (basic != null) {
		bottomPanel.add(backColors = createColorList("Background"));
		bottomPanel.add(foreColors = createColorList("Foreground"));
		bottomPanel.add(fonts = createFontList());
		bottomPanel.add(fontSizes = createFontSizes());

		// We only use these handlers for updating status, so don't hook them up
		// unless at least basic editing is supported.
		richText.addKeyUpHandler(handler);
		richText.addClickHandler(handler);
	}
}
 
开发者ID:nodchip,项目名称:QMAClone,代码行数:62,代码来源:RichTextToolbar.java

示例6: JSTextPane

import com.google.gwt.user.client.ui.RichTextArea; //导入方法依赖的package包/类
public JSTextPane() {
	loaded = false;
	tries = 0;
	
	container = new SimplePanel();
	OpenJWT.setElementFloat(container.getElement(), "left");
	
	richTextArea = new RichTextArea();
	richTextArea.setSize("100%", "100%");
	
	container.add(richTextArea);
	
	boldBt = new JSButton();
	boldBt.addStyleName("bold");
	boldBt.setPixelWidth(30);
	boldBt.addClickListener(this);
	
	italicBt = new JSButton();
	italicBt.addStyleName("italic");
	italicBt.setPixelWidth(30);
	italicBt.addClickListener(this);
	
	underlineBt = new JSButton();
	underlineBt.addStyleName("underline");
	underlineBt.setPixelWidth(30);
	underlineBt.addClickListener(this);
	
	justifyLeftBt = new JSButton();
	justifyLeftBt.addStyleName("justifyLeft");
	justifyLeftBt.setPixelWidth(30);
	justifyLeftBt.addClickListener(this);
	
	justifyCenterBt = new JSButton();
	justifyCenterBt.addStyleName("justifyCenter");
	justifyCenterBt.setPixelWidth(30);
	justifyCenterBt.addClickListener(this);
	
	justifyRightBt = new JSButton();
	justifyRightBt.addStyleName("justifyRight");
	justifyRightBt.setPixelWidth(30);
	justifyRightBt.addClickListener(this);
	
	insertImgBt = new JSButton();
	insertImgBt.addStyleName("insertImg");
	insertImgBt.setPixelWidth(30);
	insertImgBt.addClickListener(this);
	
	addComponent(boldBt);
	addComponent(italicBt);
	addComponent(underlineBt);
	addComponent(justifyLeftBt);
	addComponent(justifyCenterBt);
	addComponent(justifyRightBt);
	if (richTextArea.getExtendedFormatter() != null)
		addComponent(insertImgBt);;
	addRow();
	addComponent(container);
	
	addStyleName("textPane");
}
 
开发者ID:Orichievac,项目名称:FallenGalaxy,代码行数:61,代码来源:JSTextPane.java

示例7: RichTextToolbar

import com.google.gwt.user.client.ui.RichTextArea; //导入方法依赖的package包/类
/**
 * Creates a new toolbar that drives the given rich text area.
 * 
 * @param richText the rich text area to be controlled
 */
public RichTextToolbar(RichTextArea richText) {
  this.richText = richText;
  this.basic = richText.getBasicFormatter();
  this.extended = richText.getExtendedFormatter();

  outer.add(topPanel);
  outer.add(bottomPanel);
  topPanel.setWidth("100%");
  bottomPanel.setWidth("100%");

  initWidget(outer);
  setStyleName("gwt-RichTextToolbar");
  richText.addStyleName("hasRichTextToolbar");

  if (basic != null) {
    topPanel.add(bold = createToggleButton(images.bold(), strings.bold()));
    topPanel.add(italic = createToggleButton(images.italic(),
        strings.italic()));
    topPanel.add(underline = createToggleButton(images.underline(),
        strings.underline()));
    topPanel.add(subscript = createToggleButton(images.subscript(),
        strings.subscript()));
    topPanel.add(superscript = createToggleButton(images.superscript(),
        strings.superscript()));
    topPanel.add(justifyLeft = createPushButton(images.justifyLeft(),
        strings.justifyLeft()));
    topPanel.add(justifyCenter = createPushButton(images.justifyCenter(),
        strings.justifyCenter()));
    topPanel.add(justifyRight = createPushButton(images.justifyRight(),
        strings.justifyRight()));
  }

  if (extended != null) {
    topPanel.add(strikethrough = createToggleButton(images.strikeThrough(),
        strings.strikeThrough()));
    topPanel.add(indent = createPushButton(images.indent(), strings.indent()));
    topPanel.add(outdent = createPushButton(images.outdent(),
        strings.outdent()));
    topPanel.add(hr = createPushButton(images.hr(), strings.hr()));
    topPanel.add(ol = createPushButton(images.ol(), strings.ol()));
    topPanel.add(ul = createPushButton(images.ul(), strings.ul()));
    topPanel.add(insertImage = createPushButton(images.insertImage(),
        strings.insertImage()));
    topPanel.add(createLink = createPushButton(images.createLink(),
        strings.createLink()));
    topPanel.add(removeLink = createPushButton(images.removeLink(),
        strings.removeLink()));
    topPanel.add(removeFormat = createPushButton(images.removeFormat(),
        strings.removeFormat()));
  }

  if (basic != null) {
    bottomPanel.add(backColors = createColorList("Background"));
    bottomPanel.add(foreColors = createColorList("Foreground"));
    bottomPanel.add(fonts = createFontList());
    bottomPanel.add(fontSizes = createFontSizes());

    // We only use these handlers for updating status, so don't hook them up
    // unless at least basic editing is supported.
    richText.addKeyUpHandler(handler);
    richText.addClickHandler(handler);
  }
}
 
开发者ID:Peergos,项目名称:Peergos,代码行数:69,代码来源:RichTextToolbar.java

示例8: RichTextToolbar

import com.google.gwt.user.client.ui.RichTextArea; //导入方法依赖的package包/类
/**
     * Creates a new toolbar that drives the given rich text area.
     * 
     * @param richText
     *            the rich text area to be controlled
     */
    public RichTextToolbar(RichTextArea richText) {
        this.richText = richText;
        this.basic = richText.getBasicFormatter();
        this.extended = richText.getExtendedFormatter();

        outer.add(topPanel);
//        outer.add(bottomPanel);
        topPanel.setWidth("100%");
        bottomPanel.setWidth("100%");

        initWidget(outer);
        setStyleName("gwt-RichTextToolbar");
        richText.addStyleName("hasRichTextToolbar");

        if (basic != null) {
            topPanel.add(bold = createToggleButton(images.bold(), strings.bold()));
            topPanel.add(italic = createToggleButton(images.italic(), strings.italic()));
            topPanel.add(underline = createToggleButton(images.underline(), strings.underline()));
            topPanel.add(subscript = createToggleButton(images.subscript(), strings.subscript()));
            topPanel.add(superscript = createToggleButton(images.superscript(), strings.superscript()));
            topPanel.add(justifyLeft = createPushButton(images.justifyLeft(), strings.justifyLeft()));
            topPanel.add(justifyCenter = createPushButton(images.justifyCenter(), strings.justifyCenter()));
            topPanel.add(justifyRight = createPushButton(images.justifyRight(), strings.justifyRight()));
        }

        if (extended != null) {
            topPanel.add(strikethrough = createToggleButton(images.strikeThrough(), strings.strikeThrough()));
            topPanel.add(indent = createPushButton(images.indent(), strings.indent()));
            topPanel.add(outdent = createPushButton(images.outdent(), strings.outdent()));
            topPanel.add(hr = createPushButton(images.hr(), strings.hr()));
            topPanel.add(ol = createPushButton(images.ol(), strings.ol()));
            topPanel.add(ul = createPushButton(images.ul(), strings.ul()));
            topPanel.add(insertImage = createPushButton(images.insertImage(), strings.insertImage()));
            topPanel.add(createLink = createPushButton(images.createLink(), strings.createLink()));
            topPanel.add(removeLink = createPushButton(images.removeLink(), strings.removeLink()));
            topPanel.add(removeFormat = createPushButton(images.removeFormat(), strings.removeFormat()));
        }

        if (basic != null) {
            topPanel.add(backColors = createColorList("Background"));
            topPanel.add(foreColors = createColorList("Foreground"));
            topPanel.add(fonts = createFontList());
            topPanel.add(fontSizes = createFontSizes());

            // We only use these listeners for updating status, so don't hook
            // them up
            // unless at least basic editing is supported.
            richText.addKeyboardListener(listener);
            richText.addClickListener(listener);
        }
    }
 
开发者ID:jbosschina,项目名称:jcommerce,代码行数:58,代码来源:RichTextToolbar.java


注:本文中的com.google.gwt.user.client.ui.RichTextArea.getExtendedFormatter方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。