RichTextArea.Formatter (GWT Javadoc)

Overview | Package | Class | Use | Deprecated | Help
| GWT 2.7.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.google.gwt.user.client.ui
Interface RichTextArea.Formatter

All Superinterfaces:
  RichTextArea.BasicFormatter, RichTextArea.ExtendedFormatter

Enclosing class:
  RichTextArea

    public static interface RichTextArea.Formatter

extends RichTextArea.ExtendedFormatter

This interface is used to access full formatting options, when available. If the implementation supports full formatting, then `RichTextArea.getFormatter()` will return an instance of this class.

The formatter will format the user selected text in the `RichTextArea`. As a result, it will only work reliably if the `RichTextArea` is attached, visible to on the page, and has been focused at least once. If you just want to initialize the content of the `RichTextArea`, use `RichTextArea.setHTML(String)` instead.

Method Summary
`void` | `createLink(java.lang.String url)` Creates a link to the supplied URL.
`java.lang.String` | `getBackColor()` Gets the background color.
`java.lang.String` | `getForeColor()` Gets the foreground color.
`void` | `insertHorizontalRule()` Inserts a horizontal rule.
`void` | `insertHTML(java.lang.String html)` Inserts generic html.
`void` | `insertImage(java.lang.String url)` Inserts an image element.
`void` | `insertOrderedList()` Starts an numbered list.
`void` | `insertUnorderedList()` Starts an bulleted list.
`boolean` | `isBold()` Is the current region bold?
`boolean` | `isItalic()` Is the current region italic?
`boolean` | `isStrikethrough()` Is the current region strikethrough?
`boolean` | `isSubscript()` Is the current region subscript?
`boolean` | `isSuperscript()` Is the current region superscript?
`boolean` | `isUnderlined()` Is the current region underlined?
`void` | `leftIndent()` Left indent.
`void` | `redo()` Redo an action that was just undone.
`void` | `removeFormat()` Removes all formatting on the selected text.
`void` | `removeLink()` Removes any link from the selected text.
`void` | `rightIndent()` Right indent.
`void` | `selectAll()` Selects all the text.
`void` | `setBackColor(java.lang.String color)` Sets the background color.
`void` | `setFontName(java.lang.String name)` Sets the font name.
`void` | `setFontSize(RichTextArea.FontSize fontSize)` Sets the font size.
`void` | `setForeColor(java.lang.String color)` Sets the foreground color.
`void` | `setJustification(RichTextArea.Justification justification)` Sets the justification.
`void` | `toggleBold()` Toggles bold.
`void` | `toggleItalic()` Toggles italic.
`void` | `toggleStrikethrough()` Toggles strikethrough.
`void` | `toggleSubscript()` Toggles subscript.
`void` | `toggleSuperscript()` Toggles superscript.
`void` | `toggleUnderline()` Toggles underline.
`void` | `undo()` Undo the last action.

Method Detail

### createLink

    void createLink(java.lang.String url)

  Creates a link to the supplied URL.

  Specified by:
    `createLink` in interface `RichTextArea.ExtendedFormatter`
  Parameters:
    `url` - the URL to be linked to

### getBackColor

    java.lang.String getBackColor()

  Gets the background color.

  Specified by:
    `getBackColor` in interface `RichTextArea.BasicFormatter`
  Returns:
    the background color

### getForeColor

    java.lang.String getForeColor()

  Gets the foreground color.

  Specified by:
    `getForeColor` in interface `RichTextArea.BasicFormatter`
  Returns:
    the foreground color

### insertHorizontalRule

    void insertHorizontalRule()

  Inserts a horizontal rule.

  Specified by:
    `insertHorizontalRule` in interface `RichTextArea.ExtendedFormatter`

### insertHTML

    void insertHTML(java.lang.String html)

  Inserts generic html.

  Parameters:
    `html` - the HTML to insert

### insertImage

    void insertImage(java.lang.String url)

  Inserts an image element.

  Specified by:
    `insertImage` in interface `RichTextArea.ExtendedFormatter`
  Parameters:
    `url` - the url of the image to be inserted

### insertOrderedList

    void insertOrderedList()

  Starts an numbered list. Indentation will create nested items.

  Specified by:
    `insertOrderedList` in interface `RichTextArea.ExtendedFormatter`

### insertUnorderedList

    void insertUnorderedList()

  Starts an bulleted list. Indentation will create nested items.

  Specified by:
    `insertUnorderedList` in interface `RichTextArea.ExtendedFormatter`

### isBold

    boolean isBold()

  Is the current region bold?

  Specified by:
    `isBold` in interface `RichTextArea.BasicFormatter`
  Returns:
    true if the current region is bold

### isItalic

    boolean isItalic()

  Is the current region italic?

  Specified by:
    `isItalic` in interface `RichTextArea.BasicFormatter`
  Returns:
    true if the current region is italic

### isStrikethrough

    boolean isStrikethrough()

  Is the current region strikethrough?

  Specified by:
    `isStrikethrough` in interface `RichTextArea.ExtendedFormatter`
  Returns:
    true if the current region is strikethrough

### isSubscript

    boolean isSubscript()

  Is the current region subscript?

  Specified by:
    `isSubscript` in interface `RichTextArea.BasicFormatter`
  Returns:
    true if the current region is subscript

### isSuperscript

    boolean isSuperscript()

  Is the current region superscript?

  Specified by:
    `isSuperscript` in interface `RichTextArea.BasicFormatter`
  Returns:
    true if the current region is superscript

### isUnderlined

    boolean isUnderlined()

  Is the current region underlined?

  Specified by:
    `isUnderlined` in interface `RichTextArea.BasicFormatter`
  Returns:
    true if the current region is underlined

### leftIndent

    void leftIndent()

  Left indent.

  Specified by:
    `leftIndent` in interface `RichTextArea.ExtendedFormatter`

### redo

    void redo()

  Redo an action that was just undone.

### removeFormat

    void removeFormat()

  Removes all formatting on the selected text.

  Specified by:
    `removeFormat` in interface `RichTextArea.ExtendedFormatter`

### removeLink

    void removeLink()

  Removes any link from the selected text.

  Specified by:
    `removeLink` in interface `RichTextArea.ExtendedFormatter`

### rightIndent

    void rightIndent()

  Right indent.

  Specified by:
    `rightIndent` in interface `RichTextArea.ExtendedFormatter`

### selectAll

    void selectAll()

  Selects all the text.

  Specified by:
    `selectAll` in interface `RichTextArea.BasicFormatter`

### setBackColor

    void setBackColor(java.lang.String color)

  Sets the background color.

  Specified by:
    `setBackColor` in interface `RichTextArea.BasicFormatter`
  Parameters:
    `color` - the new background color

### setFontName

    void setFontName(java.lang.String name)

  Sets the font name.

  Specified by:
    `setFontName` in interface `RichTextArea.BasicFormatter`
  Parameters:
    `name` - the new font name

### setFontSize

    void setFontSize(RichTextArea.FontSize fontSize)

  Sets the font size.

  Specified by:
    `setFontSize` in interface `RichTextArea.BasicFormatter`
  Parameters:
    `fontSize` - the new font size

### setForeColor

    void setForeColor(java.lang.String color)

  Sets the foreground color.

  Specified by:
    `setForeColor` in interface `RichTextArea.BasicFormatter`
  Parameters:
    `color` - the new foreground color

### setJustification

    void setJustification(RichTextArea.Justification justification)

  Sets the justification.

  Specified by:
    `setJustification` in interface `RichTextArea.BasicFormatter`
  Parameters:
    `justification` - the new justification

### toggleBold

    void toggleBold()

  Toggles bold.

  Specified by:
    `toggleBold` in interface `RichTextArea.BasicFormatter`

### toggleItalic

    void toggleItalic()

  Toggles italic.

  Specified by:
    `toggleItalic` in interface `RichTextArea.BasicFormatter`

### toggleStrikethrough

    void toggleStrikethrough()

  Toggles strikethrough.

  Specified by:
    `toggleStrikethrough` in interface `RichTextArea.ExtendedFormatter`

### toggleSubscript

    void toggleSubscript()

  Toggles subscript.

  Specified by:
    `toggleSubscript` in interface `RichTextArea.BasicFormatter`

### toggleSuperscript

    void toggleSuperscript()

  Toggles superscript.

  Specified by:
    `toggleSuperscript` in interface `RichTextArea.BasicFormatter`

### toggleUnderline

    void toggleUnderline()

  Toggles underline.

  Specified by:
    `toggleUnderline` in interface `RichTextArea.BasicFormatter`

### undo

    void undo()

  Undo the last action.

Overview | Package | Class | Use | Deprecated | Help
| GWT 2.7.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD