cdox.gui.undo
Class FotoEditAction

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

public class FotoEditAction
extends java.lang.Object
implements DoAction

This class represents the undo/redo action for an Image-correction. This can be blur, sharpen, alphacorrection, contrast or brightness.

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

Constructor Summary
FotoEditAction(CDoxFrame cf, ImageElement el, java.lang.String oKey, java.lang.String nKey)
          Creates a new FotoEditAction which stores the key (id) to the oldImage and the key to the newImage.
 
Method Summary
 void invalidate()
          This method invalidates the action, which typically means that the undo/redo methods do nothing.
 void redo()
          Resets the newKey to the ImageElement.
 void undo()
          Resets the oldKey to the ImageElement.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FotoEditAction

public FotoEditAction(CDoxFrame cf,
                      ImageElement el,
                      java.lang.String oKey,
                      java.lang.String nKey)
Creates a new FotoEditAction which stores the key (id) to the oldImage and the key to the newImage. At undo the oldKey is set to the ImageElement, redo sets the new key.

Parameters:
cf - the CDoxFrame
el - the ImageElement which has been corrected,
oKey - the oldKey which represents a unique id to an (temp)Image on disk
nKey - the newKey which represents a unique id to an (temp)Image on disk
Method Detail

undo

public void undo()
Resets the oldKey to the ImageElement.

Specified by:
undo in interface DoAction

redo

public void redo()
Resets the newKey to the ImageElement.

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