public class UndoManager
extends java.lang.Object
Diagram.getUndoManager()
method of the
Diagram
class.Modifier and Type | Method and Description |
---|---|
CommandHistory |
getHistory()
Gets a reference to the list of commands stored for later undo/redo.
|
boolean |
getUndoEnabled()
Gets a value indicating whether actions performed on the diagram
can be undone or redone.
|
void |
redo()
Redoes the next action in the undo/redo queue.
|
void |
setUndoEnabled(boolean value)
Enables or disabled undo/redo.
|
CompositeCmd |
startComposite(java.lang.String title)
Starts recording a composite undo/redo command.
|
CompositeCmd |
startComposite(java.lang.String title,
boolean saveZOrder)
Starts recording a composite undo/redo command.
|
void |
undo()
Undoes the previous action in the undo/redo queue.
|
public boolean getUndoEnabled()
true
if undo/redo is enabled,
otherwise false
.public void setUndoEnabled(boolean value)
value
- true
if JDiagram should track modifications
done on the diagram so that they can be undone or redone later,
otherwise false
.public void undo()
public void redo()
public CommandHistory getHistory()
CommandHistory
object representing the undo/redo queue.public CompositeCmd startComposite(java.lang.String title)
title
- A String
containing the title
of the composite command.CompositeCmd
object representing the composite command.public CompositeCmd startComposite(java.lang.String title, boolean saveZOrder)
title
- A String
containing the title
of the composite command.CompositeCmd
object representing the composite command.