public static interface

RichTextArea.Formatter

implements RichTextArea.ExtendedFormatter
com.google.gwt.user.client.ui.RichTextArea.Formatter
Known Indirect Subclasses

Class Overview

This interface is used to access full formatting options, when available. If the implementation supports full formatting, then 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 setHTML(String) instead.

Summary

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

Public Methods

public abstract void createLink (String url)

Creates a link to the supplied URL.

Parameters
url the URL to be linked to

public abstract String getBackColor ()

Gets the background color.

Returns
  • the background color

public abstract String getForeColor ()

Gets the foreground color.

Returns
  • the foreground color

public abstract void insertHTML (String html)

Inserts generic html.

Parameters
html the HTML to insert

public abstract void insertHorizontalRule ()

Inserts a horizontal rule.

public abstract void insertImage (String url)

Inserts an image element.

Parameters
url the url of the image to be inserted

public abstract void insertOrderedList ()

Starts an numbered list. Indentation will create nested items.

public abstract void insertUnorderedList ()

Starts an bulleted list. Indentation will create nested items.

public abstract boolean isBold ()

Is the current region bold?

Returns
  • true if the current region is bold

public abstract boolean isItalic ()

Is the current region italic?

Returns
  • true if the current region is italic

public abstract boolean isStrikethrough ()

Is the current region strikethrough?

Returns
  • true if the current region is strikethrough

public abstract boolean isSubscript ()

Is the current region subscript?

Returns
  • true if the current region is subscript

public abstract boolean isSuperscript ()

Is the current region superscript?

Returns
  • true if the current region is superscript

public abstract boolean isUnderlined ()

Is the current region underlined?

Returns
  • true if the current region is underlined

public abstract void leftIndent ()

Left indent.

public abstract void redo ()

Redo an action that was just undone.

public abstract void removeFormat ()

Removes all formatting on the selected text.

public abstract void removeLink ()

Removes any link from the selected text.

public abstract void rightIndent ()

Right indent.

public abstract void selectAll ()

Selects all the text.

public abstract void setBackColor (String color)

Sets the background color.

Parameters
color the new background color

public abstract void setFontName (String name)

Sets the font name.

Parameters
name the new font name

public abstract void setFontSize (RichTextArea.FontSize fontSize)

Sets the font size.

Parameters
fontSize the new font size

public abstract void setForeColor (String color)

Sets the foreground color.

Parameters
color the new foreground color

public abstract void setJustification (RichTextArea.Justification justification)

Sets the justification.

Parameters
justification the new justification

public abstract void toggleBold ()

Toggles bold.

public abstract void toggleItalic ()

Toggles italic.

public abstract void toggleStrikethrough ()

Toggles strikethrough.

public abstract void toggleSubscript ()

Toggles subscript.

public abstract void toggleSuperscript ()

Toggles superscript.

public abstract void toggleUnderline ()

Toggles underline.

public abstract void undo ()

Undo the last action.