| java.lang.Object golfShop.business.cart.UndoRedoStack
UndoRedoStack | protected UndoRedoStack(Hashtable initialVersion)(Code) | | Create a new UndoRedoStack. To avoid uninitialized states, you
must pass in the initial version of the hashtable you want to track.
Every time you change this object, call StoreNewVersion().
If you want to undo, call UndoToPreviousVersion(). This returns
the previous version of the hashtable; you should use this in your
program as the new value of the hashtable. If you want to redo,
call RedoToNewerVersion(). This returns a newer version of the
hashtable.
author: Andrew John Parameters: initialVersion - The starting version of the hashtable to betracked. version: $Revision: 1.1 |
canRedo | protected boolean canRedo()(Code) | | |
canUndo | protected boolean canUndo()(Code) | | |
storeNewVersion | protected void storeNewVersion(Hashtable newVersion)(Code) | | After you make a change to your object, call this function to
remember the current version. The previous version is saved for
so that you can do an undo.
Parameters: newVersion - The current version of the object to be tracked. |
|
|