All Packages  Class Hierarchy  This Package  Previous  Next  Index  

Class java.awt.swing.text.SimpleAttributeSet

java.lang.Object
    |
    +----java.awt.swing.text.SimpleAttributeSet

public class SimpleAttributeSet
extends Object
implements MutableAttributeSet, Serializable
A straightforward implementation of MutableAttributeSet using a hash table. 1.15 10/13/97


Variable Index

 o EMPTY
An empty attribute set.

Constructor Index

 o SimpleAttributeSet()
Creates a new attribute set.
 o SimpleAttributeSet(AttributeSet)
Creates a new attribute set based on a supplied set of attributes.

Method Index

 o addAttribute(String, Object)
Adds an attribute to the list.
 o addAttributes(AttributeSet)
Adds a set of attributes to the list.
 o clone()
Clones a set of attributes.
 o containsAttribute(String, Object)
Checks whether the attribute list contains a specified attribute name/value pair.
 o containsAttributes(AttributeSet)
Checks whether the attribute list contains all the specified name/value pairs.
 o copyAttributes()
Makes a copy of the attributes.
 o getAttribute(String)
Gets the value of an attribute.
 o getAttributeCount()
Gets a count of the number of attributes.
 o getAttributeNames()
Gets the names of the attributes in the set.
 o getResolveParent()
Gets the resolving parent.
 o isDefined(String)
Tells whether a given attribute is defined.
 o isEmpty()
Checks whether the set of attributes is empty.
 o isEqual(AttributeSet)
Compares two attribute sets.
 o removeAttribute(String)
Removes an attribute from the list.
 o removeAttributes(AttributeSet)
Removes a set of attributes from the list.
 o removeAttributes(Enumeration)
Removes a set of attributes from the list.
 o setResolveParent(MutableAttributeSet)
Sets the resolving parent.
 o toString()
Converts the attribute set to a String.

Variables

 o EMPTY
public static final AttributeSet EMPTY
An empty attribute set.

Constructors

 o SimpleAttributeSet
public SimpleAttributeSet()
Creates a new attribute set.

 o SimpleAttributeSet
public SimpleAttributeSet(AttributeSet source)
Creates a new attribute set based on a supplied set of attributes.

Parameters:
source - the set of attributes

Methods

 o isEmpty
public boolean isEmpty()
Checks whether the set of attributes is empty.

Returns:
true if the set is empty else false
 o getAttributeCount
public int getAttributeCount()
Gets a count of the number of attributes.

Returns:
the count
 o isDefined
public boolean isDefined(String attrName)
Tells whether a given attribute is defined.

Parameters:
attrName - the attribute name
Returns:
true if the attribute is defined
 o isEqual
public boolean isEqual(AttributeSet attr)
Compares two attribute sets.

Parameters:
attr - the second attribute set
Returns:
true if equathe listl
 o copyAttributes
public AttributeSet copyAttributes()
Makes a copy of the attributes.

Returns:
the copy
 o getAttributeNames
public Enumeration getAttributeNames()
Gets the names of the attributes in the set.

Returns:
the names
 o getAttribute
public Object getAttribute(String name)
Gets the value of an attribute.

Parameters:
name - the attribute name
Returns:
the value
 o containsAttribute
public boolean containsAttribute(String name,
                                 Object value)
Checks whether the attribute list contains a specified attribute name/value pair.

Parameters:
name - the name
value - the value
Returns:
true if the name/value pair is in the list
 o containsAttributes
public boolean containsAttributes(AttributeSet attributes)
Checks whether the attribute list contains all the specified name/value pairs.

Parameters:
attributes - the attribute list
Returns:
true if the list contains all the name/value pairs
 o addAttribute
public void addAttribute(String name,
                         Object value)
Adds an attribute to the list.

Parameters:
name - the attribute name
value - the attribute value
 o addAttributes
public void addAttributes(AttributeSet attributes)
Adds a set of attributes to the list.

Parameters:
attributes - the set of attributes to add
 o removeAttribute
public void removeAttribute(String name)
Removes an attribute from the list.

Parameters:
name - the attribute name
 o removeAttributes
public void removeAttributes(Enumeration names)
Removes a set of attributes from the list.

Parameters:
names - the set of names to remove
 o removeAttributes
public void removeAttributes(AttributeSet attributes)
Removes a set of attributes from the list.

Parameters:
attributes - the set of attributes to remove
 o clone
public Object clone()
Clones a set of attributes.

Returns:
the new set of attributes
Overrides:
clone in class Object
 o getResolveParent
public AttributeSet getResolveParent()
Gets the resolving parent.

Returns:
the parent
 o setResolveParent
public void setResolveParent(MutableAttributeSet parent)
Sets the resolving parent.

Parameters:
parent - the parent
 o toString
public String toString()
Converts the attribute set to a String.

Returns:
the string
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index  

Submit a bug or feature