|
|||||||||
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 LeafElement s cannot have
children. |
boolean |
getAllowsChildren()
Returns false since LeafElement s cannot have
children. |
Element |
getElement(int index)
Returns null since LeafElement s cannot have
children. |
int |
getElementCount()
Returns 0 since LeafElement s cannot have
children. |
int |
getElementIndex(int offset)
Returns -1 since LeafElement s 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 LeafElement
attributes
- the attributes to be setstart
- the start index of this element inside the document modelend
- the end index of this element inside the document modelMethod Detail |
---|
public Enumeration children()
null
since LeafElement
s cannot have
children.
children
in interface TreeNode
children
in class AbstractDocument.AbstractElement
null
since LeafElement
s cannot have
childrenpublic boolean getAllowsChildren()
false
since LeafElement
s cannot have
children.
getAllowsChildren
in interface TreeNode
getAllowsChildren
in class AbstractDocument.AbstractElement
false
since LeafElement
s cannot have
childrenpublic Element getElement(int index)
null
since LeafElement
s cannot have
children.
getElement
in interface Element
getElement
in class AbstractDocument.AbstractElement
index
- the index of the requested child element
null
since LeafElement
s cannot have
childrenpublic int getElementCount()
0
since LeafElement
s cannot have
children.
getElementCount
in interface Element
getElementCount
in class AbstractDocument.AbstractElement
0
since LeafElement
s cannot have
childrenpublic int getElementIndex(int offset)
-1
since LeafElement
s cannot have
children.
getElementIndex
in interface Element
getElementIndex
in class AbstractDocument.AbstractElement
offset
- the offset for which the responsible element is searched
-1
since LeafElement
s cannot have
childrenpublic int getEndOffset()
Element
inside the
document.
getEndOffset
in interface Element
getEndOffset
in class AbstractDocument.AbstractElement
Element
inside the
documentpublic String getName()
Element
. This is
AbstractDocument.ContentElementName
in this case.
getName
in interface Element
getName
in class AbstractDocument.AbstractElement
Element
public int getStartOffset()
Element
inside the
document.
getStartOffset
in interface Element
getStartOffset
in class AbstractDocument.AbstractElement
Element
inside the
documentpublic boolean isLeaf()
true
.
isLeaf
in interface Element
isLeaf
in interface TreeNode
isLeaf
in class AbstractDocument.AbstractElement
true
public String toString()
Element
.
toString
in class Object
Element
Object.getClass()
,
Object.hashCode()
,
Class.getName()
,
Integer.toHexString(int)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |