Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

javax.swing.text
Interface AbstractDocument.AttributeContext  view AbstractDocument.AttributeContext download AbstractDocument.AttributeContext.java

All Known Implementing Classes:
StyleContext
Enclosing interface:
AbstractDocument

public static interface AbstractDocument.AttributeContext

Defines a set of methods for managing text attributes for one or more Documents. Replicating AttributeSets throughout a Document can be very expensive. Implementations of this interface are intended to provide intelligent management of AttributeSets, eliminating costly duplication.


Method Summary
 AttributeSet addAttribute(AttributeSet old, java.lang.Object name, java.lang.Object value)
          Returns an AttributeSet that contains the attributes of old plus the new attribute specified by name and value.
 AttributeSet addAttributes(AttributeSet old, AttributeSet attributes)
          Returns an AttributeSet that contains the attributes of old plus the new attributes in attributes.
 AttributeSet getEmptySet()
          Returns an empty AttributeSet.
 void reclaim(AttributeSet attributes)
          Called to indicate that the attributes in attributes are no longer used.
 AttributeSet removeAttribute(AttributeSet old, java.lang.Object name)
          Returns a AttributeSet that has the attribute with the specified name removed from old.
 AttributeSet removeAttributes(AttributeSet old, AttributeSet attributes)
          Removes all attributes in attributes from old and returns the resulting AttributeSet.
 AttributeSet removeAttributes(AttributeSet old, java.util.Enumeration names)
          Removes all attributes specified by names from old and returns the resulting AttributeSet.
 

Method Detail

addAttribute

public AttributeSet addAttribute(AttributeSet old,
                                 java.lang.Object name,
                                 java.lang.Object value)
Returns an AttributeSet that contains the attributes of old plus the new attribute specified by name and value.


addAttributes

public AttributeSet addAttributes(AttributeSet old,
                                  AttributeSet attributes)
Returns an AttributeSet that contains the attributes of old plus the new attributes in attributes.


getEmptySet

public AttributeSet getEmptySet()
Returns an empty AttributeSet.


reclaim

public void reclaim(AttributeSet attributes)
Called to indicate that the attributes in attributes are no longer used.


removeAttribute

public AttributeSet removeAttribute(AttributeSet old,
                                    java.lang.Object name)
Returns a AttributeSet that has the attribute with the specified name removed from old.


removeAttributes

public AttributeSet removeAttributes(AttributeSet old,
                                     AttributeSet attributes)
Removes all attributes in attributes from old and returns the resulting AttributeSet.


removeAttributes

public AttributeSet removeAttributes(AttributeSet old,
                                     java.util.Enumeration names)
Removes all attributes specified by names from old and returns the resulting AttributeSet.