|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.sdm.quasar.client.core.commands.RunnableCommandManager
A CommandManager using Runnables for its Commands.
The enablement state of the Command must be provided by the user of this class.
| Constructor Summary | |
RunnableCommandManager()
Creates a new RunnableCommandManager. |
|
| Method Summary | |
Command |
getCommand(java.lang.String commandId)
Get a Command from the CommandManager |
boolean |
hasCommand(java.lang.String commandId)
Checks, if the CommandManager provides a command with a given id |
void |
registerCommand(java.lang.String commandId,
java.lang.Runnable runnable,
BooleanState enabledBooleanState)
Registers a new command with the given id and parameters to this RunnableCommandManager. |
void |
setEnabledBooleanState(java.lang.String commandId,
BooleanState enabledBooleanState)
Sets the enabled BooleanState for the command with the given id. |
void |
unregisterCommand(java.lang.String commandId)
Unregisters a previously registered command. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public RunnableCommandManager()
RunnableCommandManager.
| Method Detail |
public void registerCommand(java.lang.String commandId,
java.lang.Runnable runnable,
BooleanState enabledBooleanState)
RunnableCommandManager.
commandId - the command id for the command (not null)runnable - the Runnable beeing executed (not null)enabledBooleanState - an enabled state (may be null; this means the command
is always enabled)
java.lang.IllegalArgumentException - if command id or method is null or if
the given method cannot be executed on the given target objectpublic void unregisterCommand(java.lang.String commandId)
commandId - the command id of the command to unregister
public void setEnabledBooleanState(java.lang.String commandId,
BooleanState enabledBooleanState)
BooleanState for the command with the given id.
commandId - the command id (not null)enabledBooleanState - the new enabled state (not null)Command.getEnabledBooleanState()public boolean hasCommand(java.lang.String commandId)
CommandManagerCommandManager provides a command with a given id
hasCommand in interface CommandManagercommandId - the id of a command
CommandManager provides a command with given idCommandManager.hasCommand(java.lang.String)public Command getCommand(java.lang.String commandId)
CommandManagerCommand from the CommandManager
getCommand in interface CommandManagercommandId - the id of a command
CommandManager.getCommand(java.lang.String)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||