<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Tue Jun 29 06:01:33 GMT+01:00 1999 -->
<TITLE>
Swing 1.1 API Specification: Class  StyleContext
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
</HEAD>
<BODY BGCOLOR="white">

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" ID="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT ID="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" ID="NavBarCell1Rev"> &nbsp;<FONT ID="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="class-use/StyleContext.html"><FONT ID="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../../index-files/index-1.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
Swing 1.1</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../javax/swing/text/StyleConstants.ParagraphConstants.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../javax/swing/text/StyleContext.NamedStyle.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="StyleContext.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2">
  SUMMARY: &nbsp;<A HREF="#inner_class_summary">INNER</A>&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
javax.swing.text</FONT>
<BR>
Class  StyleContext</H2>
<PRE>
java.lang.Object
  |
  +--<B>javax.swing.text.StyleContext</B>
</PRE>
<DL>
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../javax/swing/text/html/StyleSheet.html">StyleSheet</A></DD>
</DL>
<HR>
<DL>
<DT>public class <B>StyleContext</B><DT>extends java.lang.Object<DT>implements java.io.Serializable, <A HREF="../../../javax/swing/text/AbstractDocument.AttributeContext.html">AbstractDocument.AttributeContext</A></DL>

<P>
A pool of styles and their associated resources.  This class determines
 the lifetime of a group of resources by being a container that holds
 caches for various resources such as font and color that get reused 
 by the various style definitions.  This can be shared by multiple
 documents if desired to maximize the sharing of related resources.
 <p>
 This class also provides efficient support for small sets of attributes
 and compresses them by sharing across uses and taking advantage of 
 their immutable nature.  Since many styles are replicated, the potential
 for sharing is significant, and copies can be extremely cheap.  
 Larger sets reduce the possibility of sharing, and therefore revert 
 automatically to a less space-efficient implementation.
 <p>
 <strong>Warning:</strong>
 Serialized objects of this class will not be compatible with 
 future Swing releases.  The current serialization support is appropriate
 for short term storage or RMI between applications running the same
 version of Swing.  A future release of Swing will provide support for
 long term persistence.
<P>
<DL>
<DT><B>See Also: </B><DD><A HREF="../../../serialized-form.html#javax.swing.text.StyleContext">Serialized Form</A></DL>
<HR>

<P>
<!-- ======== INNER CLASS SUMMARY ======== -->

<A NAME="inner_class_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" ID="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Inner Class Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;class</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/StyleContext.NamedStyle.html">StyleContext.NamedStyle</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A collection of attributes, typically used to represent
 character and paragraph styles.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;class</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/StyleContext.SmallAttributeSet.html">StyleContext.SmallAttributeSet</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This class holds a small number of attributes in an array.</TD>
</TR>
</TABLE>
&nbsp;
<!-- =========== FIELD SUMMARY =========== -->

<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" ID="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Field Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/StyleContext.html#DEFAULT_STYLE">DEFAULT_STYLE</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The name given to the default logical style attached
 to paragraphs.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" ID="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD><CODE><B><A HREF="../../../javax/swing/text/StyleContext.html#StyleContext()">StyleContext</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new StyleContext object.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" ID="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/StyleContext.html#addAttribute(javax.swing.text.AttributeSet, java.lang.Object, java.lang.Object)">addAttribute</A></B>(<A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A>&nbsp;old,
             java.lang.Object&nbsp;name,
             java.lang.Object&nbsp;value)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds an attribute to the given set, and returns
 the new representative set.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/StyleContext.html#addAttributes(javax.swing.text.AttributeSet, javax.swing.text.AttributeSet)">addAttributes</A></B>(<A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A>&nbsp;old,
              <A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A>&nbsp;attr)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a set of attributes to the element.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/StyleContext.html#addChangeListener(javax.swing.event.ChangeListener)">addChangeListener</A></B>(<A HREF="../../../javax/swing/event/ChangeListener.html">ChangeListener</A>&nbsp;l)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a listener to track when styles are added
 or removed.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../javax/swing/text/Style.html">Style</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/StyleContext.html#addStyle(java.lang.String, javax.swing.text.Style)">addStyle</A></B>(java.lang.String&nbsp;nm,
         <A HREF="../../../javax/swing/text/Style.html">Style</A>&nbsp;parent)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a new style into the style hierarchy.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../../../javax/swing/text/MutableAttributeSet.html">MutableAttributeSet</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/StyleContext.html#createLargeAttributeSet(javax.swing.text.AttributeSet)">createLargeAttributeSet</A></B>(<A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A>&nbsp;a)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a large set of attributes that should trade off
 space for time.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../../../javax/swing/text/StyleContext.SmallAttributeSet.html">StyleContext.SmallAttributeSet</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/StyleContext.html#createSmallAttributeSet(javax.swing.text.AttributeSet)">createSmallAttributeSet</A></B>(<A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A>&nbsp;a)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a compact set of attributes that might be shared.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.awt.Color</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/StyleContext.html#getBackground(javax.swing.text.AttributeSet)">getBackground</A></B>(<A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A>&nbsp;attr)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Takes a set of attributes and turn it into a background color
 specification.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/StyleContext.html#getCompressionThreshold()">getCompressionThreshold</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the maximum number of key/value pairs to try and 
 compress into unique/immutable sets.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../javax/swing/text/StyleContext.html">StyleContext</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/StyleContext.html#getDefaultStyleContext()">getDefaultStyleContext</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns default AttributeContext shared by all documents that
 don't bother to define/supply their own context.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/StyleContext.html#getEmptySet()">getEmptySet</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Fetches an empty AttributeSet.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.awt.Font</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/StyleContext.html#getFont(javax.swing.text.AttributeSet)">getFont</A></B>(<A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A>&nbsp;attr)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the font from an attribute set.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.awt.Font</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/StyleContext.html#getFont(java.lang.String, int, int)">getFont</A></B>(java.lang.String&nbsp;family,
        int&nbsp;style,
        int&nbsp;size)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets a new font.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.awt.FontMetrics</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/StyleContext.html#getFontMetrics(java.awt.Font)">getFontMetrics</A></B>(java.awt.Font&nbsp;f)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns font metrics for a font.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.awt.Color</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/StyleContext.html#getForeground(javax.swing.text.AttributeSet)">getForeground</A></B>(<A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A>&nbsp;attr)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Takes a set of attributes and turn it into a foreground color
 specification.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/StyleContext.html#getStaticAttribute(java.lang.Object)">getStaticAttribute</A></B>(java.lang.Object&nbsp;key)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the object previously registered with
 <code>registerStaticAttributeKey</code>.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/StyleContext.html#getStaticAttributeKey(java.lang.Object)">getStaticAttributeKey</A></B>(java.lang.Object&nbsp;key)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the String that <code>key</code> will be registered with</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../javax/swing/text/Style.html">Style</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/StyleContext.html#getStyle(java.lang.String)">getStyle</A></B>(java.lang.String&nbsp;nm)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Fetches a named style previously added to the document</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.Enumeration</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/StyleContext.html#getStyleNames()">getStyleNames</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Fetches the names of the styles defined.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/StyleContext.html#readAttributes(java.io.ObjectInputStream, javax.swing.text.MutableAttributeSet)">readAttributes</A></B>(java.io.ObjectInputStream&nbsp;in,
               <A HREF="../../../javax/swing/text/MutableAttributeSet.html">MutableAttributeSet</A>&nbsp;a)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Context-specific handling of reading in attributes</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/StyleContext.html#readAttributeSet(java.io.ObjectInputStream, javax.swing.text.MutableAttributeSet)">readAttributeSet</A></B>(java.io.ObjectInputStream&nbsp;in,
                 <A HREF="../../../javax/swing/text/MutableAttributeSet.html">MutableAttributeSet</A>&nbsp;a)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads a set of attributes from the given object input
 stream that have been previously written out with
 <code>writeAttributeSet</code>.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/StyleContext.html#reclaim(javax.swing.text.AttributeSet)">reclaim</A></B>(<A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A>&nbsp;a)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a set no longer needed by the MutableAttributeSet implmentation.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/StyleContext.html#registerStaticAttributeKey(java.lang.Object)">registerStaticAttributeKey</A></B>(java.lang.Object&nbsp;key)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Registers an object as a static object that is being
 used as a key in attribute sets.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/StyleContext.html#removeAttribute(javax.swing.text.AttributeSet, java.lang.Object)">removeAttribute</A></B>(<A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A>&nbsp;old,
                java.lang.Object&nbsp;name)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes an attribute from the set.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/StyleContext.html#removeAttributes(javax.swing.text.AttributeSet, javax.swing.text.AttributeSet)">removeAttributes</A></B>(<A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A>&nbsp;old,
                 <A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A>&nbsp;attrs)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes a set of attributes for the element.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/StyleContext.html#removeAttributes(javax.swing.text.AttributeSet, java.util.Enumeration)">removeAttributes</A></B>(<A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A>&nbsp;old,
                 java.util.Enumeration&nbsp;names)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes a set of attributes for the element.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/StyleContext.html#removeChangeListener(javax.swing.event.ChangeListener)">removeChangeListener</A></B>(<A HREF="../../../javax/swing/event/ChangeListener.html">ChangeListener</A>&nbsp;l)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes a listener that was tracking styles being
 added or removed.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/StyleContext.html#removeStyle(java.lang.String)">removeStyle</A></B>(java.lang.String&nbsp;nm)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes a named style previously added to the document.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/StyleContext.html#toString()">toString</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Converts a StyleContext to a String.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/StyleContext.html#writeAttributes(java.io.ObjectOutputStream, javax.swing.text.AttributeSet)">writeAttributes</A></B>(java.io.ObjectOutputStream&nbsp;out,
                <A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A>&nbsp;a)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Context-specific handling of writing out attributes</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/StyleContext.html#writeAttributeSet(java.io.ObjectOutputStream, javax.swing.text.AttributeSet)">writeAttributeSet</A></B>(java.io.ObjectOutputStream&nbsp;out,
                  <A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A>&nbsp;a)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes a set of attributes to the given object stream
 for the purpose of serialization.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" ID="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD><CODE>clone, 
equals, 
finalize, 
getClass, 
hashCode, 
notify, 
notifyAll, 
wait, 
wait, 
wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->

<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" ID="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Field Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="DEFAULT_STYLE"><!-- --></A><H3>
DEFAULT_STYLE</H3>
<PRE>
public static final java.lang.String <B>DEFAULT_STYLE</B></PRE>
<DL>
<DD>The name given to the default logical style attached
 to paragraphs.</DL>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" ID="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="StyleContext()"><!-- --></A><H3>
StyleContext</H3>
<PRE>
public <B>StyleContext</B>()</PRE>
<DL>
<DD>Creates a new StyleContext object.</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" ID="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="getDefaultStyleContext()"><!-- --></A><H3>
getDefaultStyleContext</H3>
<PRE>
public static final <A HREF="../../../javax/swing/text/StyleContext.html">StyleContext</A> <B>getDefaultStyleContext</B>()</PRE>
<DL>
<DD>Returns default AttributeContext shared by all documents that
 don't bother to define/supply their own context.<DD><DL>
<DT><B>Returns:</B><DD>the context</DL>
</DD>
</DL>
<HR>

<A NAME="addStyle(java.lang.String, javax.swing.text.Style)"><!-- --></A><H3>
addStyle</H3>
<PRE>
public <A HREF="../../../javax/swing/text/Style.html">Style</A> <B>addStyle</B>(java.lang.String&nbsp;nm,
                      <A HREF="../../../javax/swing/text/Style.html">Style</A>&nbsp;parent)</PRE>
<DL>
<DD>Adds a new style into the style hierarchy.  Style attributes
 resolve from bottom up so an attribute specified in a child
 will override an attribute specified in the parent.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>nm</CODE> - the name of the style (must be unique within the
   collection of named styles in the document).  The name may 
   be null if the style is unnamed, but the caller is responsible
   for managing the reference returned as an unnamed style can't
   be fetched by name.  An unnamed style may be useful for things
   like character attribute overrides such as found in a style 
   run.<DD><CODE>parent</CODE> - the parent style.  This may be null if unspecified
   attributes need not be resolved in some other style.<DT><B>Returns:</B><DD>the created style</DL>
</DD>
</DL>
<HR>

<A NAME="removeStyle(java.lang.String)"><!-- --></A><H3>
removeStyle</H3>
<PRE>
public void <B>removeStyle</B>(java.lang.String&nbsp;nm)</PRE>
<DL>
<DD>Removes a named style previously added to the document.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>nm</CODE> - the name of the style to remove</DL>
</DD>
</DL>
<HR>

<A NAME="getStyle(java.lang.String)"><!-- --></A><H3>
getStyle</H3>
<PRE>
public <A HREF="../../../javax/swing/text/Style.html">Style</A> <B>getStyle</B>(java.lang.String&nbsp;nm)</PRE>
<DL>
<DD>Fetches a named style previously added to the document<DD><DL>
<DT><B>Parameters:</B><DD><CODE>nm</CODE> - the name of the style<DT><B>Returns:</B><DD>the style</DL>
</DD>
</DL>
<HR>

<A NAME="getStyleNames()"><!-- --></A><H3>
getStyleNames</H3>
<PRE>
public java.util.Enumeration <B>getStyleNames</B>()</PRE>
<DL>
<DD>Fetches the names of the styles defined.<DD><DL>
<DT><B>Returns:</B><DD>the list of names as an enumeration</DL>
</DD>
</DL>
<HR>

<A NAME="addChangeListener(javax.swing.event.ChangeListener)"><!-- --></A><H3>
addChangeListener</H3>
<PRE>
public void <B>addChangeListener</B>(<A HREF="../../../javax/swing/event/ChangeListener.html">ChangeListener</A>&nbsp;l)</PRE>
<DL>
<DD>Adds a listener to track when styles are added
 or removed.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>l</CODE> - the change listener</DL>
</DD>
</DL>
<HR>

<A NAME="removeChangeListener(javax.swing.event.ChangeListener)"><!-- --></A><H3>
removeChangeListener</H3>
<PRE>
public void <B>removeChangeListener</B>(<A HREF="../../../javax/swing/event/ChangeListener.html">ChangeListener</A>&nbsp;l)</PRE>
<DL>
<DD>Removes a listener that was tracking styles being
 added or removed.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>l</CODE> - the change listener</DL>
</DD>
</DL>
<HR>

<A NAME="getFont(javax.swing.text.AttributeSet)"><!-- --></A><H3>
getFont</H3>
<PRE>
public java.awt.Font <B>getFont</B>(<A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A>&nbsp;attr)</PRE>
<DL>
<DD>Gets the font from an attribute set.  This is
 implemented to try and fetch a cached font
 for the given AttributeSet, and if that fails 
 the font features are resolved and the
 font is fetched from the low-level font cache.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>attr</CODE> - the attribute set<DT><B>Returns:</B><DD>the font</DL>
</DD>
</DL>
<HR>

<A NAME="getForeground(javax.swing.text.AttributeSet)"><!-- --></A><H3>
getForeground</H3>
<PRE>
public java.awt.Color <B>getForeground</B>(<A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A>&nbsp;attr)</PRE>
<DL>
<DD>Takes a set of attributes and turn it into a foreground color
 specification.  This might be used to specify things
 like brighter, more hue, etc.  By default it simply returns
 the value specified by the StyleConstants.Foreground attribute.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>attr</CODE> - the set of attributes<DT><B>Returns:</B><DD>the color</DL>
</DD>
</DL>
<HR>

<A NAME="getBackground(javax.swing.text.AttributeSet)"><!-- --></A><H3>
getBackground</H3>
<PRE>
public java.awt.Color <B>getBackground</B>(<A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A>&nbsp;attr)</PRE>
<DL>
<DD>Takes a set of attributes and turn it into a background color
 specification.  This might be used to specify things
 like brighter, more hue, etc.  By default it simply returns
 the value specified by the StyleConstants.Background attribute.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>attr</CODE> - the set of attributes<DT><B>Returns:</B><DD>the color</DL>
</DD>
</DL>
<HR>

<A NAME="getFont(java.lang.String, int, int)"><!-- --></A><H3>
getFont</H3>
<PRE>
public java.awt.Font <B>getFont</B>(java.lang.String&nbsp;family,
                             int&nbsp;style,
                             int&nbsp;size)</PRE>
<DL>
<DD>Gets a new font.  This returns a Font from a cache
 if a cached font exists.  If not, a Font is added to
 the cache.  This is basically a low-level cache for
 1.1 font features.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>family</CODE> - the font family (such as "Monospaced")<DD><CODE>style</CODE> - the style of the font (such as Font.PLAIN)<DD><CODE>size</CODE> - the point size >= 1<DT><B>Returns:</B><DD>the new font</DL>
</DD>
</DL>
<HR>

<A NAME="getFontMetrics(java.awt.Font)"><!-- --></A><H3>
getFontMetrics</H3>
<PRE>
public java.awt.FontMetrics <B>getFontMetrics</B>(java.awt.Font&nbsp;f)</PRE>
<DL>
<DD>Returns font metrics for a font.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>f</CODE> - the font<DT><B>Returns:</B><DD>the metrics</DL>
</DD>
</DL>
<HR>

<A NAME="addAttribute(javax.swing.text.AttributeSet, java.lang.Object, java.lang.Object)"><!-- --></A><H3>
addAttribute</H3>
<PRE>
public <A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A> <B>addAttribute</B>(<A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A>&nbsp;old,
                                 java.lang.Object&nbsp;name,
                                 java.lang.Object&nbsp;value)</PRE>
<DL>
<DD>Adds an attribute to the given set, and returns
 the new representative set.
 <p>
 This method is thread safe, although most Swing methods
 are not. Please see 
 <A HREF="http://java.sun.com/products/jfc/swingdoc-archive/threads.html">Threads
 and Swing</A> for more information.<DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../../javax/swing/text/AbstractDocument.AttributeContext.html#addAttribute(javax.swing.text.AttributeSet, java.lang.Object, java.lang.Object)">addAttribute</A> in interface <A HREF="../../../javax/swing/text/AbstractDocument.AttributeContext.html">AbstractDocument.AttributeContext</A><DT><B>Parameters:</B><DD><CODE>old</CODE> - the old attribute set<DD><CODE>name</CODE> - the non-null attribute name<DD><CODE>value</CODE> - the attribute value<DT><B>Returns:</B><DD>the updated attribute set<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/text/MutableAttributeSet.html#addAttribute(java.lang.Object, java.lang.Object)"><CODE>MutableAttributeSet.addAttribute(java.lang.Object, java.lang.Object)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="addAttributes(javax.swing.text.AttributeSet, javax.swing.text.AttributeSet)"><!-- --></A><H3>
addAttributes</H3>
<PRE>
public <A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A> <B>addAttributes</B>(<A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A>&nbsp;old,
                                  <A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A>&nbsp;attr)</PRE>
<DL>
<DD>Adds a set of attributes to the element.
 <p>
 This method is thread safe, although most Swing methods
 are not. Please see 
 <A HREF="http://java.sun.com/products/jfc/swingdoc-archive/threads.html">Threads
 and Swing</A> for more information.<DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../../javax/swing/text/AbstractDocument.AttributeContext.html#addAttributes(javax.swing.text.AttributeSet, javax.swing.text.AttributeSet)">addAttributes</A> in interface <A HREF="../../../javax/swing/text/AbstractDocument.AttributeContext.html">AbstractDocument.AttributeContext</A><DT><B>Parameters:</B><DD><CODE>old</CODE> - the old attribute set<DD><CODE>attr</CODE> - the attributes to add<DT><B>Returns:</B><DD>the updated attribute set<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/text/MutableAttributeSet.html#addAttribute(java.lang.Object, java.lang.Object)"><CODE>MutableAttributeSet.addAttribute(java.lang.Object, java.lang.Object)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="removeAttribute(javax.swing.text.AttributeSet, java.lang.Object)"><!-- --></A><H3>
removeAttribute</H3>
<PRE>
public <A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A> <B>removeAttribute</B>(<A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A>&nbsp;old,
                                    java.lang.Object&nbsp;name)</PRE>
<DL>
<DD>Removes an attribute from the set.
 <p>
 This method is thread safe, although most Swing methods
 are not. Please see 
 <A HREF="http://java.sun.com/products/jfc/swingdoc-archive/threads.html">Threads
 and Swing</A> for more information.<DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../../javax/swing/text/AbstractDocument.AttributeContext.html#removeAttribute(javax.swing.text.AttributeSet, java.lang.Object)">removeAttribute</A> in interface <A HREF="../../../javax/swing/text/AbstractDocument.AttributeContext.html">AbstractDocument.AttributeContext</A><DT><B>Parameters:</B><DD><CODE>old</CODE> - the old set of attributes<DD><CODE>name</CODE> - the non-null attribute name<DT><B>Returns:</B><DD>the updated attribute set<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/text/MutableAttributeSet.html#removeAttribute(java.lang.Object)"><CODE>MutableAttributeSet.removeAttribute(java.lang.Object)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="removeAttributes(javax.swing.text.AttributeSet, java.util.Enumeration)"><!-- --></A><H3>
removeAttributes</H3>
<PRE>
public <A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A> <B>removeAttributes</B>(<A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A>&nbsp;old,
                                     java.util.Enumeration&nbsp;names)</PRE>
<DL>
<DD>Removes a set of attributes for the element.
 <p>
 This method is thread safe, although most Swing methods
 are not. Please see 
 <A HREF="http://java.sun.com/products/jfc/swingdoc-archive/threads.html">Threads
 and Swing</A> for more information.<DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../../javax/swing/text/AbstractDocument.AttributeContext.html#removeAttributes(javax.swing.text.AttributeSet, java.util.Enumeration)">removeAttributes</A> in interface <A HREF="../../../javax/swing/text/AbstractDocument.AttributeContext.html">AbstractDocument.AttributeContext</A><DT><B>Parameters:</B><DD><CODE>old</CODE> - the old attribute set<DD><CODE>names</CODE> - the attribute names<DT><B>Returns:</B><DD>the updated attribute set<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/text/MutableAttributeSet.html#removeAttributes(java.util.Enumeration)"><CODE>MutableAttributeSet.removeAttributes(java.util.Enumeration)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="removeAttributes(javax.swing.text.AttributeSet, javax.swing.text.AttributeSet)"><!-- --></A><H3>
removeAttributes</H3>
<PRE>
public <A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A> <B>removeAttributes</B>(<A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A>&nbsp;old,
                                     <A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A>&nbsp;attrs)</PRE>
<DL>
<DD>Removes a set of attributes for the element.
 <p>
 This method is thread safe, although most Swing methods
 are not. Please see 
 <A HREF="http://java.sun.com/products/jfc/swingdoc-archive/threads.html">Threads
 and Swing</A> for more information.<DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../../javax/swing/text/AbstractDocument.AttributeContext.html#removeAttributes(javax.swing.text.AttributeSet, javax.swing.text.AttributeSet)">removeAttributes</A> in interface <A HREF="../../../javax/swing/text/AbstractDocument.AttributeContext.html">AbstractDocument.AttributeContext</A><DT><B>Parameters:</B><DD><CODE>old</CODE> - the old attribute set<DD><CODE>attrs</CODE> - the attributes<DT><B>Returns:</B><DD>the updated attribute set<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/text/MutableAttributeSet.html#removeAttributes(java.util.Enumeration)"><CODE>MutableAttributeSet.removeAttributes(java.util.Enumeration)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getEmptySet()"><!-- --></A><H3>
getEmptySet</H3>
<PRE>
public <A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A> <B>getEmptySet</B>()</PRE>
<DL>
<DD>Fetches an empty AttributeSet.<DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../../javax/swing/text/AbstractDocument.AttributeContext.html#getEmptySet()">getEmptySet</A> in interface <A HREF="../../../javax/swing/text/AbstractDocument.AttributeContext.html">AbstractDocument.AttributeContext</A><DT><B>Returns:</B><DD>the set</DL>
</DD>
</DL>
<HR>

<A NAME="reclaim(javax.swing.text.AttributeSet)"><!-- --></A><H3>
reclaim</H3>
<PRE>
public void <B>reclaim</B>(<A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A>&nbsp;a)</PRE>
<DL>
<DD>Returns a set no longer needed by the MutableAttributeSet implmentation.
 This is useful for operation under 1.1 where there are no weak 
 references.  This would typically be called by the finalize method
 of the MutableAttributeSet implementation.
 <p>
 This method is thread safe, although most Swing methods
 are not. Please see 
 <A HREF="http://java.sun.com/products/jfc/swingdoc-archive/threads.html">Threads
 and Swing</A> for more information.<DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../../javax/swing/text/AbstractDocument.AttributeContext.html#reclaim(javax.swing.text.AttributeSet)">reclaim</A> in interface <A HREF="../../../javax/swing/text/AbstractDocument.AttributeContext.html">AbstractDocument.AttributeContext</A><DT><B>Parameters:</B><DD><CODE>a</CODE> - the set to reclaim</DL>
</DD>
</DL>
<HR>

<A NAME="getCompressionThreshold()"><!-- --></A><H3>
getCompressionThreshold</H3>
<PRE>
protected int <B>getCompressionThreshold</B>()</PRE>
<DL>
<DD>Returns the maximum number of key/value pairs to try and 
 compress into unique/immutable sets.  Any sets above this
 limit will use hashtables and be a MutableAttributeSet.<DD><DL>
<DT><B>Returns:</B><DD>the threshold</DL>
</DD>
</DL>
<HR>

<A NAME="createSmallAttributeSet(javax.swing.text.AttributeSet)"><!-- --></A><H3>
createSmallAttributeSet</H3>
<PRE>
protected <A HREF="../../../javax/swing/text/StyleContext.SmallAttributeSet.html">StyleContext.SmallAttributeSet</A> <B>createSmallAttributeSet</B>(<A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A>&nbsp;a)</PRE>
<DL>
<DD>Create a compact set of attributes that might be shared.
 This is a hook for subclasses that want to alter the 
 behavior of SmallAttributeSet.  This can be reimplemented
 to return an AttributeSet that provides some sort of
 attribute conversion.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>a</CODE> - The set of attributes to be represented in the
  the compact form.</DL>
</DD>
</DL>
<HR>

<A NAME="createLargeAttributeSet(javax.swing.text.AttributeSet)"><!-- --></A><H3>
createLargeAttributeSet</H3>
<PRE>
protected <A HREF="../../../javax/swing/text/MutableAttributeSet.html">MutableAttributeSet</A> <B>createLargeAttributeSet</B>(<A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A>&nbsp;a)</PRE>
<DL>
<DD>Create a large set of attributes that should trade off
 space for time.  This set will not be shared.  This is
 a hook for subclasses that want to alter the behavior
 of the larger attribute storage format (which is 
 SimpleAttributeSet by default).   This can be reimplemented
 to return a MutableAttributeSet that provides some sort of
 attribute conversion.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>a</CODE> - The set of attributes to be represented in the
  the larger form.</DL>
</DD>
</DL>
<HR>

<A NAME="toString()"><!-- --></A><H3>
toString</H3>
<PRE>
public java.lang.String <B>toString</B>()</PRE>
<DL>
<DD>Converts a StyleContext to a String.<DD><DL>
<DT><B>Returns:</B><DD>the string<DT><B>Overrides:</B><DD>toString in class java.lang.Object</DL>
</DD>
</DL>
<HR>

<A NAME="writeAttributes(java.io.ObjectOutputStream, javax.swing.text.AttributeSet)"><!-- --></A><H3>
writeAttributes</H3>
<PRE>
public void <B>writeAttributes</B>(java.io.ObjectOutputStream&nbsp;out,
                            <A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A>&nbsp;a)
                     throws java.io.IOException</PRE>
<DL>
<DD>Context-specific handling of writing out attributes<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="readAttributes(java.io.ObjectInputStream, javax.swing.text.MutableAttributeSet)"><!-- --></A><H3>
readAttributes</H3>
<PRE>
public void <B>readAttributes</B>(java.io.ObjectInputStream&nbsp;in,
                           <A HREF="../../../javax/swing/text/MutableAttributeSet.html">MutableAttributeSet</A>&nbsp;a)
                    throws java.lang.ClassNotFoundException,
                           java.io.IOException</PRE>
<DL>
<DD>Context-specific handling of reading in attributes<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="writeAttributeSet(java.io.ObjectOutputStream, javax.swing.text.AttributeSet)"><!-- --></A><H3>
writeAttributeSet</H3>
<PRE>
public static void <B>writeAttributeSet</B>(java.io.ObjectOutputStream&nbsp;out,
                                     <A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A>&nbsp;a)
                              throws java.io.IOException</PRE>
<DL>
<DD>Writes a set of attributes to the given object stream
 for the purpose of serialization.  This will take
 special care to deal with static attribute keys that
 have been registered wit the 
 <code>registerStaticAttributeKey</code> method.
 Any attribute key not regsitered as a static key
 will be serialized directly.  All values are expected
 to be serializable.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>out</CODE> - the output stream<DD><CODE>a</CODE> - the attribute set<DT><B>Throws:</B><DD>java.io.IOException - on any I/O error</DL>
</DD>
</DL>
<HR>

<A NAME="readAttributeSet(java.io.ObjectInputStream, javax.swing.text.MutableAttributeSet)"><!-- --></A><H3>
readAttributeSet</H3>
<PRE>
public static void <B>readAttributeSet</B>(java.io.ObjectInputStream&nbsp;in,
                                    <A HREF="../../../javax/swing/text/MutableAttributeSet.html">MutableAttributeSet</A>&nbsp;a)
                             throws java.lang.ClassNotFoundException,
                                    java.io.IOException</PRE>
<DL>
<DD>Reads a set of attributes from the given object input
 stream that have been previously written out with
 <code>writeAttributeSet</code>.  This will try to restore
 keys that were static objects to the static objects in
 the current virtual machine considering only those keys
 that have been registered with the 
 <code>registerStaticAttributeKey</code> method.
 The attributes retrieved from the stream will be placed
 into the given mutable set.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>in</CODE> - the object stream to read the attribute data from.<DD><CODE>a</CODE> - the attribute set to place the attribute 
   definitions in.<DT><B>Throws:</B><DD>java.lang.ClassNotFoundException - passed upward if encountered
  when reading the object stream.<DD>java.io.IOException - passed upward if encountered when
  reading the object stream.</DL>
</DD>
</DL>
<HR>

<A NAME="registerStaticAttributeKey(java.lang.Object)"><!-- --></A><H3>
registerStaticAttributeKey</H3>
<PRE>
public static void <B>registerStaticAttributeKey</B>(java.lang.Object&nbsp;key)</PRE>
<DL>
<DD>Registers an object as a static object that is being
 used as a key in attribute sets.  This allows the key
 to be treated specially for serialization.
 <p>
 For operation under a 1.1 virtual machine, this
 uses the value returned by <code>toString</code>
 concatenated to the classname.  The value returned
 by toString should not have the class reference
 in it (ie it should be reimplemented from the 
 definition in Object) in order to be the same when
 recomputed later.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - the non-null object key</DL>
</DD>
</DL>
<HR>

<A NAME="getStaticAttribute(java.lang.Object)"><!-- --></A><H3>
getStaticAttribute</H3>
<PRE>
public static java.lang.Object <B>getStaticAttribute</B>(java.lang.Object&nbsp;key)</PRE>
<DL>
<DD>Returns the object previously registered with
 <code>registerStaticAttributeKey</code>.<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="getStaticAttributeKey(java.lang.Object)"><!-- --></A><H3>
getStaticAttributeKey</H3>
<PRE>
public static java.lang.Object <B>getStaticAttributeKey</B>(java.lang.Object&nbsp;key)</PRE>
<DL>
<DD>Returns the String that <code>key</code> will be registered with<DD><DL>
<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/text/StyleContext.html#getStaticAttribute(java.lang.Object)"><CODE>getStaticAttribute(java.lang.Object)</CODE></A>, 
<A HREF="../../../javax/swing/text/StyleContext.html#registerStaticAttributeKey(java.lang.Object)"><CODE>registerStaticAttributeKey(java.lang.Object)</CODE></A></DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" ID="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT ID="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" ID="NavBarCell1Rev"> &nbsp;<FONT ID="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="class-use/StyleContext.html"><FONT ID="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../../index-files/index-1.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
Swing 1.1</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../javax/swing/text/StyleConstants.ParagraphConstants.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../javax/swing/text/StyleContext.NamedStyle.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="StyleContext.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2">
  SUMMARY: &nbsp;<A HREF="#inner_class_summary">INNER</A>&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>
<font size="-1"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">Submit a bug or feature</a><br>Java is a trademark or registered trademark of Sun Microsystems,  Inc. in the US and other countries.<br>Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road,<br>Palo Alto, California, 94303, U.S.A.  All Rights Reserved.</font>
</BODY>
</HTML>
