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| Modifier and Type | Field and Description | 
|---|---|
| static AttributeSet | EMPTY
              一个空属性集。 
             | 
NameAttribute, ResolveAttribute| Constructor and Description | 
|---|
| SimpleAttributeSet()
              创建一个新的属性集。 
             | 
| SimpleAttributeSet(AttributeSet source)
              根据提供的一组属性创建一个新的属性集。 
             | 
| Modifier and Type | Method and Description | 
|---|---|
| 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)
              比较两个属性集。 
             | 
| 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 - 第二个属性集 
           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 
            Submit a bug or feature 
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
 Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.