cdox.gui.undo
Class RemoveAction

java.lang.Object
  extended bycdox.gui.undo.RemoveAction
All Implemented Interfaces:
DoAction

public class RemoveAction
extends java.lang.Object
implements DoAction

This class represents a remove action. Redo will remove the element again, undo will insert it.

Version:
May 16th 2002
Author:
Rutger Bezema, Andreas Schmitz

Constructor Summary
RemoveAction(Element e, Cover c)
          Creates a new one.
 
Method Summary
 void invalidate()
          This method invalidates the action, which typically means that the undo/redo methods do nothing.
 void redo()
          Removes the element.
 void undo()
          Inserts the element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoveAction

public RemoveAction(Element e,
                    Cover c)
Creates a new one.

Parameters:
e - the element that is removed.
c - the cover from which the element is removed.
Method Detail

undo

public void undo()
Inserts the element.

Specified by:
undo in interface DoAction

redo

public void redo()
Removes the element.

Specified by:
redo in interface DoAction

invalidate

public void invalidate()
Description copied from interface: DoAction
This method invalidates the action, which typically means that the undo/redo methods do nothing.

Specified by:
invalidate in interface DoAction