|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.swing.text.AbstractDocument.AbstractElement
javax.swing.text.AbstractDocument.LeafElement
public class AbstractDocument.LeafElement
An implementation of Element that represents a leaf in the
document structure. This is used to actually store content.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface javax.swing.text.AttributeSet |
|---|
AttributeSet.CharacterAttribute, AttributeSet.ColorAttribute, AttributeSet.FontAttribute, AttributeSet.ParagraphAttribute |
| Field Summary |
|---|
| Fields inherited from interface javax.swing.text.AttributeSet |
|---|
NameAttribute, ResolveAttribute |
| Constructor Summary | |
|---|---|
AbstractDocument.LeafElement(Element parent,
AttributeSet attributes,
int start,
int end)
Creates a new LeafElement. |
|
| Method Summary | |
|---|---|
Enumeration |
children()
Returns null since LeafElements cannot have
children. |
boolean |
getAllowsChildren()
Returns false since LeafElements cannot have
children. |
Element |
getElement(int index)
Returns null since LeafElements cannot have
children. |
int |
getElementCount()
Returns 0 since LeafElements cannot have
children. |
int |
getElementIndex(int offset)
Returns -1 since LeafElements cannot have
children. |
int |
getEndOffset()
Returns the end offset of this Element inside the
document. |
String |
getName()
Returns the name of this Element. |
int |
getStartOffset()
Returns the start offset of this Element inside the
document. |
boolean |
isLeaf()
Returns true. |
String |
toString()
Returns a string representation of this Element. |
| Methods inherited from class javax.swing.text.AbstractDocument.AbstractElement |
|---|
addAttribute, addAttributes, containsAttribute, containsAttributes, copyAttributes, dump, getAttribute, getAttributeCount, getAttributeNames, getAttributes, getChildAt, getChildCount, getDocument, getIndex, getParent, getParentElement, getResolveParent, isDefined, isEqual, removeAttribute, removeAttributes, removeAttributes, setResolveParent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractDocument.LeafElement(Element parent,
AttributeSet attributes,
int start,
int end)
LeafElement.
parent - the parent of this LeafElementattributes - the attributes to be setstart - the start index of this element inside the document modelend - the end index of this element inside the document model| Method Detail |
|---|
public Enumeration children()
null since LeafElements cannot have
children.
children in interface TreeNodechildren in class AbstractDocument.AbstractElementnull since LeafElements cannot have
childrenpublic boolean getAllowsChildren()
false since LeafElements cannot have
children.
getAllowsChildren in interface TreeNodegetAllowsChildren in class AbstractDocument.AbstractElementfalse since LeafElements cannot have
childrenpublic Element getElement(int index)
null since LeafElements cannot have
children.
getElement in interface ElementgetElement in class AbstractDocument.AbstractElementindex - the index of the requested child element
null since LeafElements cannot have
childrenpublic int getElementCount()
0 since LeafElements cannot have
children.
getElementCount in interface ElementgetElementCount in class AbstractDocument.AbstractElement0 since LeafElements cannot have
childrenpublic int getElementIndex(int offset)
-1 since LeafElements cannot have
children.
getElementIndex in interface ElementgetElementIndex in class AbstractDocument.AbstractElementoffset - the offset for which the responsible element is searched
-1 since LeafElements cannot have
childrenpublic int getEndOffset()
Element inside the
document.
getEndOffset in interface ElementgetEndOffset in class AbstractDocument.AbstractElementElement inside the
documentpublic String getName()
Element. This is
AbstractDocument.ContentElementName in this case.
getName in interface ElementgetName in class AbstractDocument.AbstractElementElementpublic int getStartOffset()
Element inside the
document.
getStartOffset in interface ElementgetStartOffset in class AbstractDocument.AbstractElementElement inside the
documentpublic boolean isLeaf()
true.
isLeaf in interface ElementisLeaf in interface TreeNodeisLeaf in class AbstractDocument.AbstractElementtruepublic String toString()
Element.
toString in class ObjectElementObject.getClass(),
Object.hashCode(),
Class.getName(),
Integer.toHexString(int)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||