protected abstract class WrapperItemProvider.WrappingCopyCommand extends CommandWrapper
AbstractCommand.NonDirtying| Modifier and Type | Field and Description |
|---|---|
protected java.util.Collection<?> |
affectedObjects |
protected java.util.Collection<?> |
result |
commanddescription, isExecutable, isPrepared, label| Constructor and Description |
|---|
WrapperItemProvider.WrappingCopyCommand(Command command)
Creates an instance where some adaptable value is copied by the given command.
|
| Modifier and Type | Method and Description |
|---|---|
abstract IWrapperItemProvider |
copy()
Concrete subclasses must implement this to copy and return the value and wrapper.
|
void |
execute()
|
java.util.Collection<?> |
getAffectedObjects()
Returns a list containing only the original wrapper itself.
|
java.util.Collection<?> |
getResult()
If the command has executed, returns a list containing only the copy of the wrapper.
|
canUndo, createCommand, dispose, getCommand, getDescription, getLabel, prepare, redo, toString, undocanExecute, chain, setDescription, setLabelprotected java.util.Collection<?> result
protected java.util.Collection<?> affectedObjects
public WrapperItemProvider.WrappingCopyCommand(Command command)
public void execute()
copy to copy the rest of the value and
the wrapper, disposes the copy, and sets it to be the result of the
command. Since the copy has not been created within the viewed model, it should never do any kind of
notification, which is why it is immediately disposed.execute in interface Commandexecute in class CommandWrapperpublic abstract IWrapperItemProvider copy()
getCommand().getResult().public java.util.Collection<?> getResult()
getResult in interface CommandgetResult in class CommandWrapperpublic java.util.Collection<?> getAffectedObjects()
getAffectedObjects in interface CommandgetAffectedObjects in class CommandWrapper