All Packages  Class Hierarchy  This Package  Previous  Next  Index  

Interface java.awt.swing.text.AbstractDocument.AttributeContext

public interface AbstractDocument.AttributeContext
An interface that can be used to allow MutableAttributeSet implementations to use pluggable attribute compression techniques. Each mutation of the attribute set can be used to exchange a previous AttributeSet instance with another, preserving the possibility of the AttributeSet remaining immutable. An implementation is provided by the StyleContext class. The Element implementations provided by this class use this interface to provide their MutableAttributeSet implementations, so that different AttributeSet compression techniques can be employed. The method getAttributeContext should be implemented to return the object responsible for implementing the desired compression technique.

See Also:
StyleContext

Method Index

 o addAttribute(AttributeSet, String, Object)
Adds an attribute to the given set, and returns the new representative set.
 o addAttributes(AttributeSet, AttributeSet)
Adds a set of attributes to the element.
 o getEmptySet()
Fetch an empty AttributeSet.
 o reclaim(AttributeSet)
This is a way for a MutableAttributeSet to mark that it no longer need a particular immutable set.
 o removeAttribute(AttributeSet, String)
Removes an attribute from the set.
 o removeAttributes(AttributeSet, AttributeSet)
Removes a set of attributes for the element.
 o removeAttributes(AttributeSet, Enumeration)
Removes a set of attributes for the element.

Methods

 o addAttribute
public abstract AttributeSet addAttribute(AttributeSet old,
                                          String name,
                                          Object value)
Adds an attribute to the given set, and returns the new representative set.

Parameters:
name - the attribute name
value - the attribute value
See Also:
addAttribute
 o addAttributes
public abstract AttributeSet addAttributes(AttributeSet old,
                                           AttributeSet attr)
Adds a set of attributes to the element.

Parameters:
attr - the attributes to add
See Also:
addAttribute
 o removeAttribute
public abstract AttributeSet removeAttribute(AttributeSet old,
                                             String name)
Removes an attribute from the set.

Parameters:
name - the attribute name
See Also:
removeAttribute
 o removeAttributes
public abstract AttributeSet removeAttributes(AttributeSet old,
                                              Enumeration names)
Removes a set of attributes for the element.

Parameters:
names - the attribute names
See Also:
removeAttributes
 o removeAttributes
public abstract AttributeSet removeAttributes(AttributeSet old,
                                              AttributeSet attrs)
Removes a set of attributes for the element.

Parameters:
attrs - the attributes
See Also:
removeAttributes
 o getEmptySet
public abstract AttributeSet getEmptySet()
Fetch an empty AttributeSet.

 o reclaim
public abstract void reclaim(AttributeSet a)
This is a way for a MutableAttributeSet to mark that it no longer need a particular immutable set. This is only necessary in 1.1 where there are no weak references. A 1.1 implementation would call this in it's finalize method.


All Packages  Class Hierarchy  This Package  Previous  Next  Index  

Submit a bug or feature