|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jhotdraw.util.UndoManager
public class UndoManager
This class manages all the undoable commands. It keeps track of all the modifications done through user interactions.
Field Summary | |
---|---|
static int |
DEFAULT_BUFFER_SIZE
Maximum default buffer size for undo and redo stack |
Constructor Summary | |
---|---|
UndoManager()
|
|
UndoManager(int newUndoStackSize)
|
Method Summary | |
---|---|
void |
clearRedos()
|
void |
clearRedos(DrawingView checkDV)
Removes all redo activities that operate on the given DrawingView. |
void |
clearUndos()
|
void |
clearUndos(DrawingView checkDV)
Removes all undo activities that operate on the given DrawingView. |
int |
getRedoSize()
Returns the current size of redo buffer. |
int |
getUndoSize()
Returns the current size of undo buffer. |
boolean |
isRedoable()
|
boolean |
isUndoable()
|
Undoable |
popRedo()
Throw NoSuchElementException if there is none |
Undoable |
popUndo()
Throw NoSuchElementException if there is none |
void |
pushRedo(Undoable redoActivity)
|
void |
pushUndo(Undoable undoActivity)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_BUFFER_SIZE
Constructor Detail |
---|
public UndoManager()
public UndoManager(int newUndoStackSize)
Method Detail |
---|
public void pushUndo(Undoable undoActivity)
public void pushRedo(Undoable redoActivity)
public boolean isUndoable()
public boolean isRedoable()
public int getUndoSize()
public int getRedoSize()
public Undoable popUndo()
public Undoable popRedo()
public void clearUndos()
public void clearRedos()
public void clearUndos(DrawingView checkDV)
checkDV
- DrawingView which is compared undo's DrawingViewpublic void clearRedos(DrawingView checkDV)
checkDV
- DrawingView which is compared redo's DrawingView
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |