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 JavaBeans™ has been added to the java.beans package. Please see XMLEncoder.
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 JavaBeans™ has been added to the java.beans package. Please see XMLEncoder.
Static Constant.
An empty attribute set.
type: javax.swing.text.AttributeSet
Static Constant. An empty attribute set. type: javax.swing.text.AttributeSet
(->simple-attribute-set)
(->simple-attribute-set source)
Constructor.
Creates a new attribute set based on a supplied set of attributes.
source - the set of attributes - javax.swing.text.AttributeSet
Constructor. Creates a new attribute set based on a supplied set of attributes. source - the set of attributes - `javax.swing.text.AttributeSet`
(add-attribute this name value)
Adds an attribute to the list.
name - the attribute name - java.lang.Object
value - the attribute value - java.lang.Object
Adds an attribute to the list. name - the attribute name - `java.lang.Object` value - the attribute value - `java.lang.Object`
(add-attributes this attributes)
Adds a set of attributes to the list.
attributes - the set of attributes to add - javax.swing.text.AttributeSet
Adds a set of attributes to the list. attributes - the set of attributes to add - `javax.swing.text.AttributeSet`
(clone this)
Clones a set of attributes.
returns: the new set of attributes - java.lang.Object
Clones a set of attributes. returns: the new set of attributes - `java.lang.Object`
(contains-attribute this name value)
Checks whether the attribute list contains a specified attribute name/value pair.
name - the name - java.lang.Object
value - the value - java.lang.Object
returns: true if the name/value pair is in the list - boolean
Checks whether the attribute list contains a specified attribute name/value pair. name - the name - `java.lang.Object` value - the value - `java.lang.Object` returns: true if the name/value pair is in the list - `boolean`
(contains-attributes this attributes)
Checks whether the attribute list contains all the specified name/value pairs.
attributes - the attribute list - javax.swing.text.AttributeSet
returns: true if the list contains all the name/value pairs - boolean
Checks whether the attribute list contains all the specified name/value pairs. attributes - the attribute list - `javax.swing.text.AttributeSet` returns: true if the list contains all the name/value pairs - `boolean`
(copy-attributes this)
Makes a copy of the attributes.
returns: the copy - javax.swing.text.AttributeSet
Makes a copy of the attributes. returns: the copy - `javax.swing.text.AttributeSet`
(defined? this attr-name)
Tells whether a given attribute is defined.
attr-name - the attribute name - java.lang.Object
returns: true if the attribute is defined - boolean
Tells whether a given attribute is defined. attr-name - the attribute name - `java.lang.Object` returns: true if the attribute is defined - `boolean`
(empty? this)
Checks whether the set of attributes is empty.
returns: true if the set is empty else false - boolean
Checks whether the set of attributes is empty. returns: true if the set is empty else false - `boolean`
(equal? this attr)
Compares two attribute sets.
attr - the second attribute set - javax.swing.text.AttributeSet
returns: true if the sets are equal, false otherwise - boolean
Compares two attribute sets. attr - the second attribute set - `javax.swing.text.AttributeSet` returns: true if the sets are equal, false otherwise - `boolean`
(equals this obj)
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 - java.lang.Object
returns: true if the objects are equal;
false otherwise - boolean
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 - `java.lang.Object` returns: true if the objects are equal; false otherwise - `boolean`
(get-attribute this name)
Gets the value of an attribute.
name - the attribute name - java.lang.Object
returns: the value - java.lang.Object
Gets the value of an attribute. name - the attribute name - `java.lang.Object` returns: the value - `java.lang.Object`
(get-attribute-count this)
Gets a count of the number of attributes.
returns: the count - int
Gets a count of the number of attributes. returns: the count - `int`
(get-attribute-names this)
Gets the names of the attributes in the set.
returns: the names as an Enumeration - java.util.Enumeration<?>
Gets the names of the attributes in the set. returns: the names as an Enumeration - `java.util.Enumeration<?>`
(get-resolve-parent this)
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: the parent - javax.swing.text.AttributeSet
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: the parent - `javax.swing.text.AttributeSet`
(hash-code this)
Returns a hashcode for this set of attributes.
returns: a hashcode value for this set of attributes. - int
Returns a hashcode for this set of attributes. returns: a hashcode value for this set of attributes. - `int`
(remove-attribute this name)
Removes an attribute from the list.
name - the attribute name - java.lang.Object
Removes an attribute from the list. name - the attribute name - `java.lang.Object`
(remove-attributes this names)
Removes a set of attributes from the list.
names - the set of names to remove - java.util.Enumeration
Removes a set of attributes from the list. names - the set of names to remove - `java.util.Enumeration`
(set-resolve-parent this parent)
Sets the resolving parent.
parent - the parent - javax.swing.text.AttributeSet
Sets the resolving parent. parent - the parent - `javax.swing.text.AttributeSet`
(to-string this)
Converts the attribute set to a String.
returns: the string - java.lang.String
Converts the attribute set to a String. returns: the string - `java.lang.String`
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close