JavaTM 2 Platform
Std. Ed. v1.3

javax.swing.text
クラス AbstractDocument.LeafElement

java.lang.Object
  |
  +--javax.swing.text.AbstractDocument.AbstractElement
        |
        +--javax.swing.text.AbstractDocument.LeafElement
すべての実装インタフェース:
AttributeSet, Element, MutableAttributeSet, Serializable, TreeNode
直系の既知のサブクラス:
HTMLDocument.RunElement
含まれているクラス:
AbstractDocument

public class AbstractDocument.LeafElement
extends AbstractDocument.AbstractElement

内容を直接に表示する要素を実装します。

警告: このクラスの直列化されたオブジェクトは、今後の Swing リリースと互換ではなくなる予定です。現在の直列化のサポートは、短期間の運用や、同じバージョンの Swing を実行するアプリケーション間の RMI に適しています。今後の Swing リリースでは、長期間の持続性をサポートする予定です。

関連項目:
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()
          要素を文字列に変換します。
 
クラス javax.swing.text.AbstractDocument.AbstractElement から継承したメソッド
addAttribute, addAttributes, containsAttribute, containsAttributes, copyAttributes, dump, finalize, getAttribute, getAttributeCount, getAttributeNames, getAttributes, getChildAt, getChildCount, getDocument, getIndex, getParent, getParentElement, getResolveParent, isDefined, isEqual, removeAttribute, removeAttributes, removeAttributes, setResolveParent
 
クラス java.lang.Object から継承したメソッド
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

コンストラクタの詳細

AbstractDocument.LeafElement

public AbstractDocument.LeafElement(Element parent,
                                    AttributeSet a,
                                    int offs0,
                                    int offs1)
ドキュメントの内容を表示する要素を構築します。子はありません。
パラメータ:
parent - 親要素
a - 要素の属性
offs0 - 開始オフセット >= 0
offs1 - 終了オフセット >= offs0
メソッドの詳細

toString

public String toString()
要素を文字列に変換します。
オーバーライド:
クラス Object 内の toString
戻り値:
文字列

getStartOffset

public int getStartOffset()
要素のモデル内の開始オフセットを取得します。
オーバーライド:
クラス AbstractDocument.AbstractElement 内の getStartOffset
戻り値:
オフセット >= 0

getEndOffset

public int getEndOffset()
要素のモデル内の終了オフセットを取得します。
オーバーライド:
クラス AbstractDocument.AbstractElement 内の getEndOffset
戻り値:
オフセット >= 0

getName

public String getName()
要素の名前を取得します。
オーバーライド:
クラス AbstractDocument.AbstractElement 内の getName
戻り値:
名前

getElementIndex

public int getElementIndex(int pos)
指定されたモデルのオフセットにもっとも近い、子要素のインデックスを取得します。
オーバーライド:
クラス AbstractDocument.AbstractElement 内の getElementIndex
パラメータ:
pos - オフセット >= 0
戻り値:
要素のインデックス >= 0

getElement

public Element getElement(int index)
子要素を取得します。
オーバーライド:
クラス AbstractDocument.AbstractElement 内の getElement
パラメータ:
index - 子要素 >= 0 && < getElementCount()
戻り値:
子要素

getElementCount

public int getElementCount()
子要素の数を返します。
オーバーライド:
クラス AbstractDocument.AbstractElement 内の getElementCount
戻り値:
子要素の数 >= 0

isLeaf

public boolean isLeaf()
要素が葉であるかどうかを判定します。
オーバーライド:
クラス AbstractDocument.AbstractElement 内の isLeaf
戻り値:
葉である場合は true

getAllowsChildren

public boolean getAllowsChildren()
受信側が子を許可する場合に true を返します。
オーバーライド:
クラス AbstractDocument.AbstractElement 内の getAllowsChildren

children

public Enumeration children()
受信側の子を Enumeration として返します。
オーバーライド:
クラス AbstractDocument.AbstractElement 内の children

JavaTM 2 Platform
Std. Ed. v1.3

バグや機能要求の報告
さらに詳しい API リファレンスおよび開発者ドキュメントについては、 Java 2 SDK SE Developer Documentation を参照してください。このドキュメントには、概念、用語の定義、回避策、 実用的なコード例など、開発者を対象にした詳細な解説が掲載されています。

Java、Java 2D、JDBC は、米国およびその他の国における米国 Sun Microsystems, Inc. の商標もしくは登録商標です。
Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.