|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmauda.undoredo.UndoRedoInfo
public class UndoRedoInfo
Stores several UndoRedoUnits in an undo/redo-vector. Therefore this class can hold the whole undo/redo-information for specific objects like operations, fibheaps, etc.
| Field Summary | |
|---|---|
boolean |
DEBUG
|
| Constructor Summary | |
|---|---|
UndoRedoInfo()
Creates a new UndoRedoInfo. |
|
| Method Summary | |
|---|---|
void |
addUnit(UndoRedoUnit uru)
Adds an UndoRedoUnit to the undo/redo-vector |
boolean |
canRedo()
Checks if a redo is possible |
boolean |
canUndo()
Checks if an undo is possible |
void |
clear(java.util.Vector fill)
Clears the object-vector, and adds fill to it. |
void |
clearFollowing(int p,
java.util.Vector v)
Removes all following objects from the object-vector after the position p |
int |
getRedoJumpPosition()
Returns the maximum possible position after a redo |
int |
getUndoJumpPosition()
Returns the maximum possible position after an undo. |
UndoRedoUnit |
redo(java.util.Vector v)
Redos this unit |
void |
storeChange(int p,
java.util.Vector v,
java.lang.Object newObject)
Performs a change on the vector. |
UndoRedoUnit |
undo(java.util.Vector v)
Undos this unit |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public boolean DEBUG
| Constructor Detail |
|---|
public UndoRedoInfo()
| Method Detail |
|---|
public void storeChange(int p,
java.util.Vector v,
java.lang.Object newObject)
p - The position of the changev - The vector to perform the change onnewObject - The object to append.public void addUnit(UndoRedoUnit uru)
uru - A UndoRedoUnitpublic UndoRedoUnit undo(java.util.Vector v)
v - The object-vector
public UndoRedoUnit redo(java.util.Vector v)
v - The object-vector
public int getUndoJumpPosition()
public int getRedoJumpPosition()
public boolean canUndo()
public boolean canRedo()
public void clear(java.util.Vector fill)
fill - the new object-vector
public void clearFollowing(int p,
java.util.Vector v)
p - clear-positionv - the object-vector
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||