public class mxUndoableEdit extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
mxUndoableEdit.mxUndoableChange
Defines the requirements for an undoable change.
|
Modifier and Type | Field and Description |
---|---|
protected List<mxUndoableEdit.mxUndoableChange> |
changes
Holds the list of changes that make up this undoable edit.
|
protected boolean |
redone
Specifies the state of the undoable edit.
|
protected boolean |
significant
Specifies this undoable edit is significant.
|
protected Object |
source
Holds the source of the undoable edit.
|
protected boolean |
undone
Specifies the state of the undoable edit.
|
Constructor and Description |
---|
mxUndoableEdit(Object source)
Constructs a new undoable edit for the given source.
|
mxUndoableEdit(Object source,
boolean significant)
Constructs a new undoable edit for the given source.
|
Modifier and Type | Method and Description |
---|---|
void |
add(mxUndoableEdit.mxUndoableChange change)
Adds the specified change to this edit.
|
void |
die()
Hook to free resources after the edit has been removed from the command
history.
|
void |
dispatch()
Hook to notify any listeners of the changes after an undo or redo
has been carried out.
|
List<mxUndoableEdit.mxUndoableChange> |
getChanges() |
Object |
getSource() |
boolean |
isEmpty()
Returns true if the this edit contains no changes.
|
boolean |
isRedone() |
boolean |
isSignificant() |
boolean |
isUndone() |
void |
redo() |
void |
undo() |
protected Object source
protected List<mxUndoableEdit.mxUndoableChange> changes
protected boolean significant
protected boolean undone
protected boolean redone
public mxUndoableEdit(Object source)
public mxUndoableEdit(Object source, boolean significant)
public void dispatch()
public void die()
public Object getSource()
public List<mxUndoableEdit.mxUndoableChange> getChanges()
public boolean isSignificant()
public boolean isUndone()
public boolean isRedone()
public boolean isEmpty()
public void add(mxUndoableEdit.mxUndoableChange change)
public void undo()
public void redo()
Copyright (c) 2010-2017 Gaudenz Alder, JGraph Ltd. All rights reserved.