- Enclosing class:
public static class AbstractDocument.ElementEdit extends AbstractUndoableEdit implements DocumentEvent.ElementChange
An implementation of ElementChange that can be added to the document event.
Modifier and Type Method Description
getChildrenAdded()Gets a list of children that were added.
getChildrenRemoved()Gets a list of children that were removed.
getElement()Returns the underlying element.
getIndex()Returns the index into the list of elements.
redo()Redoes a change.
undo()Undoes a change.
Methods declared in class javax.swing.undo.AbstractUndoableEdit
addEdit, canRedo, canUndo, die, getPresentationName, getRedoPresentationName, getUndoPresentationName, isSignificant, replaceEdit, toString
Constructs an edit record. This does not modify the element so it can safely be used to catch up a view to the current model state for views that just attached to a model.
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 Element getElement()Returns the underlying element.
public int getIndex()Returns the index into the list of elements.
public Element getChildrenRemoved()Gets a list of children that were removed.
public Element getChildrenAdded()Gets a list of children that were added.
public void redo() throws CannotRedoExceptionRedoes a change.
public void undo() throws CannotUndoExceptionUndoes a change.