|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.binding.value.support.AbstractPropertyChangePublisher
org.springframework.richclient.command.AbstractCommand
org.springframework.richclient.command.ActionCommand
org.springframework.richclient.command.TargetableActionCommand
public class TargetableActionCommand
An ActionCommand
that delegates to an internal ActionCommandExecutor
.
The executor can be provided at construction but can also be provided
programmatically at runtime and replaced during program execution. This enables a shared
global command feature whereby a single command is specified that can perform different
actions depending on the currently active context.
Field Summary |
---|
Fields inherited from class org.springframework.richclient.command.ActionCommand |
---|
ACTION_COMMAND_PARAMETER_KEY, ACTION_COMMAND_PROPERTY, ACTION_EVENT_PARAMETER_KEY, MODIFIERS_PARAMETER_KEY |
Fields inherited from class org.springframework.richclient.command.AbstractCommand |
---|
ENABLED_PROPERTY_NAME, VISIBLE_PROPERTY_NAME |
Fields inherited from class org.springframework.binding.value.support.AbstractPropertyChangePublisher |
---|
logger |
Fields inherited from interface org.springframework.richclient.core.Authorizable |
---|
AUTHORIZED_PROPERTY |
Constructor Summary | |
---|---|
TargetableActionCommand()
Creates a new uninitialized TargetableActionCommand . |
|
TargetableActionCommand(String commandId)
Creates a new TargetableActionCommand with the given identifier. |
|
TargetableActionCommand(String commandId,
ActionCommandExecutor commandExecutor)
Creates a new TargetableActionCommand with the given identifier and initial
executor. |
Method Summary | |
---|---|
void |
detachCommandExecutor()
Detaches the current executor from this command and sets the command to disabled state. |
protected void |
doExecuteCommand()
Executes this command by delegating to the currently assigned executor. |
void |
setCommandExecutor(ActionCommandExecutor commandExecutor)
Attaches the given executor to this command instance, detaching the current executor in the process. |
Methods inherited from class org.springframework.richclient.command.ActionCommand |
---|
addCommandInterceptor, addParameter, execute, execute, getActionAdapter, getActionCommand, getModifiers, getParameter, getParameter, getParameters, isDisplaysInputDialog, onButtonAttached, onPostExecute, onPreExecute, removeCommandInterceptor, setActionCommand, setDefaultButton, setDefaultButtonIn, setDisplaysInputDialog |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TargetableActionCommand()
TargetableActionCommand
. If defined
in a Spring bean factory, the name of the bean will become the id of this instance.
public TargetableActionCommand(String commandId)
TargetableActionCommand
with the given identifier.
The instance will be initialized in a disabled state.
commandId
- The identifier for this instance.public TargetableActionCommand(String commandId, ActionCommandExecutor commandExecutor)
TargetableActionCommand
with the given identifier and initial
executor. The instance will be initialized in a disabled state.
commandId
- The identifier for this instance.commandExecutor
- The initial command executor.Method Detail |
---|
public void setCommandExecutor(ActionCommandExecutor commandExecutor)
commandExecutor
- The executor to be attached. May be null, in which case this command
will be disabled.public void detachCommandExecutor()
protected void doExecuteCommand()
doExecuteCommand
in class ActionCommand
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |