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.


Method Index

 o getAttributes()
Fetch the collection of attributes this element contains.
 o getChild(int)
Fetch the element at the given index.
 o getDocument()
Fetch the document associated with this element.
 o getName()
Fetch the name of the element.
 o getParent()
Fetch the parent element.
 o getRange()
Get the portion of the document spanned by this element.
 o isLeaf()
Is this element a leaf element?
 o numChildren()
The number of child elements contained by this element.
 o positionToElementIndex(Position)
Get the child element index closest to the given position.

Methods

 o getDocument
 public abstract Document getDocument()
Fetch the document associated with this element.

 o getParent
 public abstract Element getParent()
Fetch the parent element. If the element is a root level element this returns null.

 o 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.

 o getAttributes
 public abstract Attributes getAttributes()
Fetch the collection of attributes this element contains.

 o 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.

 o positionToElementIndex
 public abstract int positionToElementIndex(Position pos)
Get the child element index closest to the given position.

 o 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.

 o getChild
 public abstract Element getChild(int index)
Fetch the element at the given index.

 o isLeaf
 public abstract boolean isLeaf()
Is this element a leaf element?


All Packages  Class Hierarchy  This Package  Previous  Next  Index