public abstract class AbstractDocument.AbstractElement extends Object implements Element, MutableAttributeSet, Serializable, TreeNode
 警告:此类的序列化对象与将来的Swing版本不兼容。 当前的序列化支持适用于运行相同版本的Swing的应用程序之间的短期存储或RMI。 从1.4开始,对所有JavaBeans的长期存储的支持已经添加到java.beans包中。 请参阅XMLEncoder 。 
AttributeSet.CharacterAttribute, AttributeSet.ColorAttribute, AttributeSet.FontAttribute, AttributeSet.ParagraphAttributeNameAttribute, ResolveAttribute| Constructor and Description | 
|---|
| AbstractElement(Element parent, AttributeSet a)
              创建一个新的AbstractElement。 
             | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addAttribute(Object name, Object value)
              向元素添加一个属性。 
             | 
| void | addAttributes(AttributeSet attr)
              向元素添加一组属性。 
             | 
| abstract Enumeration | children()
              作为 
              Enumeration返回接收者的Enumeration。 | 
| boolean | containsAttribute(Object name, Object value)
              检查是否定义了一个给定的属性名称/值。 
             | 
| boolean | containsAttributes(AttributeSet attrs)
              检查元素是否包含所有属性。 
             | 
| AttributeSet | copyAttributes()
              复制一组属性。 
             | 
| void | dump(PrintStream psOut, int indentAmount)
              转储元素层次结构的调试表示。 
             | 
| abstract boolean | getAllowsChildren()
              如果接收器允许孩子,则返回true。 
             | 
| Object | getAttribute(Object attrName)
              获取属性的值。 
             | 
| int | getAttributeCount()
              获取定义的属性数。 
             | 
| Enumeration<?> | getAttributeNames()
              获取所有属性的名称。 
             | 
| AttributeSet | getAttributes()
              获取元素的属性。 
             | 
| TreeNode | getChildAt(int childIndex)
              返回子 
              TreeNode索引childIndex。 | 
| int | getChildCount()
              返回 
              TreeNode的接收者的数量。 | 
| Document | getDocument()
              检索基础模型。 
             | 
| abstract Element | getElement(int index)
              获取一个子元素。 
             | 
| abstract int | getElementCount()
              获取元素的子元素数。 
             | 
| abstract int | getElementIndex(int offset)
              获取最接近给定模型偏移量的子元素索引。 
             | 
| abstract int | getEndOffset()
              获取元素模型中的结束偏移量。 
             | 
| int | getIndex(TreeNode node)
              返回的索引 
              node接收机中的孩子。 | 
| String | getName()
              获取元素的名称。 
             | 
| TreeNode | getParent()
              返回接收者的父级 
              TreeNode。 | 
| Element | getParentElement()
              获取元素的父项。 
             | 
| AttributeSet | getResolveParent()
              得到解决的父母。 
             | 
| abstract int | getStartOffset()
              获取元素模型中的起始偏移量。 
             | 
| boolean | isDefined(Object attrName)
              检查给定属性是否被定义。 
             | 
| boolean | isEqual(AttributeSet attr)
              检查两个属性集是否相等。 
             | 
| abstract boolean | isLeaf()
              检查元素是否是叶子。 
             | 
| void | removeAttribute(Object name)
              从集合中删除属性。 
             | 
| void | removeAttributes(AttributeSet attrs)
              删除元素的一组属性。 
             | 
| void | removeAttributes(Enumeration<?> names)
              删除元素的一组属性。 
             | 
| void | setResolveParent(AttributeSet parent)
              设置解析父项。 
             | 
public AbstractElement(Element parent, AttributeSet a)
parent - 父元素 
           a - 元素的属性 
           public void dump(PrintStream psOut, int indentAmount)
psOut - 输出流 
           indentAmount - 缩进级别> = 0 
           public int getAttributeCount()
getAttributeCount在界面 
            AttributeSet 
           AttributeSet.getAttributeCount() 
           public boolean isDefined(Object attrName)
isDefined在接口 
            AttributeSet 
           attrName - 非空属性名称 
           AttributeSet.isDefined(java.lang.Object) 
           public boolean isEqual(AttributeSet attr)
isEqual在界面 
            AttributeSet 
           attr - 要检查的属性集 
           AttributeSet.isEqual(javax.swing.text.AttributeSet) 
           public AttributeSet copyAttributes()
copyAttributes在接口 
            AttributeSet 
           AttributeSet.copyAttributes() 
           public Object getAttribute(Object attrName)
getAttribute在界面 
            AttributeSet 
           attrName - 非空属性名称 
           AttributeSet.getAttribute(java.lang.Object) 
           public Enumeration<?> getAttributeNames()
getAttributeNames在接口 
            AttributeSet 
           AttributeSet.getAttributeNames() 
           public boolean containsAttribute(Object name, Object value)
containsAttribute中的 
            AttributeSet 
           name - 非空属性名称 
           value - 属性值 
           AttributeSet.containsAttribute(java.lang.Object, java.lang.Object) 
           public boolean containsAttributes(AttributeSet attrs)
containsAttributes在界面 
            AttributeSet 
           attrs - 要检查的属性 
           AttributeSet.containsAttributes(javax.swing.text.AttributeSet) 
           public AttributeSet getResolveParent()
getResolveParent在接口 
            AttributeSet 
           null如果没有 
           AttributeSet.getResolveParent() 
           public void addAttribute(Object name, Object value)
addAttribute在界面 
            MutableAttributeSet 
           name - 非空属性名称 
           value - 属性值 
           MutableAttributeSet.addAttribute(java.lang.Object, java.lang.Object) 
           public void addAttributes(AttributeSet attr)
addAttributes在界面 
            MutableAttributeSet 
           attr - 要添加的属性 
           MutableAttributeSet.addAttribute(java.lang.Object, java.lang.Object) 
           public void removeAttribute(Object name)
removeAttribute在界面 
            MutableAttributeSet 
           name - 非空属性名称 
           MutableAttributeSet.removeAttribute(java.lang.Object) 
           public void removeAttributes(Enumeration<?> names)
removeAttributes在接口 
            MutableAttributeSet 
           names - 属性名称 
           MutableAttributeSet.removeAttributes(java.util.Enumeration<?>) 
           public void removeAttributes(AttributeSet attrs)
removeAttributes在界面 
            MutableAttributeSet 
           attrs - 属性 
           MutableAttributeSet.removeAttributes(java.util.Enumeration<?>) 
           public void setResolveParent(AttributeSet parent)
setResolveParent在界面 
            MutableAttributeSet 
           parent - 如果没有,则为null 
           MutableAttributeSet.setResolveParent(javax.swing.text.AttributeSet) 
           public Document getDocument()
getDocument在界面 
            Element 
           public Element getParentElement()
getParentElement在接口 
            Element 
           public AttributeSet getAttributes()
getAttributes在界面 
            Element 
           public abstract int getStartOffset()
getStartOffset在界面 
            Element 
           Document , AbstractDocument 
           public abstract int getEndOffset()
getEndOffset在界面 
            Element 
           Document , AbstractDocument 
           public abstract Element getElement(int index)
getElement在界面 
            Element 
           index - 子索引> = 0 && <getElementCount() 
           public abstract int getElementCount()
getElementCount在接口 
            Element 
           public abstract int getElementIndex(int offset)
getElementIndex在接口 
            Element 
           offset - offset> = 0 
           public abstract boolean isLeaf()
public TreeNode getChildAt(int childIndex)
TreeNode索引 
           childIndex 。 
          getChildAt在接口 
            TreeNode 
           public int getChildCount()
TreeNode的接收者的数量。 
          getChildCount在接口 
            TreeNode 
           TreeNodews的收件人包含 
           public TreeNode getParent()
TreeNode 。 
          public int getIndex(TreeNode node)
node接收机中的孩子。 
           如果接收方不包含node ,则返回-1。 
          public abstract boolean getAllowsChildren()
getAllowsChildren在界面 
            TreeNode 
           public abstract Enumeration children()
Enumeration形式返回接收者的 
           Enumeration 。 
           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.