|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xwiki.gwt.user.client.ui.rta.cmd.Command
public class Command
Identifies an action that the user can take on a rich text area. So an instance of this class it's just an
identifier. The code associated with the user action should be found in Executable. Commands should be
registered with the CommandManager.
| Field Summary | |
|---|---|
static Command |
BACK_COLOR
This command will set the background color of the document. |
static Command |
BOLD
If there is no selection, the insertion point will set bold for subsequently typed characters. If there is a selection and all of the characters are already bold, the bold will be removed. |
static Command |
CREATE_LINK
This command will insert a link in place of the current selection, either if it is a collapsed selection or an expanded one. |
static Command |
DELETE
Deletes the current selection. |
static Command |
ENABLE
Enables or disables the rich text area. |
static Command |
FONT_NAME
This command will set the font face for a selection or at the insertion point if there is no selection. The given string is such as would be used in the "name" attribute of the font tag. |
static Command |
FONT_SIZE
This command will set the font size for a selection or at the insertion point if there is no selection. The given number is such as would be used in the "size" attribute of the font tag. |
static Command |
FORE_COLOR
This command will set the text color of the selection or at the insertion point. |
static Command |
FORMAT_BLOCK
Adds an HTML block-style tag around a selection or at the insertion point line. |
static Command |
INDENT
Indent the block where the caret is located. |
static Command |
INSERT_BR_ON_RETURN
Selects whether pressing return inside a paragraph creates another paragraph or just inserts a <br> tag. |
static Command |
INSERT_HORIZONTAL_RULE
This command will insert a horizontal rule (line) at the insertion point. Does it delete the selection? Yes! |
static Command |
INSERT_HTML
This command will insert the given HTML into the <body> in place of the current selection or at the caret location. The given string is the HTML to insert. |
static Command |
INSERT_IMAGE
This command will insert an image (referenced by the given url) at the insertion point. |
static Command |
INSERT_ORDERED_LIST
Depends on the selection. |
static Command |
INSERT_PARAGRAPH
Inserts a new paragraph. |
static Command |
INSERT_UNORDERED_LIST
Depends on the selection. |
static Command |
ITALIC
If there is no selection, the insertion point will set italic for subsequently typed characters. If there is a selection and all of the characters are already italic, the italic will be removed. |
static Command |
JUSTIFY_CENTER
Center-aligns the current block. |
static Command |
JUSTIFY_FULL
Fully-justifies the current block. |
static Command |
JUSTIFY_LEFT
Left-aligns the current block. |
static Command |
JUSTIFY_RIGHT
Right aligns the current block. |
protected String |
name
The name of the command. |
static Command |
OUTDENT
Outdent the block where the caret is located. |
static Command |
REDO
This command will redo the previous undo action. |
static Command |
REMOVE_FORMAT
Removes inline formatting from the current selection. |
static Command |
RESET
Resets the content of the rich text area. |
static Command |
STRIKE_THROUGH
If there is no selection, the insertion point will set strikethrough for subsequently typed characters. If there is a selection and all of the characters are already striked, the strikethrough will be removed. |
static Command |
STYLE_WITH_CSS
This command is used for toggling the format of generated content. |
static Command |
SUB_SCRIPT
If there is no selection, the insertion point will set subscript for subsequently typed characters. If there is a selection and all of the characters are already subscripted, the subscript will be removed. |
static Command |
SUPER_SCRIPT
If there is no selection, the insertion point will set superscript for subsequently typed characters. If there is a selection and all of the characters are already superscripted, the superscript will be removed. |
static Command |
TELETYPE
If there is no selection, the insertion point will be set to teletype for subsequently typed characters. If there is a selection and all of the characters have already teletype style, the teletype will be removed. |
static Command |
UNDERLINE
If there is no selection, the insertion point will set underline for subsequently typed characters. If there is a selection and all of the characters are already underlined, the underline will be removed. |
static Command |
UNDO
This command will undo the previous action. |
static Command |
UNLINK
If the insertion point is within a link or if the current selection contains a link, the link will be removed and the text will remain. |
static Command |
UPDATE
This command is used only to notify the command listeners that they need to update their state. |
| Constructor Summary | |
|---|---|
Command(String name)
Creates a new command with the given name. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
|
int |
hashCode()
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Command BACK_COLOR
public static final Command BOLD
public static final Command CREATE_LINK
public static final Command DELETE
public static final Command ENABLE
public static final Command FONT_NAME
public static final Command FONT_SIZE
public static final Command FORE_COLOR
public static final Command FORMAT_BLOCK
public static final Command INDENT
public static final Command INSERT_BR_ON_RETURN
<br> tag.
public static final Command INSERT_HORIZONTAL_RULE
public static final Command INSERT_HTML
public static final Command INSERT_IMAGE
public static final Command INSERT_ORDERED_LIST
public static final Command INSERT_UNORDERED_LIST
public static final Command INSERT_PARAGRAPH
public static final Command ITALIC
public static final Command JUSTIFY_CENTER
public static final Command JUSTIFY_FULL
public static final Command JUSTIFY_LEFT
public static final Command JUSTIFY_RIGHT
public static final Command OUTDENT
public static final Command REDO
public static final Command REMOVE_FORMAT
public static final Command RESET
public static final Command STRIKE_THROUGH
public static final Command STYLE_WITH_CSS
<b> if the styleWithCSS
command is false and generate css style attribute if the styleWithCSS command is true.
public static final Command SUB_SCRIPT
public static final Command SUPER_SCRIPT
public static final Command TELETYPE
public static final Command UNDERLINE
public static final Command UNDO
public static final Command UNLINK
public static final Command UPDATE
protected String name
| Constructor Detail |
|---|
public Command(String name)
name - The name of the new command.| Method Detail |
|---|
public String toString()
toString in class Objectpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||