java.lang.Object | |
↳ | javax.swing.text.SimpleAttributeSet |
A straightforward implementation of MutableAttributeSet using a hash table.
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 JavaBeansTM
has been added to the java.beans
package.
Please see XMLEncoder
.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
EMPTY | An empty attribute set. |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new attribute set.
| |||||||||||
Creates a new attribute set based on a supplied set of attributes.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Adds an attribute to the list.
| |||||||||||
Adds a set of attributes to the list.
| |||||||||||
Clones a set of attributes.
| |||||||||||
Checks whether the attribute list contains a
specified attribute name/value pair.
| |||||||||||
Checks whether the attribute list contains all the
specified name/value pairs.
| |||||||||||
Makes a copy of the attributes.
| |||||||||||
Compares this object to the specified object.
| |||||||||||
Gets the value of an attribute.
| |||||||||||
Gets a count of the number of attributes.
| |||||||||||
Gets the names of the attributes in the set.
| |||||||||||
Gets the resolving parent.
| |||||||||||
Returns a hashcode for this set of attributes.
| |||||||||||
Tells whether a given attribute is defined.
| |||||||||||
Checks whether the set of attributes is empty.
| |||||||||||
Compares two attribute sets.
| |||||||||||
Removes an attribute from the list.
| |||||||||||
Removes a set of attributes from the list.
| |||||||||||
Removes a set of attributes from the list.
| |||||||||||
Sets the resolving parent.
| |||||||||||
Converts the attribute set to a String.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() |
Creates a new attribute set.
Creates a new attribute set based on a supplied set of attributes.
source | the set of attributes |
---|
Adds an attribute to the list.
name | the attribute name |
---|---|
value | the attribute value |
Adds a set of attributes to the list.
attributes | the set of attributes to add |
---|
Checks whether the attribute list contains a specified attribute name/value pair.
name | the name |
---|---|
value | the value |
Checks whether the attribute list contains all the specified name/value pairs.
attributes | the attribute list |
---|
Compares this object to the specified object.
The result is true
if the object is an equivalent
set of attributes.
obj | the object to compare this attribute set with |
---|
true
if the objects are equal;
false
otherwise
Gets the value of an attribute.
name | the attribute name |
---|
Gets a count of the number of attributes.
Gets the names of the attributes in the set.
Enumeration
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.
Returns a hashcode for this set of attributes.
Tells whether a given attribute is defined.
attrName | the attribute name |
---|
Checks whether the set of attributes is empty.
Compares two attribute sets.
attr | the second attribute set |
---|
Removes an attribute from the list.
name | the attribute name |
---|
Removes a set of attributes from the list.
attributes | the set of attributes to remove |
---|
Removes a set of attributes from the list.
names | the set of names to remove |
---|
Sets the resolving parent.
parent | the parent |
---|