roneditor.commands
Class DeleteTokenCommand
java.lang.Object
org.eclipse.gef.commands.Command
roneditor.commands.DeleteTokenCommand
public class DeleteTokenCommand
- extends org.eclipse.gef.commands.Command
Command for removing a token from its parent place. This is undoable.
Method Summary |
void |
execute()
The child gets removed from its parent. |
void |
redo()
Redoes the command by removing the object from its container again. |
void |
undo()
Undoes the command by readding the previously removed object to its
former container that execute() has saved. |
Methods inherited from class org.eclipse.gef.commands.Command |
canExecute, canUndo, chain, dispose, getDebugLabel, getLabel, setDebugLabel, setLabel |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DeleteCommand_Label
private static final java.lang.String DeleteCommand_Label
- See Also:
- Constant Field Values
token
private final ronmodel.Token token
parent
private ronmodel.HLPlace parent
DeleteTokenCommand
public DeleteTokenCommand(ronmodel.Token token)
execute
public void execute()
- The child gets removed from its parent. The container is stored for undoing purposes.
- Overrides:
execute
in class org.eclipse.gef.commands.Command
undo
public void undo()
- Undoes the command by readding the previously removed object to its
former container that
execute()
has saved.
(non-Javadoc)
- Overrides:
undo
in class org.eclipse.gef.commands.Command
- See Also:
Command.undo()
redo
public void redo()
- Redoes the command by removing the object from its container again.
- Overrides:
redo
in class org.eclipse.gef.commands.Command