public abstract class AbstractCommand extends Object implements ICommand
ICommand,
Serialized Form| Modifier | Constructor and Description |
|---|---|
protected |
AbstractCommand(String name)
Creates a new abstract command (can only be called by the subclass
constructor).
|
| Modifier and Type | Method and Description |
|---|---|
String |
getName()
Returns the (display) name of the command.
|
boolean |
isRedoable()
Returns TRUE if the command can be redone.
|
boolean |
isRelevant()
Returns TRUE if the command is relevant and should be considered for undo
/ redo operations.
|
boolean |
isUndoable()
Returns TRUE if the command can be undone.
|
void |
redoCommand(IProgressMonitor monitor)
Executes the command again after a call to the command's undo method.
|
void |
setName(String name)
Sets the (display) name of the command.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexecuteCommand, undoCommandprotected AbstractCommand(String name)
name - the name of the commandpublic String getName()
getName in interface ICommandICommand.getName(),
setName(String)public void setName(String name)
name - the name to be used for the commandgetName()public boolean isRedoable()
isRedoable in interface ICommandICommand.isRedoable()public boolean isRelevant()
isRelevant in interface ICommandICommand.isRelevant()public boolean isUndoable()
isUndoable in interface ICommandICommand.isUndoable()public void redoCommand(IProgressMonitor monitor) throws CommandException
redoCommand in interface ICommandmonitor - a progress monitorCommandException - if anything during the execution of the command has gone
wrongICommand.redoCommand(IProgressMonitor)Copyright © 2006–2020 Dirk Lemmermann Software & Consulting. All rights reserved.