本文整理汇总了Java中com.google.gwt.user.client.ui.RichTextArea.addKeyUpHandler方法的典型用法代码示例。如果您正苦于以下问题:Java RichTextArea.addKeyUpHandler方法的具体用法?Java RichTextArea.addKeyUpHandler怎么用?Java RichTextArea.addKeyUpHandler使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.user.client.ui.RichTextArea
的用法示例。
在下文中一共展示了RichTextArea.addKeyUpHandler方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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 handlers for updating status, so don't hook them up
// unless at least basic editing is supported.
richText.addKeyUpHandler(handler);
richText.addClickHandler(handler);
}
}
示例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);
}
}
示例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(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);
}
}
示例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(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);
}
}
示例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);
}
}