javax.swing.event
Interface DocumentEvent.ElementChange

All Known Implementing Classes:
AbstractDocument.ElementEdit sample code for javax.swing.text.AbstractDocument.ElementEdit definition code for javax.swing.text.AbstractDocument.ElementEdit
Enclosing interface:
DocumentEvent sample code for javax.swing.event.DocumentEvent definition code for javax.swing.event.DocumentEvent

public static interface DocumentEvent.ElementChange

Describes changes made to a specific element.


Method Summary
 Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element [] getChildrenAdded sample code for javax.swing.event.DocumentEvent.ElementChange.getChildrenAdded() definition code for javax.swing.event.DocumentEvent.ElementChange.getChildrenAdded() ()
          Gets the child elements that were added to the given parent element.
 Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element [] getChildrenRemoved sample code for javax.swing.event.DocumentEvent.ElementChange.getChildrenRemoved() definition code for javax.swing.event.DocumentEvent.ElementChange.getChildrenRemoved() ()
          Gets the child elements that were removed from the given parent element.
 Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element getElement sample code for javax.swing.event.DocumentEvent.ElementChange.getElement() definition code for javax.swing.event.DocumentEvent.ElementChange.getElement() ()
          Returns the element represented.
 int getIndex sample code for javax.swing.event.DocumentEvent.ElementChange.getIndex() definition code for javax.swing.event.DocumentEvent.ElementChange.getIndex() ()
          Fetches the index within the element represented.
 

Method Detail

getElement sample code for javax.swing.event.DocumentEvent.ElementChange.getElement() definition code for javax.swing.event.DocumentEvent.ElementChange.getElement()

Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element  getElement()
Returns the element represented. This is the element that was changed.

Returns:
the element

getIndex sample code for javax.swing.event.DocumentEvent.ElementChange.getIndex() definition code for javax.swing.event.DocumentEvent.ElementChange.getIndex()

int getIndex()
Fetches the index within the element represented. This is the location that children were added and/or removed.

Returns:
the index >= 0

getChildrenRemoved sample code for javax.swing.event.DocumentEvent.ElementChange.getChildrenRemoved() definition code for javax.swing.event.DocumentEvent.ElementChange.getChildrenRemoved()

Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element [] getChildrenRemoved()
Gets the child elements that were removed from the given parent element. The element array returned is sorted in the order that the elements used to lie in the document, and must be contiguous.

Returns:
the child elements

getChildrenAdded sample code for javax.swing.event.DocumentEvent.ElementChange.getChildrenAdded() definition code for javax.swing.event.DocumentEvent.ElementChange.getChildrenAdded()

Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element [] getChildrenAdded()
Gets the child elements that were added to the given parent element. The element array returned is in the order that the elements lie in the document, and must be contiguous.

Returns:
the child elements