Home » openjdk-7 » javax » swing » text » [javadoc | source]
javax.swing.text
public class: SimpleAttributeSet [javadoc | source]
java.lang.Object
   javax.swing.text.SimpleAttributeSet

All Implemented Interfaces:
    MutableAttributeSet, Cloneable, java$io$Serializable

Direct Known Subclasses:
    TaggedAttributeSet, LargeConversionSet

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 java.beans.XMLEncoder .

Nested Class Summary:
static class  SimpleAttributeSet.EmptyAttributeSet  An AttributeSet that is always empty. 
Field Summary
public static final  AttributeSet EMPTY    An empty attribute set. 
Constructor:
 public SimpleAttributeSet() 
 public SimpleAttributeSet(AttributeSet source) 
    Creates a new attribute set based on a supplied set of attributes.
    Parameters:
    source - the set of attributes
Method from javax.swing.text.SimpleAttributeSet Summary:
addAttribute,   addAttributes,   clone,   containsAttribute,   containsAttributes,   copyAttributes,   equals,   getAttribute,   getAttributeCount,   getAttributeNames,   getResolveParent,   hashCode,   isDefined,   isEmpty,   isEqual,   removeAttribute,   removeAttributes,   removeAttributes,   setResolveParent,   toString
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from javax.swing.text.SimpleAttributeSet Detail:
 public  void addAttribute(Object name,
    Object value) 
    Adds an attribute to the list.
 public  void addAttributes(AttributeSet attributes) 
    Adds a set of attributes to the list.
 public Object clone() 
    Clones a set of attributes.
 public boolean containsAttribute(Object name,
    Object value) 
    Checks whether the attribute list contains a specified attribute name/value pair.
 public boolean containsAttributes(AttributeSet attributes) 
    Checks whether the attribute list contains all the specified name/value pairs.
 public AttributeSet copyAttributes() 
    Makes a copy of the attributes.
 public boolean equals(Object obj) 
    Compares this object to the specified object. The result is true if the object is an equivalent set of attributes.
 public Object getAttribute(Object name) 
    Gets the value of an attribute.
 public int getAttributeCount() 
    Gets a count of the number of attributes.
 public Enumeration<?> getAttributeNames() 
    Gets the names of the attributes in the set.
 public AttributeSet getResolveParent() 
    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.
 public int hashCode() 
    Returns a hashcode for this set of attributes.
 public boolean isDefined(Object attrName) 
    Tells whether a given attribute is defined.
 public boolean isEmpty() 
    Checks whether the set of attributes is empty.
 public boolean isEqual(AttributeSet attr) 
    Compares two attribute sets.
 public  void removeAttribute(Object name) 
    Removes an attribute from the list.
 public  void removeAttributes(Enumeration<?> names) 
    Removes a set of attributes from the list.
 public  void removeAttributes(AttributeSet attributes) 
    Removes a set of attributes from the list.
 public  void setResolveParent(AttributeSet parent) 
    Sets the resolving parent.
 public String toString() 
    Converts the attribute set to a String.