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.
-
NAME
- Attribute name used to name the collection of
attributes.
-
addChangeListener(ChangeListener)
- Add a listener to track whenever an attribute
has been changed.
-
copyAttributes(Attributes)
-
-
getAttribute(String)
- Fetch the value of the given attribute.
-
getAttributeNames()
- Fetch the names of the attributes that are defined locally.
-
getLocalAttribute(String)
- Fetch the value of the given attribute.
-
getResolveParent()
-
-
removeAttribute(String)
- Remove the given attribute from the set.
-
removeAttributes()
-
-
removeChangeListener(ChangeListener)
- Remove a listener that was tracking attribute changes.
-
setAttribute(String, Object)
- Set the value for some general attribute.
-
setResolveParent(Attributes)
-
NAME
public static final String NAME
- Attribute name used to name the collection of
attributes.
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.
getAttributeNames
public abstract String[] getAttributeNames()
- Fetch the names of the attributes that are defined locally.
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.
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
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
removeAttributes
public abstract void removeAttributes()
copyAttributes
public abstract void copyAttributes(Attributes atr)
getResolveParent
public abstract Attributes getResolveParent()
setResolveParent
public abstract void setResolveParent(Attributes parent)
addChangeListener
public abstract void addChangeListener(ChangeListener l)
- Add a listener to track whenever an attribute
has been changed.
removeChangeListener
public abstract void removeChangeListener(ChangeListener l)
- Remove a listener that was tracking attribute changes.
All Packages Class Hierarchy This Package Previous Next Index