Package org.jgraph.graph
Class GraphUndoManager
java.lang.Object
javax.swing.undo.AbstractUndoableEdit
javax.swing.undo.CompoundEdit
javax.swing.undo.UndoManager
org.jgraph.graph.GraphUndoManager
- All Implemented Interfaces:
Serializable
,EventListener
,UndoableEditListener
,UndoableEdit
An UndoManager that may be shared among multiple GraphLayoutCache's.
- See Also:
-
Field Summary
Fields inherited from class javax.swing.undo.CompoundEdit
edits
Fields inherited from class javax.swing.undo.AbstractUndoableEdit
RedoName, UndoName
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Overridden to preserve usual semantics: returns true if a redo operation would be successful now for the given view, false otherwiseboolean
Overridden to preserve usual semantics: returns true if an undo operation would be successful now for the given view, false otherwiseprotected UndoableEdit
editToBeRedone
(Object source) protected UndoableEdit
editToBeUndone
(Object source) protected UndoableEdit
nextEditToBeRedone
(UndoableEdit current) Returns the the next significant edit wrt to current to be redone if redo is called.protected UndoableEdit
nextEditToBeUndone
(UndoableEdit current) Returns the the next significant edit wrt to current to be undone if undo is called.void
If thisUndoManager
isinProgress
, redoes the last significantUndoableEdit
with respect to source or after, and all insignificant edits up to it.void
If this UndoManager is inProgress, undo the last significant UndoableEdit wrt to source, and all insignificant edits back to it.Methods inherited from class javax.swing.undo.UndoManager
addEdit, canRedo, canUndo, canUndoOrRedo, discardAllEdits, editToBeRedone, editToBeUndone, end, getLimit, getRedoPresentationName, getUndoOrRedoPresentationName, getUndoPresentationName, redo, redoTo, setLimit, toString, trimEdits, trimForLimit, undo, undoableEditHappened, undoOrRedo, undoTo
Methods inherited from class javax.swing.undo.CompoundEdit
die, getPresentationName, isInProgress, isSignificant, lastEdit
Methods inherited from class javax.swing.undo.AbstractUndoableEdit
replaceEdit
-
Constructor Details
-
GraphUndoManager
public GraphUndoManager()
-
-
Method Details
-
canUndo
Overridden to preserve usual semantics: returns true if an undo operation would be successful now for the given view, false otherwise -
canRedo
Overridden to preserve usual semantics: returns true if a redo operation would be successful now for the given view, false otherwise -
undo
If this UndoManager is inProgress, undo the last significant UndoableEdit wrt to source, and all insignificant edits back to it. Updates indexOfNextAdd accordingly.If not inProgress, indexOfNextAdd is ignored and super's routine is called.
- See Also:
-
editToBeUndone
-
nextEditToBeUndone
Returns the the next significant edit wrt to current to be undone if undo is called. May return null. -
redo
If thisUndoManager
isinProgress
, redoes the last significantUndoableEdit
with respect to source or after, and all insignificant edits up to it. UpdatesindexOfNextAdd
accordingly.If not
inProgress
,indexOfNextAdd
is ignored and super's routine is called. -
editToBeRedone
-
nextEditToBeRedone
Returns the the next significant edit wrt to current to be redone if redo is called. May return null.
-