|
JGraph X 1.0.2.8 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mxgraph.util.mxEventSource
com.mxgraph.util.mxUndoManager
public class mxUndoManager
Implements a 2-dimensional rectangle with double precision coordinates.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.mxgraph.util.mxEventSource |
---|
mxEventSource.mxIEventListener |
Field Summary | |
---|---|
protected List |
history
List that contains the steps of the command history. |
protected int |
indexOfNextAdd
Index of the element to be added next. |
protected int |
size
Maximum command history size. |
Fields inherited from class com.mxgraph.util.mxEventSource |
---|
eventListeners, eventsEnabled, eventSource |
Constructor Summary | |
---|---|
mxUndoManager()
Constructs a new undo manager with a default history size. |
|
mxUndoManager(int size)
Constructs a new undo manager for the specified size. |
Method Summary | |
---|---|
boolean |
canRedo()
Returns true if a redo is possible. |
boolean |
canUndo()
Returns true if an undo is possible. |
boolean |
isEmpty()
|
void |
redo()
Redoes the last change. |
void |
reset()
Resets the command history. |
protected void |
trim()
Removes all pending steps after indexOfNextAdd from the history, invoking die on each edit. |
void |
undo()
Undoes the last change. |
void |
undoableEditHappened(mxUndoableEdit undoableEdit)
Method to be called to add new undoable edits to the history. |
Methods inherited from class com.mxgraph.util.mxEventSource |
---|
addListener, fireEvent, fireEvent, fireEvent, getEventSource, isEventsEnabled, removeListener, removeListener, setEventsEnabled, setEventSource |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int size
protected List history
protected int indexOfNextAdd
Constructor Detail |
---|
public mxUndoManager()
public mxUndoManager(int size)
Method Detail |
---|
public boolean isEmpty()
public void reset()
public boolean canUndo()
public void undo()
public boolean canRedo()
public void redo()
public void undoableEditHappened(mxUndoableEdit undoableEdit)
protected void trim()
|
JGraph X 1.0.2.8 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |