public abstract class AbstractCommand extends Object implements ICommand
ICommand
,
Serialized FormModifier | 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, wait
executeCommand, undoCommand
protected AbstractCommand(String name)
name
- the name of the commandpublic String getName()
getName
in interface ICommand
ICommand.getName()
,
setName(String)
public void setName(String name)
name
- the name to be used for the commandgetName()
public boolean isRedoable()
isRedoable
in interface ICommand
ICommand.isRedoable()
public boolean isRelevant()
isRelevant
in interface ICommand
ICommand.isRelevant()
public boolean isUndoable()
isUndoable
in interface ICommand
ICommand.isUndoable()
public void redoCommand(IProgressMonitor monitor) throws CommandException
redoCommand
in interface ICommand
monitor
- 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.