public class AbstractDocument.LeafElement extends AbstractDocument.AbstractElement
 警告:此类的序列化对象与将来的Swing版本不兼容。 当前的序列化支持适用于运行相同版本的Swing的应用程序之间的短期存储或RMI。 从1.4开始,支持所有JavaBeans的长期存储已经添加到java.beans包中。 请参阅XMLEncoder 。 
Element 
       AttributeSet.CharacterAttribute, AttributeSet.ColorAttribute, AttributeSet.FontAttribute, AttributeSet.ParagraphAttributeNameAttribute, ResolveAttribute| Constructor and Description | 
|---|
| LeafElement(Element parent, AttributeSet a, int offs0, int offs1)
              构造一个表示文档内容(没有子项)的元素。 
             | 
| Modifier and Type | Method and Description | 
|---|---|
| Enumeration | children()
              作为 
              Enumeration返回接收者的Enumeration。 | 
| boolean | getAllowsChildren()
              如果接收器允许孩子,则返回true。 
             | 
| Element | getElement(int index)
              获取一个子元素。 
             | 
| int | getElementCount()
              返回子元素的数量。 
             | 
| int | getElementIndex(int pos)
              获取最接近给定模型偏移量的子元素索引。 
             | 
| int | getEndOffset()
              获取元素模型中的结束偏移量。 
             | 
| String | getName()
              获取元素名称。 
             | 
| int | getStartOffset()
              获取元素模型中的起始偏移量。 
             | 
| boolean | isLeaf()
              检查元素是否是叶子。 
             | 
| String | toString()
              将元素转换为字符串。 
             | 
addAttribute, addAttributes, containsAttribute, containsAttributes, copyAttributes, dump, getAttribute, getAttributeCount, getAttributeNames, getAttributes, getChildAt, getChildCount, getDocument, getIndex, getParent, getParentElement, getResolveParent, isDefined, isEqual, removeAttribute, removeAttributes, removeAttributes, setResolveParentpublic LeafElement(Element parent, AttributeSet a, int offs0, int offs1)
parent - 父元素 
           a - 元素属性 
           offs0 - 起始偏移量> = 0 
           offs1 - 结束偏移量> = offs0 
           public int getStartOffset()
getStartOffset在界面 
            Element 
           getStartOffset在 
            AbstractDocument.AbstractElement 
           Document , AbstractDocument 
           public int getEndOffset()
getEndOffset在界面 
            Element 
           getEndOffset在 
            AbstractDocument.AbstractElement类 
           Document , AbstractDocument 
           public String getName()
getName在界面 
            Element 
           getName在 
            AbstractDocument.AbstractElement 
           public int getElementIndex(int pos)
getElementIndex在接口 
            Element 
           getElementIndex在 
            AbstractDocument.AbstractElement 
           pos - offset> = 0 
           public Element getElement(int index)
getElement在接口 
            Element 
           getElement在 
            AbstractDocument.AbstractElement 
           index - 子索引> = 0 && <getElementCount() 
           public int getElementCount()
getElementCount在界面 
            Element 
           getElementCount在 
            AbstractDocument.AbstractElement 
           public boolean isLeaf()
public boolean getAllowsChildren()
getAllowsChildren在界面 
            TreeNode 
           getAllowsChildren在 
            AbstractDocument.AbstractElement 
           public Enumeration children()
Enumeration返回接收者的 
           Enumeration 。 
          children在界面 
            TreeNode 
           children在 
            AbstractDocument.AbstractElement 
            Submit a bug or feature 
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
 Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.