java.lang.Object
javax.swing.text.AbstractDocument.AbstractElement
javax.swing.text.AbstractDocument.LeafElement
- すべての実装されたインタフェース:
- Serializable,- AttributeSet,- Element,- MutableAttributeSet,- TreeNode
- 直系の既知のサブクラス:
- HTMLDocument.RunElement
- 含まれているクラス:
- AbstractDocument
public class AbstractDocument.LeafElement extends AbstractDocument.AbstractElement
ある種のコンテンツを直接表す要素を実装します。
 
 警告: このクラスの直列化されたオブジェクトは、今後のSwingリリースと互換ではなくなる予定です。 現在の直列化のサポートは、短期間の格納や、同じバージョンのSwingを実行するアプリケーション間のRMIに適しています。 1.4以降、すべてのJavaBeans™用の長期間の格納サポートがjava.beansパッケージに追加されています。 XMLEncoderを参照してください。 
- 関連項目:
- Element
- 
ネストされたクラスのサマリーインタフェース javax.swing.text.AttributeSetで宣言されたネストされたクラス/インタフェースAttributeSet.CharacterAttribute, AttributeSet.ColorAttribute, AttributeSet.FontAttribute, AttributeSet.ParagraphAttribute
- 
フィールドのサマリー
- 
コンストラクタのサマリーコンストラクタ コンストラクタ 説明 LeafElement(Element parent, AttributeSet a, int offs0, int offs1)ドキュメント内のコンテンツを表す(子を持たない)要素を作成します。
- 
メソッドのサマリー修飾子と型 メソッド 説明 Enumeration<TreeNode>children()レシーバの子をEnumerationとして返します。booleangetAllowsChildren()レシーバが子を許可する場合はtrueを返します。ElementgetElement(int index)子要素を取得します。intgetElementCount()子要素の数を返します。intgetElementIndex(int pos)指定されたモデル・オフセットにもっとも近い子要素インデックスを取得します。intgetEndOffset()要素のモデル内での終了オフセットを取得します。StringgetName()要素の名前を取得します。intgetStartOffset()要素のモデル内での開始オフセットを取得します。booleanisLeaf()要素が葉かどうかを調べます。StringtoString()要素を文字列に変換します。クラス javax.swing.text.AbstractDocument.AbstractElementで宣言されたメソッドaddAttribute, addAttributes, containsAttribute, containsAttributes, copyAttributes, dump, getAttribute, getAttributeCount, getAttributeNames, getAttributes, getChildAt, getChildCount, getDocument, getIndex, getParent, getParentElement, getResolveParent, isDefined, isEqual, removeAttribute, removeAttributes, removeAttributes, setResolveParent
- 
コンストラクタの詳細- 
LeafElementpublic LeafElement(Element parent, AttributeSet a, int offs0, int offs1)ドキュメント内のコンテンツを表す(子を持たない)要素を作成します。- パラメータ:
- parent- 親要素
- a- 要素の属性
- offs0- 開始オフセット>= 0
- offs1- 終了オフセット>= offs0
- 導入されたバージョン:
- 1.4
 
 
- 
- 
メソッドの詳細- 
toStringpublic String toString()要素を文字列に変換します。
- 
getStartOffsetpublic int getStartOffset()要素のモデル内での開始オフセットを取得します。- 定義:
- getStartOffset、インタフェース:- Element
- 定義:
- getStartOffset、クラス:- AbstractDocument.AbstractElement
- 戻り値:
- オフセット>= 0
- 関連項目:
- Document,- AbstractDocument
 
- 
getEndOffsetpublic int getEndOffset()要素のモデル内での終了オフセットを取得します。- 定義:
- getEndOffset、インタフェース:- Element
- 定義:
- getEndOffset、クラス:- AbstractDocument.AbstractElement
- 戻り値:
- オフセット>= 0
- 関連項目:
- Document,- AbstractDocument
 
- 
getNamepublic String getName()要素の名前を取得します。- 定義:
- getName、インタフェース:- Element
- オーバーライド:
- getName、クラス:- AbstractDocument.AbstractElement
- 戻り値:
- 名前
 
- 
getElementIndexpublic int getElementIndex(int pos)指定されたモデル・オフセットにもっとも近い子要素インデックスを取得します。- 定義:
- getElementIndex、インタフェース:- Element
- 定義:
- getElementIndex、クラス:- AbstractDocument.AbstractElement
- パラメータ:
- pos- オフセット>= 0
- 戻り値:
- 要素のインデックス>= 0
 
- 
getElementpublic Element getElement(int index)子要素を取得します。- 定義:
- getElement、インタフェース:- Element
- 定義:
- getElement、クラス:- AbstractDocument.AbstractElement
- パラメータ:
- index- 子のインデックス。0以上で、getElementCount()より小さい値
- 戻り値:
- 子要素
 
- 
getElementCountpublic int getElementCount()子要素の数を返します。- 定義:
- getElementCount、インタフェース:- Element
- 定義:
- getElementCount、クラス:- AbstractDocument.AbstractElement
- 戻り値:
- 子の数>= 0
 
- 
isLeafpublic boolean isLeaf()要素が葉かどうかを調べます。
- 
getAllowsChildrenpublic boolean getAllowsChildren()レシーバが子を許可する場合はtrueを返します。- 定義:
- getAllowsChildren、インタフェース:- TreeNode
- 定義:
- getAllowsChildren、クラス:- AbstractDocument.AbstractElement
- 戻り値:
- レシーバが子を許可する場合はtrue、そうでない場合はfalse
 
- 
childrenpublic Enumeration<TreeNode> children()レシーバの子をEnumerationとして返します。- 定義:
- children、インタフェース:- TreeNode
- 定義:
- children、クラス:- AbstractDocument.AbstractElement
- 戻り値:
- レシーバの子
 
 
-