|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--harmonic.mz.manager.UndoManager
The manager of the undo/redo system.
The undo/redo system is based on keeping an object that holds the old state of an object that is about to be changed. Before changing the state, create the appropriate type of undo node, and add to the UndoManager. The undo node is cappable of restoring the old state if it is actavated. When the undo node is actavated, it creates another undo node that has the current state of the object (before the undo is done), and puts this in the redo list. Thus the same type of undo node is used for both undo and redo.
| Method Summary | |
void |
addActionHistoryListener(ActionHistoryListener l)
Registers a listener to changes in the undo history |
void |
addUndo(UndoRecord ur)
Add an undo to the undo stack. |
void |
addUndo(UndoRecord ur,
UndoGroup group)
Add an undo record to the given undo group |
UndoMark |
addUndoMark()
Create a mark in undo history. |
void |
clearUndoBlock()
Clears the current undo block, so that addUndo() will add the node directly to the undo history. |
java.util.Vector |
getRedoProphacy()
Returns list of UndoRecords that will make redos. |
int |
getRedoProphacySize()
Return number of items on redo stack |
java.util.Vector |
getUndoHistory()
Returns list of UndoRecords that will make undos. |
int |
getUndoHistorySize()
Return number of items on undo stack |
void |
notifyListeners()
Notifies listeners |
void |
purgeUndo()
Purge the undo stack. |
void |
redo()
Execute the redo at the end of the redo list, and add add the corresponding undo back onto the undo list |
void |
removeActionHistoryListener(ActionHistoryListener l)
Un-Registers a listener to changes in the undo history |
void |
setUndoBlock()
This creates an undo group and sets an internal variable that will make addUndo() add the given undo reference to the undo group. |
void |
setUndoBlock(java.lang.String name)
|
void |
undo()
Execute the undo record at the top of the undo stack, and create a redo record and add to redo list. |
void |
undoToMark(UndoMark mark)
Undo everything added after the undo mark was added. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public void addActionHistoryListener(ActionHistoryListener l)
public void removeActionHistoryListener(ActionHistoryListener l)
public void notifyListeners()
public void purgeUndo()
public void setUndoBlock()
public void setUndoBlock(java.lang.String name)
public void clearUndoBlock()
public UndoMark addUndoMark()
public void undoToMark(UndoMark mark)
public java.util.Vector getRedoProphacy()
public java.util.Vector getUndoHistory()
public int getUndoHistorySize()
public int getRedoProphacySize()
public void addUndo(UndoRecord ur,
UndoGroup group)
public void addUndo(UndoRecord ur)
public void undo()
public void redo()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||