List of usage examples for com.google.gwt.user.client.ui RichTextArea getExtendedFormatter
@Deprecated
public ExtendedFormatter getExtendedFormatter()
From source file:cazcade.vortex.widgets.client.misc.toolbar.RichTextToolbar.java
License:Apache License
/** * Creates a new toolbar that drives the given rich text area. * * @param richText the rich text area to be controlled *//*from w ww. j a v a 2s. co m*/ public RichTextToolbar(@Nonnull final RichTextArea richText, final boolean large) { super(); this.richText = richText; basic = richText.getBasicFormatter(); extended = richText.getExtendedFormatter(); outer.add(topPanel); outer.add(bottomPanel); topPanel.setWidth("100%"); bottomPanel.setWidth("100%"); initWidget(outer); setStyleName("gwt-RichTextToolbar"); 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())); if (large) { 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())); if (large) { 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())); if (large) { topPanel.add(removeFormat = createPushButton(images.removeFormat(), strings.removeFormat())); } } if (basic != null) { if (large) { 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); } }
From source file:ch.unibas.medizin.osce.client.style.widgets.richtext.RichTextToolbar.java
License:Apache License
public RichTextToolbar(RichTextArea richText) { this.richText = richText; this.basic = richText.getBasicFormatter(); this.extended = richText.getExtendedFormatter(); outer.add(topPanel);/*w w w .j ava 2 s. c om*/ 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); } }
From source file:com.appspot.codsallarts.client.texteditor.RichTextToolbar.java
License:Apache License
/** * Creates a new toolbar that drives the given rich text area. * //w w w.j a v a 2 s.com * @param richText the rich text area to be controlled */ public RichTextToolbar(RichTextArea richText, EditCompleteHandler parent) { this.richText = richText; this.basic = richText.getBasicFormatter(); this.extended = richText.getExtendedFormatter(); this.parent = parent; 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(foreColors = createColorList("Foreground")); bottomPanel.add(fontSizes = createFontSizes()); bottomPanel.add(saveButton = new Button("Save", handler)); bottomPanel.add(cancelButton = new Button("Cancel", handler)); // 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); } }
From source file:com.apress.progwt.client.college.gui.ext.RichTextToolbar.java
License:Apache License
/** * Creates a new toolbar that drives the given rich text area. * //from w w w. j ava2 s.c o m * @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"); 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); } }
From source file:com.arcbees.gquery.tooltip.client.widget.RichTextToolbar.java
License:Apache License
/** * Creates a new toolbar that drives the given rich text area. * * @param richText the rich text area to be controlled *//*from w ww. j av a 2s.c o m*/ 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); } }
From source file:com.dimad.gwt.control.text.FontRichTextToolbar.java
License:Apache License
/** * Creates a new toolbar that drives the given rich text area. * //from w w w . j a va 2 s . c o m * @param richText * the rich text area to be controlled */ public FontRichTextToolbar(RichTextArea richText) { try { this.richText = richText; this.extended = richText.getExtendedFormatter(); outer.add(topPanel); topPanel.setWidth("100%"); initWidget(outer); setStyleName("gwt-RichTextToolbar"); richText.addStyleName("hasRichTextToolbar"); topPanel.add(fonts = createFontList()); topPanel.add(fontSizes = createFontSizes()); 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(strikethrough = createToggleButton(images.strikeThrough(), strings.strikeThrough())); topPanel.add(foreColors = createColorList("Foreground")); // 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); } catch (Exception e) { Window.alert("FontRichTextToolbar: ex=" + e); } }
From source file:com.dimad.gwt.control.text.RichTextToolbar.java
License:Apache License
/** * Creates a new toolbar that drives the given rich text area. * /*from w w w .ja v a 2s . c o m*/ * @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())); // topPanel.add(texthtml = createToggleButton(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); } }
From source file:com.goodow.web.core.client.text.RichTextToolbar.java
License:Apache License
/** * Creates a new toolbar that drives the given rich text area. * //from w w w. j ava 2s . co m * @param richText the rich text area to be controlled */ public RichTextToolbar(final 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); } }
From source file:com.google.code.p.gwtchismes.client.editor.Toolbar.java
License:Apache License
public Toolbar(RichTextArea richText, ToolbarConstants strings, ToolbarImages images) { this.richText = richText; this.basic = richText.getBasicFormatter(); this.extended = richText.getExtendedFormatter(); topPanel.setWidth("100%"); initWidget(topPanel);/*from w w w.jav a 2s . co m*/ setStyleName("gwt-RichTextToolbar"); richText.addStyleName("hasRichTextToolbar"); if (basic != null) { topPanel.add(bold = createToggleButton(images.bold(), strings.editor_bold())); topPanel.add(italic = createToggleButton(images.italic(), strings.editor_italic())); topPanel.add(underline = createToggleButton(images.underline(), strings.editor_underline())); topPanel.add(backColors = createPushButton(images.backColors(), strings.editor_background())); topPanel.add(foreColors = createPushButton(images.foreColors(), strings.editor_foreground())); topPanel.add(fontFamily = createPushButton(images.fonts(), strings.editor_font())); topPanel.add(fontSize = createPushButton(images.fontSizes(), strings.editor_size())); topPanel.add(subscript = createToggleButton(images.subscript(), strings.editor_subscript())); topPanel.add(superscript = createToggleButton(images.superscript(), strings.editor_superscript())); topPanel.add(justifyLeft = createPushButton(images.justifyLeft(), strings.editor_justifyLeft())); topPanel.add(justifyCenter = createPushButton(images.justifyCenter(), strings.editor_justifyCenter())); topPanel.add(justifyRight = createPushButton(images.justifyRight(), strings.editor_justifyRight())); } if (extended != null) { topPanel.add( strikethrough = createToggleButton(images.strikeThrough(), strings.editor_strikeThrough())); topPanel.add(indent = createPushButton(images.indent(), strings.editor_indent())); topPanel.add(outdent = createPushButton(images.outdent(), strings.editor_outdent())); topPanel.add(hr = createPushButton(images.hr(), strings.editor_hr())); topPanel.add(ol = createPushButton(images.ol(), strings.editor_ol())); topPanel.add(ul = createPushButton(images.ul(), strings.editor_ul())); topPanel.add(insertImage = createPushButton(images.insertImage(), strings.editor_insertImage())); topPanel.add(createLink = createPushButton(images.createLink(), strings.editor_createLink())); topPanel.add(removeLink = createPushButton(images.removeLink(), strings.editor_removeLink())); topPanel.add(removeFormat = createPushButton(images.removeFormat(), strings.editor_removeFormat())); } HTML topEmtyCell = new HTML(""); topPanel.add(topEmtyCell); topPanel.setCellWidth(topEmtyCell, "100%"); richText.addKeyDownHandler(handler); richText.addKeyUpHandler(handler); richText.addClickHandler(handler); backColorsPicker.addValueChangeHandler(colorHandler); foreColorsPicker.addValueChangeHandler(colorHandler); fontFamilyPicker.addValueChangeHandler(fontHandler); fontSizePicker.addValueChangeHandler(fontHandler); }
From source file:com.google.gwt.gears.sample.gwtnote.client.ui.RichTextToolbar.java
License:Apache License
/** * Creates a new toolbar that drives the given rich text area. * /* w w w . jav a 2 s.c o m*/ * @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"); 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); } }