cdox.gui.undo
Class InsertUndoAction

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

public class InsertUndoAction
extends java.lang.Object
implements DoAction

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

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

Constructor Summary
InsertUndoAction(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()
          Inserts the element.
 void undo()
          Removes the element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InsertUndoAction

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

Parameters:
e - the element that is inserted.
c - the cover into which the element is inserted.
Method Detail

redo

public void redo()
Inserts the element.

Specified by:
redo in interface DoAction

undo

public void undo()
Removes the element.

Specified by:
undo 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