public static class AbstractDocument.ElementEdit extends AbstractUndoableEditimplements DocumentEvent .ElementChange
RedoName, UndoName| Constructor and Description |
|---|
ElementEdit(Element
Constructs an edit record.
|
| Modifier and Type | Method and Description |
|---|---|
Element |
getChildrenAdded()
Gets a list of children that were added.
|
Element |
getChildrenRemoved()
Gets a list of children that were removed.
|
Element |
getElement()
Returns the underlying element.
|
int |
getIndex()
Returns the index into the list of elements.
|
void |
redo()
Redoes a change.
|
void |
undo()
Undoes a change.
|
addEdit, canRedo, canUndo, die, getPresentationName, getRedoPresentationName, getUndoPresentationName, isSignificant, replaceEdit, toStringpublic ElementEdit(Elemente, int index, Element [] removed, Element [] added)
e - the element
index - the index into the model >= 0
removed - a set of elements that were removed
added - a set of elements that were added
public ElementgetElement()
getElement in interface
DocumentEvent.ElementChange
public int getIndex()
getIndex in interface
DocumentEvent.ElementChange
public Element[] getChildrenRemoved()
getChildrenRemoved in interface
DocumentEvent.ElementChange
public Element[] getChildrenAdded()
getChildrenAdded in interface
DocumentEvent.ElementChange
public void redo()
throws CannotRedoException
redo in interface
UndoableEdit
redo in class
AbstractUndoableEdit
CannotRedoException - if the change cannot be redone
AbstractUndoableEdit.canRedo()
public void undo()
throws CannotUndoException
undo in interface
UndoableEdit
undo in class
AbstractUndoableEdit
CannotUndoException - if the change cannot be undone
AbstractUndoableEdit.canUndo()