JTP API Documentation

jtp.undo
Class SnapshotUndoManager

java.lang.Object
  |
  +--javax.swing.undo.AbstractUndoableEdit
        |
        +--javax.swing.undo.CompoundEdit
              |
              +--javax.swing.undo.UndoManager
                    |
                    +--jtp.undo.SnapshotUndoManager
All Implemented Interfaces:
EventListener, Serializable, UndoableEdit, UndoableEditListener
Direct Known Subclasses:
UntellUndoManager

public class SnapshotUndoManager
extends UndoManager

$RCSfile: SnapshotUndoManager.java,v $ Subclass of javax.swing.undo.UndoManager with added functionality that allows a user to roll back to a specific "snapshot". Last revised: $Date: 2002/10/30 06:34:38 $

See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.undo.CompoundEdit
edits
 
Fields inherited from class javax.swing.undo.AbstractUndoableEdit
RedoName, UndoName
 
Constructor Summary
SnapshotUndoManager()
           
 
Method Summary
 List getObjectsToldSinceSnapshot(Snapshot s)
           
 Snapshot getSnapshot()
          Returns a snapshot that can later be used to revert to this point in the edits.
 void revertToSnapshot(Snapshot s)
          Reverts to point identified by s.
 
Methods inherited from class javax.swing.undo.UndoManager
addEdit, canRedo, canUndo, canUndoOrRedo, discardAllEdits, editToBeRedone, editToBeUndone, end, getLimit, getRedoPresentationName, getUndoOrRedoPresentationName, getUndoPresentationName, redo, redoTo, setLimit, toString, trimEdits, trimForLimit, undo, undoableEditHappened, undoOrRedo, undoTo
 
Methods inherited from class javax.swing.undo.CompoundEdit
die, getPresentationName, isInProgress, isSignificant, lastEdit
 
Methods inherited from class javax.swing.undo.AbstractUndoableEdit
replaceEdit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SnapshotUndoManager

public SnapshotUndoManager()
Method Detail

getSnapshot

public Snapshot getSnapshot()
Returns a snapshot that can later be used to revert to this point in the edits.


revertToSnapshot

public void revertToSnapshot(Snapshot s)
                      throws CannotUndoException
Reverts to point identified by s. If s.getEdit() == null, undoes all edits in stack.

CannotUndoException

getObjectsToldSinceSnapshot

public List getObjectsToldSinceSnapshot(Snapshot s)

JTP API Documentation