This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.swing.text
interface AbstractDocument.AttributeContext

All Known Implementing Classes:
StyleContext, StyleSheet

public static 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.


Method Summary
 AttributeSet
addAttribute(AttributeSet old, Object name, Object value)

          Adds an attribute to the given set, and returns the new representative set.
 AttributeSet

          Adds a set of attributes to the element.
 AttributeSet

          Fetches an empty AttributeSet.
 void

          Reclaims an attribute set.
 AttributeSet

          Removes an attribute from the set.
 AttributeSet

          Removes a set of attributes for the element.
 AttributeSet

          Removes a set of attributes for the element.
 

Method Detail

addAttribute

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

Parameters:
old - the old attribute set
name - the non-null attribute name
value - the attribute value
Returns:
the updated attribute set

addAttributes

public AttributeSet addAttributes(AttributeSet old,
                                  AttributeSet attr)
Adds a set of attributes to the element.

Parameters:
old - the old attribute set
attr - the attributes to add
Returns:
the updated attribute set

getEmptySet

public AttributeSet getEmptySet()
Fetches an empty AttributeSet.

Returns:
the attribute set

reclaim

public void reclaim(AttributeSet a)
Reclaims an attribute set. 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 its finalize method.

Parameters:
a - the attribute set to reclaim

removeAttribute

public AttributeSet removeAttribute(AttributeSet old,
                                    Object name)
Removes an attribute from the set.

Parameters:
old - the old attribute set
name - the non-null attribute name
Returns:
the updated attribute set

removeAttributes

public AttributeSet removeAttributes(AttributeSet old,
                                     AttributeSet attrs)
Removes a set of attributes for the element.

Parameters:
old - the old attribute set
attrs - the attributes
Returns:
the updated attribute set

removeAttributes

public AttributeSet removeAttributes(AttributeSet old,
                                     Enumeration names)
Removes a set of attributes for the element.

Parameters:
old - the old attribute set
names - the attribute names
Returns:
the updated attribute set


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.