cdox.gui.undo
Class ResizeAction

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

public class ResizeAction
extends java.lang.Object
implements DoAction

This class represents a resizing action. Redo will set the size to the new size, undo will reset it to the old size.

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

Constructor Summary
ResizeAction(Element e, java.awt.Dimension src, java.awt.Dimension dest)
          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()
          Sets the size to the destination size.
 void undo()
          Sets the size to the old size.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResizeAction

public ResizeAction(Element e,
                    java.awt.Dimension src,
                    java.awt.Dimension dest)
Creates a new one.

Parameters:
e - the element that is resized.
src - the old size of the element.
dest - the new size of the element.
Method Detail

redo

public void redo()
Sets the size to the destination size.

Specified by:
redo in interface DoAction

undo

public void undo()
Sets the size to the old size.

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