All Packages Class Hierarchy This Package Previous Next Index
Interface com.sun.java.swing.text.MutableAttributeSet
- public interface MutableAttributeSet
- extends AttributeSet
A generic interface for a mutable collection of unique attributes.
Implementations will probably want to provide a constructor of the
form:
public XXXAttributeSet(ConstAttributeSet source);
-
addAttribute(Object, Object)
- Creates a new attribute set similar to this one except that it contains
an attribute with the given name and value.
-
addAttributes(AttributeSet)
- Creates a new attribute set similar to this one except that it contains
the given attributes and values.
-
removeAttribute(Object)
- Creates a new attribute set similar to this one except that it contains
no attribute with the given name.
-
removeAttributes(AttributeSet)
- Creates a new attribute set similar to this one except that it contains
no attribute with any of the given names and values.
-
removeAttributes(Enumeration)
- Creates a new attribute set similar to this one except that it contains
no attribute with any of the given names.
-
setResolveParent(AttributeSet)
- Sets the resolving parent.
addAttribute
public abstract void addAttribute(Object name,
Object value)
- Creates a new attribute set similar to this one except that it contains
an attribute with the given name and value. The object must be
immutable, or not mutated by any client.
- Parameters:
- name - the name
- value - the value
addAttributes
public abstract void addAttributes(AttributeSet attributes)
- Creates a new attribute set similar to this one except that it contains
the given attributes and values.
- Parameters:
- attributes - the set of attributes
removeAttribute
public abstract void removeAttribute(Object name)
- Creates a new attribute set similar to this one except that it contains
no attribute with the given name.
- Parameters:
- name - the attribute name
removeAttributes
public abstract void removeAttributes(Enumeration names)
- Creates a new attribute set similar to this one except that it contains
no attribute with any of the given names.
- Parameters:
- names - the set of names
removeAttributes
public abstract void removeAttributes(AttributeSet attributes)
- Creates a new attribute set similar to this one except that it contains
no attribute with any of the given names and values. Existing
attributes with the same name and different value will remain.
- Parameters:
- attributes - the set of attributes
setResolveParent
public abstract void setResolveParent(AttributeSet parent)
- Sets the resolving parent. This is the set
of attributes to resolve through if an attribute
isn't defined locally.
- Parameters:
- parent - the parent
All Packages Class Hierarchy This Package Previous Next Index