- 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
-
-
フィールドのサマリー
-
インタフェース javax.swing.text.AttributeSetで宣言されたフィールド
NameAttribute, ResolveAttribute
-
-
コンストラクタのサマリー
コンストラクタ コンストラクタ 説明 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
-
-
-
-
コンストラクタの詳細
-
LeafElement
public LeafElement(Element parent, AttributeSet a, int offs0, int offs1)
ドキュメント内のコンテンツを表す(子を持たない)要素を作成します。- パラメータ:
parent- 親要素a- 要素の属性offs0- 開始オフセット>= 0offs1- 終了オフセット>= offs0- 導入されたバージョン:
- 1.4
-
-
メソッドの詳細
-
getStartOffset
public int getStartOffset()
要素のモデル内での開始オフセットを取得します。- 定義:
getStartOffset、インタフェースElement- 定義:
getStartOffset、クラスAbstractDocument.AbstractElement- 戻り値:
- オフセット>= 0
- 関連項目:
Document,AbstractDocument
-
getEndOffset
public int getEndOffset()
要素のモデル内での終了オフセットを取得します。- 定義:
getEndOffset、インタフェースElement- 定義:
getEndOffset、クラスAbstractDocument.AbstractElement- 戻り値:
- オフセット>= 0
- 関連項目:
Document,AbstractDocument
-
getName
public String getName()
要素の名前を取得します。- 定義:
getName、インタフェースElement- オーバーライド:
getName、クラスAbstractDocument.AbstractElement- 戻り値:
- 名前
-
getElementIndex
public int getElementIndex(int pos)
指定されたモデル・オフセットにもっとも近い子要素インデックスを取得します。- 定義:
getElementIndex、インタフェースElement- 定義:
getElementIndex、クラスAbstractDocument.AbstractElement- パラメータ:
pos- オフセット>= 0- 戻り値:
- 要素のインデックス>= 0
-
getElement
public Element getElement(int index)
子要素を取得します。- 定義:
getElement、インタフェースElement- 定義:
getElement、クラスAbstractDocument.AbstractElement- パラメータ:
index- 子のインデックス。0以上で、getElementCount()より小さい値- 戻り値:
- 子要素
-
getElementCount
public int getElementCount()
子要素の数を返します。- 定義:
getElementCount、インタフェースElement- 定義:
getElementCount、クラスAbstractDocument.AbstractElement- 戻り値:
- 子の数>= 0
-
isLeaf
public boolean isLeaf()
要素が葉かどうかを調べます。
-
getAllowsChildren
public boolean getAllowsChildren()
レシーバが子を許可する場合はtrueを返します。- 定義:
getAllowsChildren、インタフェースTreeNode- 定義:
getAllowsChildren、クラスAbstractDocument.AbstractElement- 戻り値:
- レシーバが子を許可する場合はtrue、そうでない場合はfalse
-
children
public Enumeration<TreeNode> children()
レシーバの子をEnumerationとして返します。- 定義:
children、インタフェースTreeNode- 定義:
children、クラスAbstractDocument.AbstractElement- 戻り値:
- レシーバの子
-
-