|
JavaTM 2 Platform Standard Ed. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
java.lang.Objectjavax.swing.text.AbstractDocument.AbstractElement
javax.swing.text.AbstractDocument.LeafElement
public class AbstractDocument.LeafElement
實作可直接表示某類別內容的元素。
警告:此類別的已序列化物件與以後的 Swing 版本不相容。當前的序列化支持適用於短期存儲或運行相同 Swing 版本的應用程序之間的 RMI。從 1.4 版本開始,已在 java.beans 套件中添加了支持所有 JavaBeansTM 長期存儲的功能。請參見 XMLEncoder。
Element| 巢狀類別摘要 |
|---|
| 從介面 javax.swing.text.AttributeSet 繼承的巢狀類別/介面 |
|---|
AttributeSet.CharacterAttribute, AttributeSet.ColorAttribute, AttributeSet.FontAttribute, AttributeSet.ParagraphAttribute |
| 欄位摘要 |
|---|
| 從介面 javax.swing.text.AttributeSet 繼承的欄位 |
|---|
NameAttribute, ResolveAttribute |
| 建構子摘要 | |
|---|---|
AbstractDocument.LeafElement(Element parent,
AttributeSet a,
int offs0,
int offs1)
建構一個表示文檔中內容的元素(沒有子元素)。 |
|
| 方法摘要 | |
|---|---|
Enumeration |
children()
以 Enumeration 的形式返回接收者的子級。 |
boolean |
getAllowsChildren()
如果接收者允許接收子元素,則返回 true。 |
Element |
getElement(int index)
獲得一個子元素。 |
int |
getElementCount()
返回子元素的數量。 |
int |
getElementIndex(int pos)
獲得與給定模型偏移量最接近的子元素索引。 |
int |
getEndOffset()
獲得模型中該元素的結束偏移量。 |
String |
getName()
獲得元素名。 |
int |
getStartOffset()
獲得模型中該元素的起始偏移量。 |
boolean |
isLeaf()
檢查該元素是否為葉元素。 |
String |
toString()
將該元素轉換為字元串。 |
| 從類別 java.lang.Object 繼承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| 建構子詳細資訊 |
|---|
public AbstractDocument.LeafElement(Element parent,
AttributeSet a,
int offs0,
int offs1)
parent - 父元素a - 元素屬性offs0 - 起始偏移量,該偏移量 >= 0offs1 - 結束偏移量,該偏移量 >= offs0| 方法詳細資訊 |
|---|
public String toString()
Object 中的 toStringpublic int getStartOffset()
Element 中的 getStartOffsetAbstractDocument.AbstractElement 中的 getStartOffsetDocument,
AbstractDocumentpublic int getEndOffset()
Element 中的 getEndOffsetAbstractDocument.AbstractElement 中的 getEndOffsetDocument,
AbstractDocumentpublic String getName()
Element 中的 getNameAbstractDocument.AbstractElement 中的 getNamepublic int getElementIndex(int pos)
Element 中的 getElementIndexAbstractDocument.AbstractElement 中的 getElementIndexpos - 偏移量,該偏移量 >= 0
public Element getElement(int index)
Element 中的 getElementAbstractDocument.AbstractElement 中的 getElementindex - 子元素的索引,該索引 >= 0 && < getElementCount()
public int getElementCount()
Element 中的 getElementCountAbstractDocument.AbstractElement 中的 getElementCountpublic boolean isLeaf()
Element 中的 isLeafTreeNode 中的 isLeafAbstractDocument.AbstractElement 中的 isLeafpublic boolean getAllowsChildren()
TreeNode 中的 getAllowsChildrenAbstractDocument.AbstractElement 中的 getAllowsChildrenpublic Enumeration children()
Enumeration 的形式返回接收者的子級。
TreeNode 中的 childrenAbstractDocument.AbstractElement 中的 children
|
JavaTM 2 Platform Standard Ed. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
版權所有 2008 Sun Microsystems, Inc. 保留所有權利。請遵守GNU General Public License, version 2 only。