All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface com.sun.java.swing.text.Attributes

public interface Attributes
A collection of attributes to associate with an element in a document. Attributes are basically name-value pairs that potentially resolve in a hierarchy. The hierarchy of resolution may be different than the hierarchy formed by the elements structure.


Variable Index

 o NAME
Attribute name used to name the collection of attributes.

Method Index

 o addChangeListener(ChangeListener)
Add a listener to track whenever an attribute has been changed.
 o copyAttributes(Attributes)
 o getAttribute(String)
Fetch the value of the given attribute.
 o getAttributeNames()
Fetch the names of the attributes that are defined locally.
 o getLocalAttribute(String)
Fetch the value of the given attribute.
 o getResolveParent()
 o removeAttribute(String)
Remove the given attribute from the set.
 o removeAttributes()
 o removeChangeListener(ChangeListener)
Remove a listener that was tracking attribute changes.
 o setAttribute(String, Object)
Set the value for some general attribute.
 o setResolveParent(Attributes)

Variables

 o NAME
 public static final String NAME
Attribute name used to name the collection of attributes.

Methods

 o getAttribute
 public abstract Object getAttribute(String attrName)
Fetch the value of the given attribute. If the value is not found locally, the search is continued upward until the value is either found or there are no more parents. If the value is not found, null is returned.

 o getAttributeNames
 public abstract String[] getAttributeNames()
Fetch the names of the attributes that are defined locally.

 o getLocalAttribute
 public abstract Object getLocalAttribute(String attrName)
Fetch the value of the given attribute. If the value is not found locally, then discontinue the search and return null.

 o setAttribute
 public abstract void setAttribute(String attrName,
                                   Object attrValue)
Set the value for some general attribute.

Parameters:
attrName - The name of the attribute to set.
attrValue - The value to associate with the name
 o removeAttribute
 public abstract void removeAttribute(String attrName)
Remove the given attribute from the set. The attribute will not be defined locally and will only be resolved if defined by a parent attribute set.

Parameters:
attrName - The name of the attribute to remove
 o removeAttributes
 public abstract void removeAttributes()
 o copyAttributes
 public abstract void copyAttributes(Attributes atr)
 o getResolveParent
 public abstract Attributes getResolveParent()
 o setResolveParent
 public abstract void setResolveParent(Attributes parent)
 o addChangeListener
 public abstract void addChangeListener(ChangeListener l)
Add a listener to track whenever an attribute has been changed.

 o removeChangeListener
 public abstract void removeChangeListener(ChangeListener l)
Remove a listener that was tracking attribute changes.


All Packages  Class Hierarchy  This Package  Previous  Next  Index