All Packages Class Hierarchy This Package Previous Next Index
Interface com.sun.java.swing.text.Element
- public interface Element
Interface to describe a structural piece of a document. It
is intended to capture the spirit of an SGML element.
-
getAttributes()
- Fetch the collection of attributes this element contains.
-
getChild(int)
- Fetch the element at the given index.
-
getDocument()
- Fetch the document associated with this element.
-
getName()
- Fetch the name of the element.
-
getParent()
- Fetch the parent element.
-
getRange()
- Get the portion of the document spanned by this element.
-
isLeaf()
- Is this element a leaf element?
-
numChildren()
- The number of child elements contained by this element.
-
positionToElementIndex(Position)
- Get the child element index closest to the given position.
getDocument
public abstract Document getDocument()
- Fetch the document associated with this element.
getParent
public abstract Element getParent()
- Fetch the parent element. If the element is a root level
element this returns null.
getName
public abstract String getName()
- Fetch the name of the element. If the element is used to
represent some type of structure, this would be the type
name.
getAttributes
public abstract Attributes getAttributes()
- Fetch the collection of attributes this element contains.
getRange
public abstract Range getRange()
- Get the portion of the document spanned by this element.
If this element contains children, the span will be the
aggregate of the span of the children.
positionToElementIndex
public abstract int positionToElementIndex(Position pos)
- Get the child element index closest to the given position.
numChildren
public abstract int numChildren()
- The number of child elements contained by this element.
If this element is a leaf, a count of zero is returned.
getChild
public abstract Element getChild(int index)
- Fetch the element at the given index.
isLeaf
public abstract boolean isLeaf()
- Is this element a leaf element?
All Packages Class Hierarchy This Package Previous Next Index