com.nwoods.jgo
Class UndoManager

java.lang.Object
  extended bycom.nwoods.jgo.AbstractUndoableEdit
      extended bycom.nwoods.jgo.CompoundEdit
          extended bycom.nwoods.jgo.UndoManager
All Implemented Interfaces:
java.io.Serializable, UndoableEdit
Direct Known Subclasses:
JGoUndoManager

public class UndoManager
extends CompoundEdit

This exists for compatibility with javax.swing.undo.UndoManager.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.nwoods.jgo.CompoundEdit
edits
 
Constructor Summary
UndoManager()
           
 
Method Summary
 boolean addEdit(UndoableEdit anEdit)
           
 boolean canRedo()
           
 boolean canUndo()
           
 void discardAllEdits()
           
protected  UndoableEdit editToBeRedone()
           
protected  UndoableEdit editToBeUndone()
           
 void end()
           
 int getLimit()
           
 java.lang.String getRedoPresentationName()
           
 java.lang.String getUndoPresentationName()
           
 void redo()
           
protected  void redoTo(UndoableEdit edit)
           
 void setLimit(int l)
           
protected  void trimEdits(int from, int to)
           
protected  void trimForLimit()
           
 void undo()
           
protected  void undoTo(UndoableEdit edit)
           
 
Methods inherited from class com.nwoods.jgo.CompoundEdit
die, getPresentationName, isInProgress, lastEdit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UndoManager

public UndoManager()
Method Detail

getLimit

public int getLimit()

discardAllEdits

public void discardAllEdits()

trimForLimit

protected void trimForLimit()

trimEdits

protected void trimEdits(int from,
                         int to)

setLimit

public void setLimit(int l)

editToBeUndone

protected UndoableEdit editToBeUndone()

editToBeRedone

protected UndoableEdit editToBeRedone()

undoTo

protected void undoTo(UndoableEdit edit)
               throws CannotUndoException
Throws:
CannotUndoException

redoTo

protected void redoTo(UndoableEdit edit)
               throws CannotRedoException
Throws:
CannotRedoException

undo

public void undo()
          throws CannotUndoException
Specified by:
undo in interface UndoableEdit
Overrides:
undo in class CompoundEdit
Throws:
CannotUndoException

canUndo

public boolean canUndo()
Specified by:
canUndo in interface UndoableEdit
Overrides:
canUndo in class CompoundEdit

redo

public void redo()
          throws CannotRedoException
Specified by:
redo in interface UndoableEdit
Overrides:
redo in class CompoundEdit
Throws:
CannotRedoException

canRedo

public boolean canRedo()
Specified by:
canRedo in interface UndoableEdit
Overrides:
canRedo in class CompoundEdit

addEdit

public boolean addEdit(UndoableEdit anEdit)
Specified by:
addEdit in interface UndoableEdit
Overrides:
addEdit in class CompoundEdit

end

public void end()
Overrides:
end in class CompoundEdit

getUndoPresentationName

public java.lang.String getUndoPresentationName()
Specified by:
getUndoPresentationName in interface UndoableEdit
Overrides:
getUndoPresentationName in class CompoundEdit

getRedoPresentationName

public java.lang.String getRedoPresentationName()
Specified by:
getRedoPresentationName in interface UndoableEdit
Overrides:
getRedoPresentationName in class CompoundEdit