<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Tue Jun 29 06:01:11 GMT+01:00 1999 -->
<TITLE>
Swing 1.1 API Specification: Class  DefaultStyledDocument
</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/DefaultStyledDocument.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/DefaultHighlighter.DefaultHighlightPainter.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../javax/swing/text/DefaultStyledDocument.AttributeUndoableEdit.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="DefaultStyledDocument.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  DefaultStyledDocument</H2>
<PRE>
java.lang.Object
  |
  +--<A HREF="../../../javax/swing/text/AbstractDocument.html">javax.swing.text.AbstractDocument</A>
        |
        +--<B>javax.swing.text.DefaultStyledDocument</B>
</PRE>
<DL>
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../javax/swing/text/html/HTMLDocument.html">HTMLDocument</A></DD>
</DL>
<HR>
<DL>
<DT>public class <B>DefaultStyledDocument</B><DT>extends <A HREF="../../../javax/swing/text/AbstractDocument.html">AbstractDocument</A><DT>implements <A HREF="../../../javax/swing/text/StyledDocument.html">StyledDocument</A></DL>

<P>
A document that can be marked up with character and paragraph 
 styles in a manner similar to the Rich Text Format.  The element
 structure for this document represents style crossings for
 style runs.  These style runs are mapped into a paragraph element 
 structure (which may reside in some other structure).  The 
 style runs break at paragraph boundries since logical styles are 
 assigned to paragraph boundries.
 <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="../../../javax/swing/text/Document.html"><CODE>Document</CODE></A>, 
<A HREF="../../../javax/swing/text/AbstractDocument.html"><CODE>AbstractDocument</CODE></A>, <A HREF="../../../serialized-form.html#javax.swing.text.DefaultStyledDocument">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>static&nbsp;class</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/DefaultStyledDocument.AttributeUndoableEdit.html">DefaultStyledDocument.AttributeUndoableEdit</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;An UndoableEdit used to remember AttributeSet changes to an
 Element.</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/DefaultStyledDocument.ElementBuffer.html">DefaultStyledDocument.ElementBuffer</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Class to manage changes to the element
 hierarchy.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;class</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/DefaultStyledDocument.ElementSpec.html">DefaultStyledDocument.ElementSpec</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Specification for building elements.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;class</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/DefaultStyledDocument.SectionElement.html">DefaultStyledDocument.SectionElement</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default root element for a document...</TD>
</TR>
</TABLE>
&nbsp;<A NAME="inner_classes_inherited_from_class_javax.swing.text.AbstractDocument"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" ID="TableSubHeadingColor">
<TD><B>Inner classes inherited from class javax.swing.text.<A HREF="../../../javax/swing/text/AbstractDocument.html">AbstractDocument</A></B></TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD><CODE><B><A HREF="../../../javax/swing/text/AbstractDocument.AbstractElement.html">AbstractDocument.AbstractElement</A></B>,  
<B><A HREF="../../../javax/swing/text/AbstractDocument.AttributeContext.html">AbstractDocument.AttributeContext</A></B>,  
<B><A HREF="../../../javax/swing/text/AbstractDocument.BranchElement.html">AbstractDocument.BranchElement</A></B>,  
<B><A HREF="../../../javax/swing/text/AbstractDocument.Content.html">AbstractDocument.Content</A></B>,  
<B><A HREF="../../../javax/swing/text/AbstractDocument.DefaultDocumentEvent.html">AbstractDocument.DefaultDocumentEvent</A></B>,  
<B><A HREF="../../../javax/swing/text/AbstractDocument.ElementEdit.html">AbstractDocument.ElementEdit</A></B>,  
<B><A HREF="../../../javax/swing/text/AbstractDocument.LeafElement.html">AbstractDocument.LeafElement</A></B></CODE></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>protected &nbsp;<A HREF="../../../javax/swing/text/DefaultStyledDocument.ElementBuffer.html">DefaultStyledDocument.ElementBuffer</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/DefaultStyledDocument.html#buffer">buffer</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/DefaultStyledDocument.html#BUFFER_SIZE_DEFAULT">BUFFER_SIZE_DEFAULT</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The default size of the initial content buffer.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="fields_inherited_from_class_javax.swing.text.AbstractDocument"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" ID="TableSubHeadingColor">
<TD><B>Fields inherited from class javax.swing.text.<A HREF="../../../javax/swing/text/AbstractDocument.html">AbstractDocument</A></B></TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD><CODE><A HREF="../../../javax/swing/text/AbstractDocument.html#BAD_LOCATION">BAD_LOCATION</A>,  
<A HREF="../../../javax/swing/text/AbstractDocument.html#BidiElementName">BidiElementName</A>,  
<A HREF="../../../javax/swing/text/AbstractDocument.html#ContentElementName">ContentElementName</A>,  
<A HREF="../../../javax/swing/text/AbstractDocument.html#ElementNameAttribute">ElementNameAttribute</A>,  
<A HREF="../../../javax/swing/text/AbstractDocument.html#listenerList">listenerList</A>,  
<A HREF="../../../javax/swing/text/AbstractDocument.html#ParagraphElementName">ParagraphElementName</A>,  
<A HREF="../../../javax/swing/text/AbstractDocument.html#SectionElementName">SectionElementName</A></CODE></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/DefaultStyledDocument.html#DefaultStyledDocument()">DefaultStyledDocument</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a default styled document.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD><CODE><B><A HREF="../../../javax/swing/text/DefaultStyledDocument.html#DefaultStyledDocument(javax.swing.text.AbstractDocument.Content, javax.swing.text.StyleContext)">DefaultStyledDocument</A></B>(<A HREF="../../../javax/swing/text/AbstractDocument.Content.html">AbstractDocument.Content</A>&nbsp;c,
                      <A HREF="../../../javax/swing/text/StyleContext.html">StyleContext</A>&nbsp;styles)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a styled document.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD><CODE><B><A HREF="../../../javax/swing/text/DefaultStyledDocument.html#DefaultStyledDocument(javax.swing.text.StyleContext)">DefaultStyledDocument</A></B>(<A HREF="../../../javax/swing/text/StyleContext.html">StyleContext</A>&nbsp;styles)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a styled document with the default content
 storage implementation and a shared set of styles.</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;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/DefaultStyledDocument.html#addDocumentListener(javax.swing.event.DocumentListener)">addDocumentListener</A></B>(<A HREF="../../../javax/swing/event/DocumentListener.html">DocumentListener</A>&nbsp;listener)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a document listener for notification of any changes.</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/DefaultStyledDocument.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 logical style hierarchy.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/DefaultStyledDocument.html#create(javax.swing.text.DefaultStyledDocument.ElementSpec[])">create</A></B>(<A HREF="../../../javax/swing/text/DefaultStyledDocument.ElementSpec.html">DefaultStyledDocument.ElementSpec</A>[]&nbsp;data)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Initialize the document to reflect the given element
 structure (i.e.</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/AbstractDocument.AbstractElement.html">AbstractDocument.AbstractElement</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/DefaultStyledDocument.html#createDefaultRoot()">createDefaultRoot</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates the root element to be used to represent the
 default document structure.</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/DefaultStyledDocument.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;Gets the background color from an attribute 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/Element.html">Element</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/DefaultStyledDocument.html#getCharacterElement(int)">getCharacterElement</A></B>(int&nbsp;pos)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets a character element based on a position.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../javax/swing/text/Element.html">Element</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/DefaultStyledDocument.html#getDefaultRootElement()">getDefaultRootElement</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the default root element.</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/DefaultStyledDocument.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.Color</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/DefaultStyledDocument.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;Gets the foreground color from an attribute 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/Style.html">Style</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/DefaultStyledDocument.html#getLogicalStyle(int)">getLogicalStyle</A></B>(int&nbsp;p)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Fetches the logical style assigned to the paragraph 
 represented by the given position.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../javax/swing/text/Element.html">Element</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/DefaultStyledDocument.html#getParagraphElement(int)">getParagraphElement</A></B>(int&nbsp;pos)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets a paragraph 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/Style.html">Style</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/DefaultStyledDocument.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.</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/DefaultStyledDocument.html#getStyleNames()">getStyleNames</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Fetches the list of of style names.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/DefaultStyledDocument.html#insert(int, javax.swing.text.DefaultStyledDocument.ElementSpec[])">insert</A></B>(int&nbsp;offset,
       <A HREF="../../../javax/swing/text/DefaultStyledDocument.ElementSpec.html">DefaultStyledDocument.ElementSpec</A>[]&nbsp;data)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Inserts new elements in bulk.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/DefaultStyledDocument.html#insertUpdate(javax.swing.text.AbstractDocument.DefaultDocumentEvent, javax.swing.text.AttributeSet)">insertUpdate</A></B>(<A HREF="../../../javax/swing/text/AbstractDocument.DefaultDocumentEvent.html">AbstractDocument.DefaultDocumentEvent</A>&nbsp;chng,
             <A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A>&nbsp;attr)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Updates document structure as a result of text insertion.</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/DefaultStyledDocument.html#removeDocumentListener(javax.swing.event.DocumentListener)">removeDocumentListener</A></B>(<A HREF="../../../javax/swing/event/DocumentListener.html">DocumentListener</A>&nbsp;listener)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes a document listener.</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/DefaultStyledDocument.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>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/DefaultStyledDocument.html#removeUpdate(javax.swing.text.AbstractDocument.DefaultDocumentEvent)">removeUpdate</A></B>(<A HREF="../../../javax/swing/text/AbstractDocument.DefaultDocumentEvent.html">AbstractDocument.DefaultDocumentEvent</A>&nbsp;chng)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Updates document structure as a result of text removal.</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/DefaultStyledDocument.html#setCharacterAttributes(int, int, javax.swing.text.AttributeSet, boolean)">setCharacterAttributes</A></B>(int&nbsp;offset,
                       int&nbsp;length,
                       <A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A>&nbsp;s,
                       boolean&nbsp;replace)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets attributes for some part of the document.</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/DefaultStyledDocument.html#setLogicalStyle(int, javax.swing.text.Style)">setLogicalStyle</A></B>(int&nbsp;pos,
                <A HREF="../../../javax/swing/text/Style.html">Style</A>&nbsp;s)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the logical style to use for the paragraph at the
 given position.</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/DefaultStyledDocument.html#setParagraphAttributes(int, int, javax.swing.text.AttributeSet, boolean)">setParagraphAttributes</A></B>(int&nbsp;offset,
                       int&nbsp;length,
                       <A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A>&nbsp;s,
                       boolean&nbsp;replace)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets attributes for a paragraph.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/DefaultStyledDocument.html#styleChanged(javax.swing.text.Style)">styleChanged</A></B>(<A HREF="../../../javax/swing/text/Style.html">Style</A>&nbsp;style)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a change event for the whole document and propagates it to
 the listeners.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_javax.swing.text.AbstractDocument"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" ID="TableSubHeadingColor">
<TD><B>Methods inherited from class javax.swing.text.<A HREF="../../../javax/swing/text/AbstractDocument.html">AbstractDocument</A></B></TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD><CODE><A HREF="../../../javax/swing/text/AbstractDocument.html#addUndoableEditListener(javax.swing.event.UndoableEditListener)">addUndoableEditListener</A>, 
<A HREF="../../../javax/swing/text/AbstractDocument.html#createBranchElement(javax.swing.text.Element, javax.swing.text.AttributeSet)">createBranchElement</A>, 
<A HREF="../../../javax/swing/text/AbstractDocument.html#createLeafElement(javax.swing.text.Element, javax.swing.text.AttributeSet, int, int)">createLeafElement</A>, 
<A HREF="../../../javax/swing/text/AbstractDocument.html#createPosition(int)">createPosition</A>, 
<A HREF="../../../javax/swing/text/AbstractDocument.html#dump(java.io.PrintStream)">dump</A>, 
<A HREF="../../../javax/swing/text/AbstractDocument.html#fireChangedUpdate(javax.swing.event.DocumentEvent)">fireChangedUpdate</A>, 
<A HREF="../../../javax/swing/text/AbstractDocument.html#fireInsertUpdate(javax.swing.event.DocumentEvent)">fireInsertUpdate</A>, 
<A HREF="../../../javax/swing/text/AbstractDocument.html#fireRemoveUpdate(javax.swing.event.DocumentEvent)">fireRemoveUpdate</A>, 
<A HREF="../../../javax/swing/text/AbstractDocument.html#fireUndoableEditUpdate(javax.swing.event.UndoableEditEvent)">fireUndoableEditUpdate</A>, 
<A HREF="../../../javax/swing/text/AbstractDocument.html#getAsynchronousLoadPriority()">getAsynchronousLoadPriority</A>, 
<A HREF="../../../javax/swing/text/AbstractDocument.html#getAttributeContext()">getAttributeContext</A>, 
<A HREF="../../../javax/swing/text/AbstractDocument.html#getBidiRootElement()">getBidiRootElement</A>, 
<A HREF="../../../javax/swing/text/AbstractDocument.html#getContent()">getContent</A>, 
<A HREF="../../../javax/swing/text/AbstractDocument.html#getCurrentWriter()">getCurrentWriter</A>, 
<A HREF="../../../javax/swing/text/AbstractDocument.html#getDocumentProperties()">getDocumentProperties</A>, 
<A HREF="../../../javax/swing/text/AbstractDocument.html#getEndPosition()">getEndPosition</A>, 
<A HREF="../../../javax/swing/text/AbstractDocument.html#getLength()">getLength</A>, 
<A HREF="../../../javax/swing/text/AbstractDocument.html#getProperty(java.lang.Object)">getProperty</A>, 
<A HREF="../../../javax/swing/text/AbstractDocument.html#getRootElements()">getRootElements</A>, 
<A HREF="../../../javax/swing/text/AbstractDocument.html#getStartPosition()">getStartPosition</A>, 
<A HREF="../../../javax/swing/text/AbstractDocument.html#getText(int, int)">getText</A>, 
<A HREF="../../../javax/swing/text/AbstractDocument.html#getText(int, int, javax.swing.text.Segment)">getText</A>, 
<A HREF="../../../javax/swing/text/AbstractDocument.html#insertString(int, java.lang.String, javax.swing.text.AttributeSet)">insertString</A>, 
<A HREF="../../../javax/swing/text/AbstractDocument.html#postRemoveUpdate(javax.swing.text.AbstractDocument.DefaultDocumentEvent)">postRemoveUpdate</A>, 
<A HREF="../../../javax/swing/text/AbstractDocument.html#putProperty(java.lang.Object, java.lang.Object)">putProperty</A>, 
<A HREF="../../../javax/swing/text/AbstractDocument.html#readLock()">readLock</A>, 
<A HREF="../../../javax/swing/text/AbstractDocument.html#readUnlock()">readUnlock</A>, 
<A HREF="../../../javax/swing/text/AbstractDocument.html#remove(int, int)">remove</A>, 
<A HREF="../../../javax/swing/text/AbstractDocument.html#removeUndoableEditListener(javax.swing.event.UndoableEditListener)">removeUndoableEditListener</A>, 
<A HREF="../../../javax/swing/text/AbstractDocument.html#render(java.lang.Runnable)">render</A>, 
<A HREF="../../../javax/swing/text/AbstractDocument.html#setAsynchronousLoadPriority(int)">setAsynchronousLoadPriority</A>, 
<A HREF="../../../javax/swing/text/AbstractDocument.html#setDocumentProperties(java.util.Dictionary)">setDocumentProperties</A>, 
<A HREF="../../../javax/swing/text/AbstractDocument.html#writeLock()">writeLock</A>, 
<A HREF="../../../javax/swing/text/AbstractDocument.html#writeUnlock()">writeUnlock</A></CODE></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, 
toString, 
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="BUFFER_SIZE_DEFAULT"><!-- --></A><H3>
BUFFER_SIZE_DEFAULT</H3>
<PRE>
public static final int <B>BUFFER_SIZE_DEFAULT</B></PRE>
<DL>
<DD>The default size of the initial content buffer.</DL>
<HR>

<A NAME="buffer"><!-- --></A><H3>
buffer</H3>
<PRE>
protected <A HREF="../../../javax/swing/text/DefaultStyledDocument.ElementBuffer.html">DefaultStyledDocument.ElementBuffer</A> <B>buffer</B></PRE>
<DL>
</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="DefaultStyledDocument(javax.swing.text.AbstractDocument.Content, javax.swing.text.StyleContext)"><!-- --></A><H3>
DefaultStyledDocument</H3>
<PRE>
public <B>DefaultStyledDocument</B>(<A HREF="../../../javax/swing/text/AbstractDocument.Content.html">AbstractDocument.Content</A>&nbsp;c,
                             <A HREF="../../../javax/swing/text/StyleContext.html">StyleContext</A>&nbsp;styles)</PRE>
<DL>
<DD>Constructs a styled document.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>c</CODE> - the container for the content<DD><CODE>styles</CODE> - resources and style definitions which may
  be shared across documents</DL>
</DD>
</DL>
<HR>

<A NAME="DefaultStyledDocument(javax.swing.text.StyleContext)"><!-- --></A><H3>
DefaultStyledDocument</H3>
<PRE>
public <B>DefaultStyledDocument</B>(<A HREF="../../../javax/swing/text/StyleContext.html">StyleContext</A>&nbsp;styles)</PRE>
<DL>
<DD>Constructs a styled document with the default content
 storage implementation and a shared set of styles.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>styles</CODE> - the styles</DL>
</DD>
</DL>
<HR>

<A NAME="DefaultStyledDocument()"><!-- --></A><H3>
DefaultStyledDocument</H3>
<PRE>
public <B>DefaultStyledDocument</B>()</PRE>
<DL>
<DD>Constructs a default styled document.  This buffers
 input content by a size of <em>BUFFER_SIZE_DEFAULT</em> 
 and has a style context that is scoped by the lifetime
 of the document and is not shared with other documents.</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="getDefaultRootElement()"><!-- --></A><H3>
getDefaultRootElement</H3>
<PRE>
public <A HREF="../../../javax/swing/text/Element.html">Element</A> <B>getDefaultRootElement</B>()</PRE>
<DL>
<DD>Gets the default root element.<DD><DL>
<DT><B>Returns:</B><DD>the root<DT><B>Overrides:</B><DD><A HREF="../../../javax/swing/text/AbstractDocument.html#getDefaultRootElement()">getDefaultRootElement</A> in class <A HREF="../../../javax/swing/text/AbstractDocument.html">AbstractDocument</A><DT><B>See Also: </B><DD><A HREF="../../../javax/swing/text/Document.html#getDefaultRootElement()"><CODE>Document.getDefaultRootElement()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="create(javax.swing.text.DefaultStyledDocument.ElementSpec[])"><!-- --></A><H3>
create</H3>
<PRE>
protected void <B>create</B>(<A HREF="../../../javax/swing/text/DefaultStyledDocument.ElementSpec.html">DefaultStyledDocument.ElementSpec</A>[]&nbsp;data)</PRE>
<DL>
<DD>Initialize the document to reflect the given element
 structure (i.e. the structure reported by the
 <code>getDefaultRootElement</code> method.  If the
 document contained any data it will first be removed.<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="insert(int, javax.swing.text.DefaultStyledDocument.ElementSpec[])"><!-- --></A><H3>
insert</H3>
<PRE>
protected void <B>insert</B>(int&nbsp;offset,
                      <A HREF="../../../javax/swing/text/DefaultStyledDocument.ElementSpec.html">DefaultStyledDocument.ElementSpec</A>[]&nbsp;data)
               throws <A HREF="../../../javax/swing/text/BadLocationException.html">BadLocationException</A></PRE>
<DL>
<DD>Inserts new elements in bulk.  This is useful to allow
 parsing with the document in an unlocked state and
 prepare an element structure modification.  This method
 takes an array of tokens that describe how to update an
 element structure so the time within a write lock can
 be greatly reduced in an asynchronous update situation.     
 <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>Parameters:</B><DD><CODE>offset</CODE> - the starting offset >= 0<DD><CODE>data</CODE> - the element data<DT><B>Throws:</B><DD><A HREF="../../../javax/swing/text/BadLocationException.html">BadLocationException</A> - for an invalid starting offset</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 logical 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>Specified by: </B><DD><A HREF="../../../javax/swing/text/StyledDocument.html#addStyle(java.lang.String, javax.swing.text.Style)">addStyle</A> in interface <A HREF="../../../javax/swing/text/StyledDocument.html">StyledDocument</A><DT><B>Parameters:</B><DD><CODE>nm</CODE> - the name of the style (must be unique within the
   collection of named styles).  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 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>Specified by: </B><DD><A HREF="../../../javax/swing/text/StyledDocument.html#removeStyle(java.lang.String)">removeStyle</A> in interface <A HREF="../../../javax/swing/text/StyledDocument.html">StyledDocument</A><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.<DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../../javax/swing/text/StyledDocument.html#getStyle(java.lang.String)">getStyle</A> in interface <A HREF="../../../javax/swing/text/StyledDocument.html">StyledDocument</A><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 list of of style names.<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="setLogicalStyle(int, javax.swing.text.Style)"><!-- --></A><H3>
setLogicalStyle</H3>
<PRE>
public void <B>setLogicalStyle</B>(int&nbsp;pos,
                            <A HREF="../../../javax/swing/text/Style.html">Style</A>&nbsp;s)</PRE>
<DL>
<DD>Sets the logical style to use for the paragraph at the
 given position.  If attributes aren't explicitly set 
 for character and paragraph attributes they will resolve 
 through the logical style assigned to the paragraph, which
 in turn may resolve through some hierarchy completely 
 independent of the element hierarchy in the document.
 <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/StyledDocument.html#setLogicalStyle(int, javax.swing.text.Style)">setLogicalStyle</A> in interface <A HREF="../../../javax/swing/text/StyledDocument.html">StyledDocument</A><DT><B>Parameters:</B><DD><CODE>pos</CODE> - the offset from the start of the document >= 0<DD><CODE>s</CODE> - the logical style to assign to the paragraph, null if none</DL>
</DD>
</DL>
<HR>

<A NAME="getLogicalStyle(int)"><!-- --></A><H3>
getLogicalStyle</H3>
<PRE>
public <A HREF="../../../javax/swing/text/Style.html">Style</A> <B>getLogicalStyle</B>(int&nbsp;p)</PRE>
<DL>
<DD>Fetches the logical style assigned to the paragraph 
 represented by the given position.<DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../../javax/swing/text/StyledDocument.html#getLogicalStyle(int)">getLogicalStyle</A> in interface <A HREF="../../../javax/swing/text/StyledDocument.html">StyledDocument</A><DT><B>Parameters:</B><DD><CODE>p</CODE> - the location to translate to a paragraph
  and determine the logical style assigned >= 0.  This
  is an offset from the start of the document.<DT><B>Returns:</B><DD>the style, null if none</DL>
</DD>
</DL>
<HR>

<A NAME="setCharacterAttributes(int, int, javax.swing.text.AttributeSet, boolean)"><!-- --></A><H3>
setCharacterAttributes</H3>
<PRE>
public void <B>setCharacterAttributes</B>(int&nbsp;offset,
                                   int&nbsp;length,
                                   <A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A>&nbsp;s,
                                   boolean&nbsp;replace)</PRE>
<DL>
<DD>Sets attributes for some part of the document.
 A write lock is held by this operation while changes
 are being made, and a DocumentEvent is sent to the listeners 
 after the change has been successfully completed.
 <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/StyledDocument.html#setCharacterAttributes(int, int, javax.swing.text.AttributeSet, boolean)">setCharacterAttributes</A> in interface <A HREF="../../../javax/swing/text/StyledDocument.html">StyledDocument</A><DT><B>Parameters:</B><DD><CODE>offset</CODE> - the offset in the document >= 0<DD><CODE>length</CODE> - the length >= 0<DD><CODE>s</CODE> - the attributes<DD><CODE>replace</CODE> - true if the previous attributes should be replaced
  before setting the new attributes</DL>
</DD>
</DL>
<HR>

<A NAME="setParagraphAttributes(int, int, javax.swing.text.AttributeSet, boolean)"><!-- --></A><H3>
setParagraphAttributes</H3>
<PRE>
public void <B>setParagraphAttributes</B>(int&nbsp;offset,
                                   int&nbsp;length,
                                   <A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A>&nbsp;s,
                                   boolean&nbsp;replace)</PRE>
<DL>
<DD>Sets attributes for a paragraph.
 <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/StyledDocument.html#setParagraphAttributes(int, int, javax.swing.text.AttributeSet, boolean)">setParagraphAttributes</A> in interface <A HREF="../../../javax/swing/text/StyledDocument.html">StyledDocument</A><DT><B>Parameters:</B><DD><CODE>offset</CODE> - the offset into the paragraph >= 0<DD><CODE>length</CODE> - the number of characters affected >= 0<DD><CODE>s</CODE> - the attributes<DD><CODE>replace</CODE> - whether to replace existing attributes, or merge them</DL>
</DD>
</DL>
<HR>

<A NAME="getParagraphElement(int)"><!-- --></A><H3>
getParagraphElement</H3>
<PRE>
public <A HREF="../../../javax/swing/text/Element.html">Element</A> <B>getParagraphElement</B>(int&nbsp;pos)</PRE>
<DL>
<DD>Gets a paragraph element. The paragraph element is
 the parent of the deepest leaf.<DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../../javax/swing/text/StyledDocument.html#getParagraphElement(int)">getParagraphElement</A> in interface <A HREF="../../../javax/swing/text/StyledDocument.html">StyledDocument</A><DT><B>Parameters:</B><DD><CODE>pos</CODE> - the starting offset >= 0<DT><B>Returns:</B><DD>the element<DT><B>Overrides:</B><DD><A HREF="../../../javax/swing/text/AbstractDocument.html#getParagraphElement(int)">getParagraphElement</A> in class <A HREF="../../../javax/swing/text/AbstractDocument.html">AbstractDocument</A></DL>
</DD>
</DL>
<HR>

<A NAME="getCharacterElement(int)"><!-- --></A><H3>
getCharacterElement</H3>
<PRE>
public <A HREF="../../../javax/swing/text/Element.html">Element</A> <B>getCharacterElement</B>(int&nbsp;pos)</PRE>
<DL>
<DD>Gets a character element based on a position.<DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../../javax/swing/text/StyledDocument.html#getCharacterElement(int)">getCharacterElement</A> in interface <A HREF="../../../javax/swing/text/StyledDocument.html">StyledDocument</A><DT><B>Parameters:</B><DD><CODE>pos</CODE> - the position in the document >= 0<DT><B>Returns:</B><DD>the element</DL>
</DD>
</DL>
<HR>

<A NAME="insertUpdate(javax.swing.text.AbstractDocument.DefaultDocumentEvent, javax.swing.text.AttributeSet)"><!-- --></A><H3>
insertUpdate</H3>
<PRE>
protected void <B>insertUpdate</B>(<A HREF="../../../javax/swing/text/AbstractDocument.DefaultDocumentEvent.html">AbstractDocument.DefaultDocumentEvent</A>&nbsp;chng,
                            <A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A>&nbsp;attr)</PRE>
<DL>
<DD>Updates document structure as a result of text insertion.  This
 will happen within a write lock.  This implementation simply
 parses the inserted content for line breaks and builds up a set
 of instructions for the element buffer.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>chng</CODE> - a description of the document change<DD><CODE>attr</CODE> - the attributes<DT><B>Overrides:</B><DD><A HREF="../../../javax/swing/text/AbstractDocument.html#insertUpdate(javax.swing.text.AbstractDocument.DefaultDocumentEvent, javax.swing.text.AttributeSet)">insertUpdate</A> in class <A HREF="../../../javax/swing/text/AbstractDocument.html">AbstractDocument</A></DL>
</DD>
</DL>
<HR>

<A NAME="removeUpdate(javax.swing.text.AbstractDocument.DefaultDocumentEvent)"><!-- --></A><H3>
removeUpdate</H3>
<PRE>
protected void <B>removeUpdate</B>(<A HREF="../../../javax/swing/text/AbstractDocument.DefaultDocumentEvent.html">AbstractDocument.DefaultDocumentEvent</A>&nbsp;chng)</PRE>
<DL>
<DD>Updates document structure as a result of text removal.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>chng</CODE> - a description of the document change<DT><B>Overrides:</B><DD><A HREF="../../../javax/swing/text/AbstractDocument.html#removeUpdate(javax.swing.text.AbstractDocument.DefaultDocumentEvent)">removeUpdate</A> in class <A HREF="../../../javax/swing/text/AbstractDocument.html">AbstractDocument</A></DL>
</DD>
</DL>
<HR>

<A NAME="createDefaultRoot()"><!-- --></A><H3>
createDefaultRoot</H3>
<PRE>
protected <A HREF="../../../javax/swing/text/AbstractDocument.AbstractElement.html">AbstractDocument.AbstractElement</A> <B>createDefaultRoot</B>()</PRE>
<DL>
<DD>Creates the root element to be used to represent the
 default document structure.<DD><DL>
<DT><B>Returns:</B><DD>the element base</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>Gets the foreground color from an attribute set.<DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../../javax/swing/text/StyledDocument.html#getForeground(javax.swing.text.AttributeSet)">getForeground</A> in interface <A HREF="../../../javax/swing/text/StyledDocument.html">StyledDocument</A><DT><B>Parameters:</B><DD><CODE>attr</CODE> - the attribute set<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>Gets the background color from an attribute set.<DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../../javax/swing/text/StyledDocument.html#getBackground(javax.swing.text.AttributeSet)">getBackground</A> in interface <A HREF="../../../javax/swing/text/StyledDocument.html">StyledDocument</A><DT><B>Parameters:</B><DD><CODE>attr</CODE> - the attribute set<DT><B>Returns:</B><DD>the color</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.<DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../../javax/swing/text/StyledDocument.html#getFont(javax.swing.text.AttributeSet)">getFont</A> in interface <A HREF="../../../javax/swing/text/StyledDocument.html">StyledDocument</A><DT><B>Parameters:</B><DD><CODE>attr</CODE> - the attribute set<DT><B>Returns:</B><DD>the font</DL>
</DD>
</DL>
<HR>

<A NAME="styleChanged(javax.swing.text.Style)"><!-- --></A><H3>
styleChanged</H3>
<PRE>
protected void <B>styleChanged</B>(<A HREF="../../../javax/swing/text/Style.html">Style</A>&nbsp;style)</PRE>
<DL>
<DD>Creates a change event for the whole document and propagates it to
 the listeners. Subclasses may wish to be inteligent about what gets
 damaged.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>style</CODE> - The Style that has changed.</DL>
</DD>
</DL>
<HR>

<A NAME="addDocumentListener(javax.swing.event.DocumentListener)"><!-- --></A><H3>
addDocumentListener</H3>
<PRE>
public void <B>addDocumentListener</B>(<A HREF="../../../javax/swing/event/DocumentListener.html">DocumentListener</A>&nbsp;listener)</PRE>
<DL>
<DD>Adds a document listener for notification of any changes.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>listener</CODE> - the listener<DT><B>Overrides:</B><DD><A HREF="../../../javax/swing/text/AbstractDocument.html#addDocumentListener(javax.swing.event.DocumentListener)">addDocumentListener</A> in class <A HREF="../../../javax/swing/text/AbstractDocument.html">AbstractDocument</A><DT><B>See Also: </B><DD><A HREF="../../../javax/swing/text/Document.html#addDocumentListener(javax.swing.event.DocumentListener)"><CODE>Document.addDocumentListener(javax.swing.event.DocumentListener)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="removeDocumentListener(javax.swing.event.DocumentListener)"><!-- --></A><H3>
removeDocumentListener</H3>
<PRE>
public void <B>removeDocumentListener</B>(<A HREF="../../../javax/swing/event/DocumentListener.html">DocumentListener</A>&nbsp;listener)</PRE>
<DL>
<DD>Removes a document listener.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>listener</CODE> - the listener<DT><B>Overrides:</B><DD><A HREF="../../../javax/swing/text/AbstractDocument.html#removeDocumentListener(javax.swing.event.DocumentListener)">removeDocumentListener</A> in class <A HREF="../../../javax/swing/text/AbstractDocument.html">AbstractDocument</A><DT><B>See Also: </B><DD><A HREF="../../../javax/swing/text/Document.html#removeDocumentListener(javax.swing.event.DocumentListener)"><CODE>Document.removeDocumentListener(javax.swing.event.DocumentListener)</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/DefaultStyledDocument.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/DefaultHighlighter.DefaultHighlightPainter.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../javax/swing/text/DefaultStyledDocument.AttributeUndoableEdit.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="DefaultStyledDocument.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>
