|
GWT 2.7.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public static interface RichTextArea.Formatter
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 |
---|
void createLink(java.lang.String url)
createLink
in interface RichTextArea.ExtendedFormatter
url
- the URL to be linked tojava.lang.String getBackColor()
getBackColor
in interface RichTextArea.BasicFormatter
java.lang.String getForeColor()
getForeColor
in interface RichTextArea.BasicFormatter
void insertHorizontalRule()
insertHorizontalRule
in interface RichTextArea.ExtendedFormatter
void insertHTML(java.lang.String html)
html
- the HTML to insertvoid insertImage(java.lang.String url)
insertImage
in interface RichTextArea.ExtendedFormatter
url
- the url of the image to be insertedvoid insertOrderedList()
insertOrderedList
in interface RichTextArea.ExtendedFormatter
void insertUnorderedList()
insertUnorderedList
in interface RichTextArea.ExtendedFormatter
boolean isBold()
isBold
in interface RichTextArea.BasicFormatter
boolean isItalic()
isItalic
in interface RichTextArea.BasicFormatter
boolean isStrikethrough()
isStrikethrough
in interface RichTextArea.ExtendedFormatter
boolean isSubscript()
isSubscript
in interface RichTextArea.BasicFormatter
boolean isSuperscript()
isSuperscript
in interface RichTextArea.BasicFormatter
boolean isUnderlined()
isUnderlined
in interface RichTextArea.BasicFormatter
void leftIndent()
leftIndent
in interface RichTextArea.ExtendedFormatter
void redo()
void removeFormat()
removeFormat
in interface RichTextArea.ExtendedFormatter
void removeLink()
removeLink
in interface RichTextArea.ExtendedFormatter
void rightIndent()
rightIndent
in interface RichTextArea.ExtendedFormatter
void selectAll()
selectAll
in interface RichTextArea.BasicFormatter
void setBackColor(java.lang.String color)
setBackColor
in interface RichTextArea.BasicFormatter
color
- the new background colorvoid setFontName(java.lang.String name)
setFontName
in interface RichTextArea.BasicFormatter
name
- the new font namevoid setFontSize(RichTextArea.FontSize fontSize)
setFontSize
in interface RichTextArea.BasicFormatter
fontSize
- the new font sizevoid setForeColor(java.lang.String color)
setForeColor
in interface RichTextArea.BasicFormatter
color
- the new foreground colorvoid setJustification(RichTextArea.Justification justification)
setJustification
in interface RichTextArea.BasicFormatter
justification
- the new justificationvoid toggleBold()
toggleBold
in interface RichTextArea.BasicFormatter
void toggleItalic()
toggleItalic
in interface RichTextArea.BasicFormatter
void toggleStrikethrough()
toggleStrikethrough
in interface RichTextArea.ExtendedFormatter
void toggleSubscript()
toggleSubscript
in interface RichTextArea.BasicFormatter
void toggleSuperscript()
toggleSuperscript
in interface RichTextArea.BasicFormatter
void toggleUnderline()
toggleUnderline
in interface RichTextArea.BasicFormatter
void undo()
|
GWT 2.7.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |