All Packages Class Hierarchy This Package Previous Next Index
Class com.sun.java.swing.text.SimpleAttributeSet
java.lang.Object
|
+----com.sun.java.swing.text.SimpleAttributeSet
- public class SimpleAttributeSet
- extends Object
- implements MutableAttributeSet, Serializable
A straightforward implementation of MutableAttributeSet using a
hash table.
1.14 09/16/97
-
EMPTY
- An empty attribute set.
-
SimpleAttributeSet()
- Creates a new attribute set.
-
SimpleAttributeSet(AttributeSet)
- Creates a new attribute set based on a supplied set of attributes.
-
addAttribute(String, Object)
- Adds an attribute to the list.
-
addAttributes(AttributeSet)
- Adds a set of attributes to the list.
-
clone()
- Clones a set of attributes.
-
containsAttribute(String, Object)
- Checks whether the attribute list contains a
specified attribute name/value pair.
-
containsAttributes(AttributeSet)
- Checks whether the attribute list contains all the
specified name/value pairs.
-
copyAttributes()
-
-
getAttribute(String)
- Gets the value of an attribute.
-
getAttributeCount()
- Gets a count of the number of attributes.
-
getAttributeNames()
-
-
getResolveParent()
- Gets the resolving parent.
-
isDefined(String)
- Tells whether a given attribute is defined.
-
isEmpty()
- Checks whether the set of attributes is empty.
-
isEqual(AttributeSet)
- Gets a list of all attribute names.
-
removeAttribute(String)
- Removes an attribute from the list.
-
removeAttributes(AttributeSet)
- Removes a set of attributes from the list.
-
removeAttributes(Enumeration)
- Removes a set of attributes from the list.
-
setResolveParent(MutableAttributeSet)
- Sets the resolving parent.
-
toString()
-
EMPTY
public static final AttributeSet EMPTY
- An empty attribute set.
SimpleAttributeSet
public SimpleAttributeSet()
- Creates a new attribute set.
SimpleAttributeSet
public SimpleAttributeSet(AttributeSet source)
- Creates a new attribute set based on a supplied set of attributes.
- Parameters:
- source - the set of attributes
isEmpty
public boolean isEmpty()
- Checks whether the set of attributes is empty.
- Returns:
- true if the set is empty else false
getAttributeCount
public int getAttributeCount()
- Gets a count of the number of attributes.
- Returns:
- the count
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
isEqual
public boolean isEqual(AttributeSet attr)
- Gets a list of all attribute names.
- Returns:
- the list
copyAttributes
public AttributeSet copyAttributes()
getAttributeNames
public Enumeration getAttributeNames()
getAttribute
public Object getAttribute(String name)
- Gets the value of an attribute.
- Parameters:
- name - the attribute name
- Returns:
- the value
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
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
addAttribute
public void addAttribute(String name,
Object value)
- Adds an attribute to the list.
- Parameters:
- name - the attribute name
- value - the attribute value
addAttributes
public void addAttributes(AttributeSet attributes)
- Adds a set of attributes to the list.
- Parameters:
- attributes - the set of attributes to add
removeAttribute
public void removeAttribute(String name)
- Removes an attribute from the list.
- Parameters:
- name - the attribute name
removeAttributes
public void removeAttributes(Enumeration names)
- Removes a set of attributes from the list.
- Parameters:
- names - the set of names to remove
removeAttributes
public void removeAttributes(AttributeSet attributes)
- Removes a set of attributes from the list.
- Parameters:
- attributes - the set of attributes to remove
clone
public Object clone()
- Clones a set of attributes.
- Returns:
- the new set of attributes
- Overrides:
- clone in class Object
getResolveParent
public AttributeSet getResolveParent()
- Gets the resolving parent.
- Returns:
- the parent
setResolveParent
public void setResolveParent(MutableAttributeSet parent)
- Sets the resolving parent.
- Parameters:
- parent - the parent
toString
public String toString()
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index