Element (Java SE 19 & JDK 19) (original) (raw)

All Known Implementing Classes:

[AbstractDocument.AbstractElement](AbstractDocument.AbstractElement.html "class in javax.swing.text"), [AbstractDocument.BranchElement](AbstractDocument.BranchElement.html "class in javax.swing.text"), [AbstractDocument.LeafElement](AbstractDocument.LeafElement.html "class in javax.swing.text"), [DefaultStyledDocument.SectionElement](DefaultStyledDocument.SectionElement.html "class in javax.swing.text"), [HTMLDocument.BlockElement](html/HTMLDocument.BlockElement.html "class in javax.swing.text.html"), [HTMLDocument.RunElement](html/HTMLDocument.RunElement.html "class in javax.swing.text.html")


public interface Element

Interface to describe a structural piece of a document. It is intended to capture the spirit of an SGML element.

Fetches the collection of attributes this element contains.
Fetches the document associated with this element.
[getElement](#getElement%28int%29)(int index)
Fetches the child element at the given index.
int
Gets the number of child elements contained by this element.
int
[getElementIndex](#getElementIndex%28int%29)(int offset)
Gets the child element index closest to the given offset.
int
Fetches the offset from the beginning of the document that this element ends at.
[getName](#getName%28%29)()
Fetches the name of the element.
Fetches the parent element.
int
Fetches the offset from the beginning of the document that this element begins at.
boolean
[isLeaf](#isLeaf%28%29)()
Is this element a leaf element?