protected class DelegatingWrapperItemProvider.AffectedObjectsWrappingCommandActionDelegate extends DelegatingWrapperItemProvider.AffectedObjectsWrappingCommand implements CommandActionDelegate
AffectedObjectsWrappingCommandActionDelegate
wraps another command that also implements
CommandActionDelegate
, to substitute this wrapper for its value and child wrappers for their
corresponding child values, whenever they appear in the affected objects. Action delegate methods are delegated
directly to the wrapped command.AbstractCommand.NonDirtying
command
description, isExecutable, isPrepared, label
Constructor and Description |
---|
DelegatingWrapperItemProvider.AffectedObjectsWrappingCommandActionDelegate(CommandActionDelegate command)
Returns a new
AffectedObjectsWrappingCommandActionDelegate for the given command. |
Modifier and Type | Method and Description |
---|---|
boolean |
canExecute()
Calls
AbstractCommand.prepare() ,
caches the result in AbstractCommand.isExecutable ,
and sets AbstractCommand.isPrepared to true ;
from then on, it will yield the value of isExecutable. |
java.lang.String |
getDescription()
Delegates to the getDescription method of the command.
|
java.lang.Object |
getImage()
This returns the decoration, if any, of the action.
|
java.lang.String |
getText()
This returns the menu text, if any, of the action.
|
java.lang.String |
getToolTipText()
This returns the tool tip text, if any, of the action.
|
getAffectedObjects
canUndo, createCommand, dispose, execute, getCommand, getLabel, getResult, prepare, redo, toString, undo
chain, setDescription, setLabel
public DelegatingWrapperItemProvider.AffectedObjectsWrappingCommandActionDelegate(CommandActionDelegate command)
AffectedObjectsWrappingCommandActionDelegate
for the given command.java.lang.ClassCastException
- If the specified command does not implement Command
.public boolean canExecute()
AbstractCommand
AbstractCommand.prepare()
,
caches the result in AbstractCommand.isExecutable
,
and sets AbstractCommand.isPrepared
to true
;
from then on, it will yield the value of isExecutable.canExecute
in interface Command
canExecute
in interface CommandActionDelegate
canExecute
in class AbstractCommand
public java.lang.Object getImage()
CommandActionDelegate
getImage
in interface CommandActionDelegate
public java.lang.String getText()
CommandActionDelegate
getText
in interface CommandActionDelegate
public java.lang.String getDescription()
CommandWrapper
getDescription
in interface Command
getDescription
in interface CommandActionDelegate
getDescription
in class CommandWrapper
public java.lang.String getToolTipText()
CommandActionDelegate
getToolTipText
in interface CommandActionDelegate