public interface AttributeSet 
      属性可以在层次结构中潜在地解决。 如果密钥本地不解析,并且存在解析父级,则密钥将通过父级解析。
MutableAttributeSet 
       | Modifier and Type | Interface and Description | 
|---|---|
| static interface  | AttributeSet.CharacterAttribute
              该接口是预期在有助于字符级呈现的任何属性键上存在的类型签名。 
             | 
| static interface  | AttributeSet.ColorAttribute
              该接口是期望存在于有助于呈现颜色的任何属性键上的类型签名。 
             | 
| static interface  | AttributeSet.FontAttribute
              此接口是预期存在于任何有助于确定用于呈现某些文本的字体的任何属性键上的类型签名。 
             | 
| static interface  | AttributeSet.ParagraphAttribute
              该接口是预期存在于对段落级别呈现有贡献的任何属性键上的类型签名。 
             | 
| Modifier and Type | Field and Description | 
|---|---|
| static Object | NameAttribute
              用于命名属性集合的属性名称。 
             | 
| static Object | ResolveAttribute
              用于标识解析父属性属性的属性名称(如果已定义)。 
             | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | containsAttribute(Object name, Object value)
              如果此集合定义了具有相同名称和相同值的属性,则返回 
              true。 | 
| boolean | containsAttributes(AttributeSet attributes)
              返回 
              true如果该集合定义了具有相等值的给定集合中的所有属性。 | 
| AttributeSet | copyAttributes()
              返回一个保证不会随时间变化的属性集。 
             | 
| Object | getAttribute(Object key)
              获取给定属性的值。 
             | 
| int | getAttributeCount()
              返回此集合中本地定义的属性数。 
             | 
| Enumeration<?> | getAttributeNames()
              返回在集合中本地定义的属性名称的枚举。 
             | 
| AttributeSet | getResolveParent()
              得到解决的父母。 
             | 
| boolean | isDefined(Object attrName)
              检查命名属性是否具有在集合中指定的值,而不通过另一个属性集进行解析。 
             | 
| boolean | isEqual(AttributeSet attr)
              确定两个属性集是否相等。 
             | 
static final Object NameAttribute
static final Object ResolveAttribute
int getAttributeCount()
boolean isDefined(Object attrName)
attrName - 属性名称 
           boolean isEqual(AttributeSet attr)
attr - 属性集 
           AttributeSet copyAttributes()
Object getAttribute(Object key)
key - 属性绑定的非空键 
           null如果没有找到 
           Enumeration<?> getAttributeNames()
Enumeration的值可能是任何值,并不限于特定的Object类型。 
            此方法从不返回null 。 对于没有属性的集合,它返回一个空的Enumeration 。 
boolean containsAttribute(Object name, Object value)
true 。 
           如果在本地找不到这样的属性,则在解析父级别中进行搜索。 
          name - 非空属性名称 
           value - 值 
           true如果集合在本地或通过其解析父对象定义了具有相等值的属性 
           NullPointerException - 如果 
            name或 
            value是 
            null 
           boolean containsAttributes(AttributeSet attributes)
true 。 
           如果在本地找不到属性,则在解析父级别中进行搜索。 
          attributes - 要检查的属性集 
           true如果此集合在本地或通过其解析父对象定义了所有具有相等值的属性 
           NullPointerException - 如果 
            attributes是 
            null 
           AttributeSet getResolveParent()
 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.