com.nwoods.jgo
Class UndoManager
java.lang.Object
com.nwoods.jgo.AbstractUndoableEdit
com.nwoods.jgo.CompoundEdit
com.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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UndoManager
public UndoManager()
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