public abstract class AbstractDocument.AbstractElement extends Object implements Element, MutableAttributeSet, Serializable, TreeNode
警告: このクラスの直列化されたオブジェクトは、今後のSwingリリースとの互換性がなくなる予定です。 現在の直列化のサポートは、短期間の格納や、同じバージョンのSwingを実行するアプリケーション間のRMIに適しています。 1.4以降、すべてのJavaBeans™用の長期間の格納サポートがjava.beansパッケージに追加されています。 XMLEncoderを参照してください。
AttributeSet.CharacterAttribute, AttributeSet.ColorAttribute, AttributeSet.FontAttribute, AttributeSet.ParagraphAttributeNameAttribute, ResolveAttribute| コンストラクタ | 説明 |
|---|---|
AbstractElement(Element parent, AttributeSet a) |
新しいAbstractElementを作成します。
|
| 修飾子と型 | メソッド | 説明 |
|---|---|---|
void |
addAttribute(Object name, Object value) |
要素に属性を追加します。
|
void |
addAttributes(AttributeSet attr) |
属性セットを要素に追加します。
|
abstract Enumeration |
children() |
レシーバの子を
Enumerationとして返します。 |
boolean |
containsAttribute(Object name, Object value) |
属性の名前と値が定義済みであるかどうかを判定します。
|
boolean |
containsAttributes(AttributeSet attrs) |
要素にすべての属性が含まれているかどうかを判定します。
|
AttributeSet |
copyAttributes() |
属性セットをコピーします。
|
void |
dump(PrintStream psOut, int indentAmount) |
要素階層のデバッグ表現をダンプします。
|
abstract boolean |
getAllowsChildren() |
レシーバが子を許可する場合はtrueを返します。
|
Object |
getAttribute(Object attrName) |
属性の値を取得します。
|
int |
getAttributeCount() |
定義されている属性の個数を取得します。
|
Enumeration<?> |
getAttributeNames() |
すべての属性の名前を取得します。
|
AttributeSet |
getAttributes() |
要素の属性を取得します。
|
TreeNode |
getChildAt(int childIndex) |
インデックス
childIndexにある子TreeNodeを返します。 |
int |
getChildCount() |
TreeNodeのレシーバが格納する子の数を返します。 |
Document |
getDocument() |
基盤となるモデルを取得します。
|
abstract Element |
getElement(int index) |
子要素を取得します。
|
abstract int |
getElementCount() |
要素の子の数を取得します。
|
abstract int |
getElementIndex(int offset) |
指定されたモデル・オフセットにもっとも近い子要素インデックスを取得します。
|
abstract int |
getEndOffset() |
要素のモデル内での終了オフセットを取得します。
|
int |
getIndex(TreeNode node) |
レシーバの子の中で
nodeのインデックスを返します。 |
String |
getName() |
要素の名前を返します。
|
TreeNode |
getParent() |
レシーバの親
TreeNodeを返します。 |
Element |
getParentElement() |
要素の親を取得します。
|
AttributeSet |
getResolveParent() |
解釈処理側の親を返します。
|
abstract int |
getStartOffset() |
要素のモデル内での開始オフセットを取得します。
|
boolean |
isDefined(Object attrName) |
指定された属性が定義済みであるかどうかを判定します。
|
boolean |
isEqual(AttributeSet attr) |
2つの属性セットが等しいかどうかを判定します。
|
abstract boolean |
isLeaf() |
要素が葉かどうかを調べます。
|
void |
removeAttribute(Object name) |
セットから属性を削除します。
|
void |
removeAttributes(AttributeSet attrs) |
要素の属性セットを削除します。
|
void |
removeAttributes(Enumeration<?> names) |
要素の属性セットを削除します。
|
void |
setResolveParent(AttributeSet parent) |
解釈処理側の親を設定します。
|
public AbstractElement(Element parent, AttributeSet a)
parent - 親要素a - 要素の属性public void dump(PrintStream psOut, int indentAmount)
psOut - 出力ストリームindentAmount - インデント・レベル>= 0public int getAttributeCount()
getAttributeCount、インタフェースAttributeSetAttributeSet.getAttributeCount()public boolean isDefined(Object attrName)
isDefined、インタフェースAttributeSetattrName - null以外の属性名AttributeSet.isDefined(java.lang.Object)public boolean isEqual(AttributeSet attr)
isEqual、インタフェースAttributeSetattr - 比較の対象となる属性セットAttributeSet.isEqual(javax.swing.text.AttributeSet)public AttributeSet copyAttributes()
copyAttributes、インタフェースAttributeSetAttributeSet.copyAttributes()public Object getAttribute(Object attrName)
getAttribute、インタフェースAttributeSetattrName - null以外の属性名AttributeSet.getAttribute(java.lang.Object)public Enumeration<?> getAttributeNames()
getAttributeNames、インタフェースAttributeSetAttributeSet.getAttributeNames()public boolean containsAttribute(Object name, Object value)
containsAttribute、インタフェースAttributeSetname - null以外の属性名value - 属性値AttributeSet.containsAttribute(java.lang.Object, java.lang.Object)public boolean containsAttributes(AttributeSet attrs)
containsAttributes、インタフェースAttributeSetattrs - チェック対象の属性AttributeSet.containsAttributes(javax.swing.text.AttributeSet)public AttributeSet getResolveParent()
getResolveParent、インタフェースAttributeSetnullAttributeSet.getResolveParent()public void addAttribute(Object name, Object value)
addAttribute、インタフェースMutableAttributeSetname - null以外の属性名value - 属性値MutableAttributeSet.addAttribute(java.lang.Object, java.lang.Object)public void addAttributes(AttributeSet attr)
addAttributes、インタフェースMutableAttributeSetattr - 追加する属性MutableAttributeSet.addAttribute(java.lang.Object, java.lang.Object)public void removeAttribute(Object name)
removeAttribute、インタフェースMutableAttributeSetname - null以外の属性名MutableAttributeSet.removeAttribute(java.lang.Object)public void removeAttributes(Enumeration<?> names)
removeAttributes、インタフェースMutableAttributeSetnames - 属性名MutableAttributeSet.removeAttributes(java.util.Enumeration<?>)public void removeAttributes(AttributeSet attrs)
removeAttributes、インタフェースMutableAttributeSetattrs - 属性MutableAttributeSet.removeAttributes(java.util.Enumeration<?>)public void setResolveParent(AttributeSet parent)
setResolveParent、インタフェースMutableAttributeSetparent - 親。ない場合はnullMutableAttributeSet.setResolveParent(javax.swing.text.AttributeSet)public Document getDocument()
getDocument、インタフェースElementpublic Element getParentElement()
getParentElement、インタフェースElementpublic AttributeSet getAttributes()
getAttributes、インタフェースElementpublic abstract int getStartOffset()
getStartOffset、インタフェースElementDocument, AbstractDocumentpublic abstract int getEndOffset()
getEndOffset、インタフェースElementDocument, AbstractDocumentpublic abstract Element getElement(int index)
getElement、インタフェースElementindex - 子のインデックス。0以上で、getElementCount()より小さい値public abstract int getElementCount()
getElementCount、インタフェースElementpublic abstract int getElementIndex(int offset)
getElementIndex、インタフェースElementoffset - オフセット>= 0public abstract boolean isLeaf()
public TreeNode getChildAt(int childIndex)
childIndexにある子TreeNodeを返します。getChildAt、インタフェースTreeNodepublic int getChildCount()
TreeNodeのレシーバが格納する子の数を返します。getChildCount、インタフェースTreeNodeTreeNodewsのレシーバが格納する子の数public TreeNode getParent()
TreeNodeを返します。public int getIndex(TreeNode node)
nodeのインデックスを返します。 レシーバがnodeを格納しない場合は、-1が返されます。 public abstract boolean getAllowsChildren()
getAllowsChildren、インタフェースTreeNodepublic abstract Enumeration children()
Enumerationとして返します。 バグまたは機能を送信
詳細なAPIリファレンスおよび開発者ドキュメントについては、Java SEのドキュメントを参照してください。 そのドキュメントには、概念的な概要、用語の定義、回避方法、有効なコード例などの、開発者を対象にしたより詳細な説明が含まれています。
Copyright © 1993, 2025, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Documentation Redistribution Policyも参照してください。