public class SimpleAttributeSet extends Object implements MutableAttributeSet, Serializable, Cloneable
警告: このクラスの直列化されたオブジェクトは、今後のSwingリリースとの互換性がなくなる予定です。 現在の直列化のサポートは、短期間の格納や、同じバージョンのSwingを実行するアプリケーション間のRMIに適しています。 1.4以降、すべてのJavaBeans™用の長期間の格納サポートがjava.beans
パッケージに追加されています。 XMLEncoder
を参照してください。
AttributeSet.CharacterAttribute, AttributeSet.ColorAttribute, AttributeSet.FontAttribute, AttributeSet.ParagraphAttribute
修飾子と型 | フィールド | 説明 |
---|---|---|
static AttributeSet |
EMPTY |
空の属性セットです。
|
NameAttribute, ResolveAttribute
コンストラクタ | 説明 |
---|---|
SimpleAttributeSet() |
新しい属性セットを作成します。
|
SimpleAttributeSet(AttributeSet source) |
指定された属性セットに基づいて新しい属性セットを作成します。
|
修飾子と型 | メソッド | 説明 |
---|---|---|
void |
addAttribute(Object name, Object value) |
リストに属性を追加します。
|
void |
addAttributes(AttributeSet attributes) |
属性セットをリストに追加します。
|
Object |
clone() |
属性セットを複製します。
|
boolean |
containsAttribute(Object name, Object value) |
属性リストに指定された属性名と値のペアがあるかどうかを判定します。
|
boolean |
containsAttributes(AttributeSet attributes) |
属性リストに指定されたすべての名前と値のペアがあるかどうかを判定します。
|
AttributeSet |
copyAttributes() |
属性のコピーを作成します。
|
boolean |
equals(Object obj) |
このオブジェクトを指定されたオブジェクトと比較します。
|
Object |
getAttribute(Object name) |
属性の値を取得します。
|
int |
getAttributeCount() |
属性の数を取得します。
|
Enumeration<?> |
getAttributeNames() |
セット内の属性の名前を取得します。
|
AttributeSet |
getResolveParent() |
解釈処理側の親を返します。
|
int |
hashCode() |
この属性セットのためのハッシュ・コードを返します。
|
boolean |
isDefined(Object attrName) |
指定された属性が定義されているかどうかを判定します。
|
boolean |
isEmpty() |
属性セットが空かどうかを判定します。
|
boolean |
isEqual(AttributeSet attr) |
2つの属性セットを比較します。
|
void |
removeAttribute(Object name) |
リストから属性を削除します。
|
void |
removeAttributes(AttributeSet attributes) |
リストから属性セットを削除します。
|
void |
removeAttributes(Enumeration<?> names) |
リストから属性セットを削除します。
|
void |
setResolveParent(AttributeSet parent) |
解釈処理側の親を設定します。
|
String |
toString() |
属性セットを文字列に変換します。
|
public static final AttributeSet EMPTY
public SimpleAttributeSet()
public SimpleAttributeSet(AttributeSet source)
source
- 属性セットpublic boolean isEmpty()
public int getAttributeCount()
getAttributeCount
、インタフェースAttributeSet
public boolean isDefined(Object attrName)
isDefined
、インタフェースAttributeSet
attrName
- 属性名public boolean isEqual(AttributeSet attr)
isEqual
、インタフェースAttributeSet
attr
- 2番目の属性セットpublic AttributeSet copyAttributes()
copyAttributes
、インタフェースAttributeSet
public Enumeration<?> getAttributeNames()
getAttributeNames
、インタフェースAttributeSet
Enumeration
)public Object getAttribute(Object name)
getAttribute
、インタフェースAttributeSet
name
- 属性名public boolean containsAttribute(Object name, Object value)
containsAttribute
、インタフェースAttributeSet
name
- 名前value
- 値public boolean containsAttributes(AttributeSet attributes)
containsAttributes
、インタフェースAttributeSet
attributes
- 属性リストpublic void addAttribute(Object name, Object value)
addAttribute
、インタフェースMutableAttributeSet
name
- 属性名value
- 属性値public void addAttributes(AttributeSet attributes)
addAttributes
、インタフェースMutableAttributeSet
attributes
- 追加する属性セットpublic void removeAttribute(Object name)
removeAttribute
、インタフェースMutableAttributeSet
name
- 属性名public void removeAttributes(Enumeration<?> names)
removeAttributes
、インタフェースMutableAttributeSet
names
- 削除する名前のセットpublic void removeAttributes(AttributeSet attributes)
removeAttributes
、インタフェースMutableAttributeSet
attributes
- 削除する属性セットpublic AttributeSet getResolveParent()
getResolveParent
、インタフェースAttributeSet
public void setResolveParent(AttributeSet parent)
setResolveParent
、インタフェースMutableAttributeSet
parent
- 親public int hashCode()
hashCode
、クラスObject
Object.equals(java.lang.Object)
, System.identityHashCode(java.lang.Object)
public boolean equals(Object obj)
true
になります。 equals
、クラスObject
obj
- この属性セットと比較されるオブジェクトtrue
、そうでない場合はfalse
Object.hashCode()
, HashMap
バグまたは機能を送信
詳細なAPIリファレンスおよび開発者ドキュメントについては、Java SEのドキュメントを参照してください。 そのドキュメントには、概念的な概要、用語の定義、回避方法、有効なコード例などの、開発者を対象にしたより詳細な説明が含まれています。
Copyright © 1993, 2025, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Documentation Redistribution Policyも参照してください。