| 
 | JavaTM Platform Standard Ed. 6 | |||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectjavax.swing.text.AbstractDocument.AbstractElement
javax.swing.text.AbstractDocument.BranchElement
public class AbstractDocument.BranchElement
实现一个包含其他元素的复合元素。
警告:此类的已序列化对象与以后的 Swing 版本不兼容。当前的序列化支持适用于短期存储或运行相同 Swing 版本的应用程序之间的 RMI。从 1.4 版本开始,已在 java.beans 包中添加了支持所有 JavaBeansTM 长期存储的功能。请参见 XMLEncoder。
| 嵌套类摘要 | 
|---|
| 从接口 javax.swing.text.AttributeSet 继承的嵌套类/接口 | 
|---|
| AttributeSet.CharacterAttribute, AttributeSet.ColorAttribute, AttributeSet.FontAttribute, AttributeSet.ParagraphAttribute | 
| 字段摘要 | 
|---|
| 从接口 javax.swing.text.AttributeSet 继承的字段 | 
|---|
| NameAttribute, ResolveAttribute | 
| 构造方法摘要 | |
|---|---|
| AbstractDocument.BranchElement(Element parent,
                               AttributeSet a)构造最初不包含任何子元素的复合元素。 | |
| 方法摘要 | |
|---|---|
|  Enumeration | children()以 Enumeration的形式返回接收者的子级。 | 
|  boolean | getAllowsChildren()如果接收者允许接收子元素,则返回 true。 | 
|  Element | getElement(int index)获得一个子元素。 | 
|  int | getElementCount()获得该元素的子元素数。 | 
|  int | getElementIndex(int offset)获得与给定模型偏移量最接近的子元素索引。 | 
|  int | getEndOffset()获得模型中该元素的结束偏移量。 | 
|  String | getName()获得元素名。 | 
|  int | getStartOffset()获得模型中该元素的起始偏移量。 | 
|  boolean | isLeaf()检查该元素是否为叶元素。 | 
|  Element | positionToElement(int pos)获得包含给定模型位置的子元素。 | 
|  void | replace(int offset,
        int length,
        Element[] elems)使用新的元素集替换该内容。 | 
|  String | toString()将该元素转换为字符串。 | 
| 从类 java.lang.Object 继承的方法 | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| 构造方法详细信息 | 
|---|
public AbstractDocument.BranchElement(Element parent,
                                      AttributeSet a)
parent - 父元素a - 该元素的属性| 方法详细信息 | 
|---|
public Element positionToElement(int pos)
pos - 位置,该位置 >= 0
public void replace(int offset,
                    int length,
                    Element[] elems)
offset - 起始偏移量,该偏移量 >= 0length - 要替换的长度,该长度 >= 0elems - 新元素public String toString()
Object 中的 toStringpublic String getName()
Element 中的 getNameAbstractDocument.AbstractElement 中的 getNamepublic int getStartOffset()
Element 中的 getStartOffsetAbstractDocument.AbstractElement 中的 getStartOffsetDocument, 
AbstractDocumentpublic int getEndOffset()
Element 中的 getEndOffsetAbstractDocument.AbstractElement 中的 getEndOffsetNullPointerException - 如果此元素没有子元素Document, 
AbstractDocumentpublic Element getElement(int index)
Element 中的 getElementAbstractDocument.AbstractElement 中的 getElementindex - 子元素的索引,该索引 >= 0 && < getElementCount()
public int getElementCount()
Element 中的 getElementCountAbstractDocument.AbstractElement 中的 getElementCountpublic int getElementIndex(int offset)
Element 中的 getElementIndexAbstractDocument.AbstractElement 中的 getElementIndexoffset - 偏移量,该偏移量 >= 0
public boolean isLeaf()
Element 中的 isLeafTreeNode 中的 isLeafAbstractDocument.AbstractElement 中的 isLeafpublic boolean getAllowsChildren()
TreeNode 中的 getAllowsChildrenAbstractDocument.AbstractElement 中的 getAllowsChildrenpublic Enumeration children()
Enumeration 的形式返回接收者的子级。
TreeNode 中的 childrenAbstractDocument.AbstractElement 中的 children| 
 | JavaTM Platform Standard Ed. 6 | |||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。