com.mxgraph.util
Class mxUndoManager
- java.lang.Object
-
- com.mxgraph.util.mxEventSource
-
- com.mxgraph.util.mxUndoManager
-
public class mxUndoManager extends mxEventSource
Implements an undo history. This class fires the following events: mxEvent.CLEAR fires after clear was executed. The event has no properties. mxEvent.UNDO fires afer a significant edit was undone in undo. Theeditproperty contains the mxUndoableEdit that was undone. mxEvent.REDO fires afer a significant edit was redone in redo. Theeditproperty contains the mxUndoableEdit that was redone. mxEvent.ADD fires after an undoable edit was added to the history. Theeditproperty contains the mxUndoableEdit that was added.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.mxgraph.util.mxEventSource
mxEventSource.mxIEventListener
-
-
Constructor Summary
Constructors Constructor and Description 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
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleancanRedo()Returns true if a redo is possible.booleancanUndo()Returns true if an undo is possible.voidclear()Clears the command history.booleanisEmpty()voidredo()Redoes the last change.voidundo()Undoes the last change.voidundoableEditHappened(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, getEventSource, isEventsEnabled, removeListener, removeListener, setEventsEnabled, setEventSource
-
-
-
-
Constructor Detail
-
mxUndoManager
public mxUndoManager()
Constructs a new undo manager with a default history size.
-
mxUndoManager
public mxUndoManager(int size)
Constructs a new undo manager for the specified size.
-
-
Method Detail
-
isEmpty
public boolean isEmpty()
-
clear
public void clear()
Clears the command history.
-
canUndo
public boolean canUndo()
Returns true if an undo is possible.
-
undo
public void undo()
Undoes the last change.
-
canRedo
public boolean canRedo()
Returns true if a redo is possible.
-
redo
public void redo()
Redoes the last change.
-
undoableEditHappened
public void undoableEditHappened(mxUndoableEdit undoableEdit)
Method to be called to add new undoable edits to the history.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG