Attributes can potentially resolve in a hierarchy. If a key doesn't resolve locally, and a resolving parent exists, the key will be resolved through the parent.
MutableAttributeSet
| Modifier and Type | Class and Description |
|---|---|
| public static interface | AttributeSet.
This interface is the type signature that is expected to be present on any attribute key that contributes to character level presentation. |
| public static interface | AttributeSet.
This interface is the type signature that is expected to be present on any attribute key that contributes to presentation of color. |
| public static interface | AttributeSet.
This interface is the type signature that is expected to be present on any attribute key that contributes to the determination of what font to use to render some text. |
| public static interface | AttributeSet.
This interface is the type signature that is expected to be present on any attribute key that contributes to the paragraph level presentation. |
| Modifier and Type | Field and Description |
|---|---|
| public static final Object | NameAttribute
Attribute name used to name the collection of attributes. |
| public static final Object | ResolveAttribute
Attribute name used to identify the resolving parent set of attributes, if one is defined. |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if the set defines the attribute with an
equal value, either locally or through its resolving parentthe non-null attribute name name, Object the value value)Returns |
| public boolean | Returns: true if this set defines all the attributes with equal
values, either locally or through its resolving parentthe set of attributes to check against attributes)Returns |
| public AttributeSet | Returns: a copy of the attribute setReturns an attribute set that is guaranteed not to change over time. |
| public Object | Returns: the value of the attribute, ornull if not foundthe non-null key of the attribute binding key)Fetches the value of the given attribute. |
| public int | Returns: the number of attributes >= 0Returns the number of attributes that are defined locally in this set. |
| public Enumeration | Returns: the namesReturns an enumeration over the names of the attributes that are defined locally in the set. |
| public AttributeSet | |
| public boolean | |
| public boolean | Returns: true if the sets are equivalentan attribute set attr)Determines if the two attribute sets are equivalent. |
| NameAttribute | back to summary |
|---|---|
| public static final Object NameAttribute Attribute name used to name the collection of attributes. | |
| ResolveAttribute | back to summary |
|---|---|
| public static final Object ResolveAttribute Attribute name used to identify the resolving parent set of attributes, if one is defined. | |
| containsAttribute | back to summary |
|---|---|
| public boolean containsAttribute(Object name, Object value) Returns
| |
| containsAttributes | back to summary |
|---|---|
| public boolean containsAttributes(AttributeSet attributes) Returns
| |
| copyAttributes | back to summary |
|---|---|
| public AttributeSet copyAttributes() Returns an attribute set that is guaranteed not to change over time.
| |
| getAttribute | back to summary |
|---|---|
| public Object getAttribute(Object key) Fetches the value of the given attribute. If the value is not found locally, the search is continued upward through the resolving parent (if one exists) until the value is either found or there are no more parents. If the value is not found, null is returned. | |
| getAttributeCount | back to summary |
|---|---|
| public int getAttributeCount() Returns the number of attributes that are defined locally in this set. Attributes that are defined in the parent set are not included.
| |
| getAttributeNames | back to summary |
|---|---|
| public Enumeration Returns an enumeration over the names of the attributes that are
defined locally in the set. Names of attributes defined in the
resolving parent, if any, are not included. The values of the
This method never returns
| |
| getResolveParent | back to summary |
|---|---|
| public AttributeSet getResolveParent() Gets the resolving parent.
| |
| isDefined | back to summary |
|---|---|
| public boolean isDefined(Object attrName) Checks whether the named attribute has a value specified in the set without resolving through another attribute set.
| |
| isEqual | back to summary |
|---|---|
| public boolean isEqual(AttributeSet attr) Determines if the two attribute sets are equivalent.
| |