javax.swing.text

Class AbstractDocument.ElementEdit

public static class AbstractDocument.ElementEdit extends AbstractUndoableEdit implements DocumentEvent.ElementChange

An implementation of {@link DocumentEvent.ElementChange} to be added to {@link DefaultDocumentEvent}s.
Constructor Summary
ElementEdit(Element elem, int index, Element[] removed, Element[] added)
Creates a new ElementEdit.
Method Summary
Element[]getChildrenAdded()
Returns the added elements.
Element[]getChildrenRemoved()
Returns the removed elements.
ElementgetElement()
Returns the changed element.
intgetIndex()
Returns the index of the change.

Constructor Detail

ElementEdit

public ElementEdit(Element elem, int index, Element[] removed, Element[] added)
Creates a new ElementEdit.

Parameters: elem the changed element index the index of the change removed the removed elements added the added elements

Method Detail

getChildrenAdded

public Element[] getChildrenAdded()
Returns the added elements.

Returns: the added elements

getChildrenRemoved

public Element[] getChildrenRemoved()
Returns the removed elements.

Returns: the removed elements

getElement

public Element getElement()
Returns the changed element.

Returns: the changed element

getIndex

public int getIndex()
Returns the index of the change.

Returns: the index of the change