|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface CommandManager
Interface for executing commands on a rich text area and for retrieving informations about the state of these commands. This is the recommended way of altering the document edited with the rich text area because others can be notified about these changes. A group of changes to the edited document, with a well defined purpose, should be grouped in a command.
| Method Summary | |
|---|---|
boolean |
execute(Command cmd)
Executes a command on the current selection of the document edited with the underlying rich text area. |
boolean |
execute(Command cmd,
boolean param)
Executes a command on the current selection of the document edited with the underlying rich text area. |
boolean |
execute(Command cmd,
int param)
Executes a command on the current selection of the document edited with the underlying rich text area. |
boolean |
execute(Command cmd,
String param)
Executes a command on the current selection of the document edited with the underlying rich text area. |
Boolean |
getBooleanValue(Command cmd)
Returns the value of the given command for the current selection in the document edited with the underlying rich text area. |
Executable |
getExecutable(Command command)
|
Integer |
getIntegerValue(Command cmd)
Returns the value of the given command for the current selection in the document edited with the underlying rich text area. |
String |
getStringValue(Command cmd)
Returns the value of the given command for the current selection in the document edited with the underlying rich text area. |
boolean |
isEnabled(Command cmd)
Returns a boolean value that indicates whether the specified command can be successfully executed using execute(Command, String), given the current selection of the document edited with the underlying rich
text area. |
boolean |
isExecuted(Command cmd)
Returns a boolean value that indicates the current state of the given command. |
boolean |
isSupported(Command cmd)
Returns a boolean value that indicates whether the current command is supported by the underlying rich text area. |
Executable |
registerCommand(Command command,
Executable executable)
Associates the given command with the specified executable. |
Executable |
unregisterCommand(Command command)
Unregisters the given command. |
| Methods inherited from interface org.xwiki.gwt.user.client.ui.rta.cmd.SourcesCommandEvents |
|---|
addCommandListener, removeCommandListener |
| Method Detail |
|---|
boolean execute(Command cmd,
String param)
cmd - The command to execute.param - The parameter of the command.
true if the command is executed successfully.
boolean execute(Command cmd,
int param)
cmd - The command to execute.param - The parameter of the command.
true if the command is executed successfully.
boolean execute(Command cmd,
boolean param)
cmd - The command to execute.param - The parameter of the command.
true if the command is executed successfully.boolean execute(Command cmd)
cmd - The command to execute.
true if the command is executed successfully.boolean isEnabled(Command cmd)
execute(Command, String), given the current selection of the document edited with the underlying rich
text area.
cmd - The command to test.
true if the command is enabled.boolean isExecuted(Command cmd)
cmd - The command to test.
true if the given command has been executed on the current selection.boolean isSupported(Command cmd)
cmd - The command to test
true if the command is supported.String getStringValue(Command cmd)
cmd - The command to query.
Integer getIntegerValue(Command cmd)
cmd - The command to query.
Boolean getBooleanValue(Command cmd)
cmd - The command to query.
Executable registerCommand(Command command,
Executable executable)
execute(Command)
the given command the specified executable will be execute in fact.
command - The command to be registered.executable - The code to be associated with the given command. This code will be execute when the command is
fired.
Executable unregisterCommand(Command command)
execute(Command) will do nothing
because there's no executable associated with the given command.
command - The command to be executed.
Executable getExecutable(Command command)
command - A command.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||