Warning
Serialized objects of this class will not be compatible with
future Swing releases. The current serialization support is
appropriate for short term storage or RMI between applications running
the same version of Swing. As of 1.4, support for long term storage
of all JavaBeans
has been added to the java.beans package.
Please see java..
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | SimpleAttributeSet.
An AttributeSet that is always empty. |
| Modifier and Type | Field and Description |
|---|---|
| public static final AttributeSet | EMPTY
An empty attribute set. |
| private static final long | serialVersionUID
Use serialVersionUID from JDK 1.7 for interoperability. |
| private transient LinkedHashMap |
| Access | Constructor and Description |
|---|---|
| public | |
| public | SimpleAttributeSet(AttributeSet
the set of attributes source)Creates a new attribute set based on a supplied set of attributes. |
| Modifier and Type | Method and Description |
|---|---|
| public void | addAttribute(Object
the attribute name name, Object the attribute value value)Implements javax. Adds an attribute to the list. |
| public void | addAttributes(AttributeSet
the set of attributes to add attributes)Implements javax. Adds a set of attributes to the list. |
| public Object | Returns: the new set of attributesOverrides java. Clones a set of attributes. |
| public boolean | Returns: true if the name/value pair is in the listthe name name, Object the value value)Implements javax. Checks whether the attribute list contains a specified attribute name/value pair. |
| public boolean | Returns: true if the list contains all the name/value pairsthe attribute list attributes)Implements javax. Checks whether the attribute list contains all the specified name/value pairs. |
| public AttributeSet | Returns: the copyImplements javax. Makes a copy of the attributes. |
| public boolean | Returns: true if the objects are equal;
false otherwisethe object to compare this attribute set with obj)Overrides java. Compares this object to the specified object. |
| public Object | Returns: the valuethe attribute name name)Implements javax. Gets the value of an attribute. |
| public int | Returns: the countImplements javax. Gets a count of the number of attributes. |
| public Enumeration | Returns: the names as anEnumerationImplements javax. Gets the names of the attributes in the set. |
| public AttributeSet | Returns: the parentImplements javax. Gets the resolving parent. |
| public int | Returns: a hashcode value for this set of attributes.Overrides java. Returns a hashcode for this set of attributes. |
| public boolean | Returns: true if the attribute is definedthe attribute name attrName)Implements javax. Tells whether a given attribute is defined. |
| public boolean | |
| public boolean | Returns: true if the sets are equal, false otherwisethe second attribute set attr)Implements javax. Compares two attribute sets. |
| private void | |
| public void | removeAttribute(Object
the attribute name name)Implements javax. Removes an attribute from the list. |
| public void | removeAttributes(Enumeration<?>
the set of names to remove names)Implements javax. Removes a set of attributes from the list. |
| public void | removeAttributes(AttributeSet
the set of attributes to remove attributes)Implements javax. Removes a set of attributes from the list. |
| public void | setResolveParent(AttributeSet
the parent parent)Implements javax. Sets the resolving parent. |
| public String | Returns: the stringOverrides java. Converts the attribute set to a String. |
| private void |
| EMPTY | back to summary |
|---|---|
| public static final AttributeSet EMPTY An empty attribute set. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Use serialVersionUID from JDK 1.7 for interoperability. | |
| table | back to summary |
|---|---|
| private transient LinkedHashMap<Object, Object> table | |
| SimpleAttributeSet | back to summary |
|---|---|
| public SimpleAttributeSet() Creates a new attribute set. | |
| SimpleAttributeSet | back to summary |
|---|---|
| public SimpleAttributeSet(AttributeSet source) Creates a new attribute set based on a supplied set of attributes.
| |
| addAttribute | back to summary |
|---|---|
| public void addAttribute(Object name, Object value) Implements javax. Adds an attribute to the list. | |
| addAttributes | back to summary |
|---|---|
| public void addAttributes(AttributeSet attributes) Implements javax. Adds a set of attributes to the list.
| |
| clone | back to summary |
|---|---|
| public Object clone() Overrides java. Clones a set of attributes.
| |
| containsAttribute | back to summary |
|---|---|
| public boolean containsAttribute(Object name, Object value) Implements javax. Checks whether the attribute list contains a specified attribute name/value pair. | |
| containsAttributes | back to summary |
|---|---|
| public boolean containsAttributes(AttributeSet attributes) Implements javax. Checks whether the attribute list contains all the specified name/value pairs.
| |
| copyAttributes | back to summary |
|---|---|
| public AttributeSet copyAttributes() Implements javax. Makes a copy of the attributes.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Compares this object to the specified object.
The result is
| |
| getAttribute | back to summary |
|---|---|
| public Object getAttribute(Object name) Implements javax. Gets the value of an attribute. | |
| getAttributeCount | back to summary |
|---|---|
| public int getAttributeCount() Implements javax. Gets a count of the number of attributes.
| |
| getAttributeNames | back to summary |
|---|---|
| public Enumeration Implements javax. Gets the names of the attributes in the set.
| |
| getResolveParent | back to summary |
|---|---|
| public AttributeSet getResolveParent() Implements javax. Gets the resolving parent. This is the set of attributes to resolve through if an attribute isn't defined locally. This is null if there are no other sets of attributes to resolve through.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Returns a hashcode for this set of attributes.
| |
| isDefined | back to summary |
|---|---|
| public boolean isDefined(Object attrName) Implements javax. Tells whether a given attribute is defined.
| |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() Checks whether the set of attributes is empty.
| |
| isEqual | back to summary |
|---|---|
| public boolean isEqual(AttributeSet attr) Implements javax. Compares two attribute sets.
| |
| readObject | back to summary |
|---|---|
private void readObject(ObjectInputStream s) throws ClassNotFoundException, IOException
| |
| removeAttribute | back to summary |
|---|---|
| public void removeAttribute(Object name) Implements javax. Removes an attribute from the list.
| |
| removeAttributes | back to summary |
|---|---|
| public void removeAttributes(Enumeration<?> names) Implements javax. Removes a set of attributes from the list.
| |
| removeAttributes | back to summary |
|---|---|
| public void removeAttributes(AttributeSet attributes) Implements javax. Removes a set of attributes from the list.
| |
| setResolveParent | back to summary |
|---|---|
| public void setResolveParent(AttributeSet parent) Implements javax. Sets the resolving parent.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Converts the attribute set to a String.
| |
| writeObject | back to summary |
|---|---|
private void writeObject(ObjectOutputStream s) throws IOException
| |
| Modifier and Type | Field and Description |
|---|---|
| private static final long | serialVersionUID
Use serialVersionUID from JDK 1.7 for interoperability. |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | containsAttribute(Object name, Object value)
Implements javax. Returns |
| public boolean | containsAttributes(AttributeSet attributes)
Implements javax. Returns |
| public AttributeSet | copyAttributes()
Implements javax. Returns an attribute set that is guaranteed not to change over time. |
| public boolean | equals(Object obj)
Overrides java. Indicates whether some other object is "equal to" this one. |
| public Object | getAttribute(Object key)
Implements javax. Fetches the value of the given attribute. |
| public int | getAttributeCount()
Implements javax. Returns the number of attributes that are defined locally in this set. |
| public Enumeration | getAttributeNames()
Implements javax. Returns an enumeration over the names of the attributes that are defined locally in the set. |
| public AttributeSet | getResolveParent()
Implements javax. Gets the resolving parent. |
| public int | |
| public boolean | isDefined(Object attrName)
Implements javax. Checks whether the named attribute has a value specified in the set without resolving through another attribute set. |
| public boolean | isEqual(AttributeSet attr)
Implements javax. Determines if the two attribute sets are equivalent. |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Use serialVersionUID from JDK 1.7 for interoperability. | |
| EmptyAttributeSet | back to summary |
|---|---|
| pack-priv EmptyAttributeSet() | |
| containsAttribute | back to summary |
|---|---|
| public boolean containsAttribute(Object name, Object value) Implements javax. Doc from javax. Returns | |
| containsAttributes | back to summary |
|---|---|
| public boolean containsAttributes(AttributeSet attributes) Implements javax. Doc from javax. Returns | |
| copyAttributes | back to summary |
|---|---|
| public AttributeSet copyAttributes() Implements javax. Doc from javax. Returns an attribute set that is guaranteed not to change over time. | |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getAttribute | back to summary |
|---|---|
| public Object getAttribute(Object key) Implements javax. Doc from javax. 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() Implements javax. Doc from javax. 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 Implements javax. Doc from javax. 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() Implements javax. Doc from javax. Gets the resolving parent. | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| isDefined | back to summary |
|---|---|
| public boolean isDefined(Object attrName) Implements javax. Doc from javax. 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) Implements javax. Doc from javax. Determines if the two attribute sets are equivalent. | |