public interface CommandManager extends SourcesCommandEvents
| Modifier and Type | Method and Description |
|---|---|
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.
|
addCommandListener, removeCommandListenerboolean 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 testtrue 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.Copyright © 2004–2015 XWiki. All rights reserved.