roneditor.commands
Class DeleteHLNodeCommand

java.lang.Object
  extended by org.eclipse.gef.commands.Command
      extended by roneditor.commands.DeleteHLNodeCommand

public class DeleteHLNodeCommand
extends org.eclipse.gef.commands.Command

Command for removing a node from its parent RON. This is undoable.


Field Summary
private static java.lang.String DeleteCommand_Label
           
private  ronmodel.HLNode node
           
private  ronmodel.RON parent
           
 
Constructor Summary
DeleteHLNodeCommand(ronmodel.HLNode node)
           
 
Method Summary
 void execute()
          Executes the command by first hiding all views which display the element that will be removed.
 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
 

Field Detail

DeleteCommand_Label

private static final java.lang.String DeleteCommand_Label
See Also:
Constant Field Values

node

private final ronmodel.HLNode node

parent

private ronmodel.RON parent
Constructor Detail

DeleteHLNodeCommand

public DeleteHLNodeCommand(ronmodel.HLNode node)
Method Detail

execute

public void execute()
Executes the command by first hiding all views which display the element that will be removed. Then 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.

Overrides:
undo in class org.eclipse.gef.commands.Command

redo

public void redo()
Redoes the command by removing the object from its container again.

Overrides:
redo in class org.eclipse.gef.commands.Command