public static class AbstractDocument.ElementEdit extends AbstractUndoableEdit implements DocumentEvent.ElementChange
An implementation of ElementChange that can be added to the document event.
RedoName, UndoName public ElementEdit(Element e,
int index,
Element[] removed,
Element[] added) 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 elementindex - the index into the model >= 0removed - a set of elements that were removedadded - a set of elements that were addedpublic Element getElement()
Returns the underlying element.
getElement in interface DocumentEvent.ElementChange
public int getIndex()
Returns the index into the list of elements.
getIndex in interface DocumentEvent.ElementChange
public Element[] getChildrenRemoved()
Gets a list of children that were removed.
getChildrenRemoved in interface DocumentEvent.ElementChange
public Element[] getChildrenAdded()
Gets a list of children that were added.
getChildrenAdded in interface DocumentEvent.ElementChange
public void redo()
throws CannotRedoException Redoes a change.
redo in interface UndoableEdit
redo in class AbstractUndoableEdit
CannotRedoException - if the change cannot be redoneAbstractUndoableEdit.canRedo()public void undo()
throws CannotUndoException Undoes a change.
undo in interface UndoableEdit
undo in class AbstractUndoableEdit
CannotUndoException - if the change cannot be undoneAbstractUndoableEdit.canUndo()
© 1993–2017, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.