<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Tue Jun 29 06:00:54 GMT+01:00 1999 -->
<TITLE>
Swing 1.1 API Specification: Interface  Document
</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/Document.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/Caret.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../javax/swing/text/Element.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="Document.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2">
  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;CONSTR&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;CONSTR&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>
Interface  Document</H2>
<DL>
<DT><B>All Known Subinterfaces:</B> <DD><A HREF="../../../javax/swing/text/StyledDocument.html">StyledDocument</A></DD>
</DL>
<DL>
<DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../javax/swing/text/AbstractDocument.html">AbstractDocument</A></DD>
</DL>
<HR>
<DL>
<DT>public abstract interface <B>Document</B></DL>

<P>
<p>
 Container for text that supports editing and provides notification of
 changes (serves as the model in an MVC relationship).  Support is 
 provided to mark up the text with structure that tracks changes.  The
 unit of structure is called an element.  Views will typically be built
 from an element structure.  Each element can have an arbitrary set of
 attributes associated with it.  The interface itself is intended to be
 free of any policy for structure that is provided, as the nature of 
 the document structure should be determined by the implementation.  
 </p>
 <p align=center><img src="doc-files/document.gif"></p>
 <p>
 Typically there will be only one document structure, but the interface
 supports building an arbitrary number of structural projections over the 
 text data. The document can have multiple root elements to support 
 multiple document structures.  Some examples might be:
 </p>
 <ul>
 <li>Logical document structure.
 <li>View projections.
 <li>Lexical token streams.
 <li>Parse trees.
 <li>Conversions to formats other than the native format.
 <li>Modification specifications.
 <li>Annotations.
 </ul>
<P>
<DL>
<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/event/DocumentEvent.html"><CODE>DocumentEvent</CODE></A>, 
<A HREF="../../../javax/swing/event/DocumentListener.html"><CODE>DocumentListener</CODE></A>, 
<A HREF="../../../javax/swing/text/Element.html"><CODE>Element</CODE></A>, 
<A HREF="../../../javax/swing/text/Position.html"><CODE>Position</CODE></A>, 
<A HREF="../../../javax/swing/text/AttributeSet.html"><CODE>AttributeSet</CODE></A></DL>
<HR>

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


<!-- =========== 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/Document.html#StreamDescriptionProperty">StreamDescriptionProperty</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The property name for the description of the stream
 used to initialize the document.</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/Document.html#TitleProperty">TitleProperty</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The property name for the title of the document, if 
 there is one.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->


<!-- ========== 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/Document.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;Registers the given observer to begin receiving notifications
 when changes are made to 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/Document.html#addUndoableEditListener(javax.swing.event.UndoableEditListener)">addUndoableEditListener</A></B>(<A HREF="../../../javax/swing/event/UndoableEditListener.html">UndoableEditListener</A>&nbsp;listener)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Registers the given observer to begin receiving notifications
 when undoable edits are made to the document.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../javax/swing/text/Position.html">Position</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/Document.html#createPosition(int)">createPosition</A></B>(int&nbsp;offs)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a position that will track change as the document
 is altered.</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/Document.html#getDefaultRootElement()">getDefaultRootElement</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the root element that views should be based upon,
 unless some other mechanism for assigning views to element
 structures is provided.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../javax/swing/text/Position.html">Position</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/Document.html#getEndPosition()">getEndPosition</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a position that represents the end of the document.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/Document.html#getLength()">getLength</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns number of characters of content currently 
 in the document.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/Document.html#getProperty(java.lang.Object)">getProperty</A></B>(java.lang.Object&nbsp;key)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets properties associated with the document.</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/Document.html#getRootElements()">getRootElements</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns all of the root elements that are defined.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../javax/swing/text/Position.html">Position</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/Document.html#getStartPosition()">getStartPosition</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a position that represents the start of 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/Document.html#getText(int, int)">getText</A></B>(int&nbsp;offset,
        int&nbsp;length)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Fetches the text contained within the given portion 
 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/Document.html#getText(int, int, javax.swing.text.Segment)">getText</A></B>(int&nbsp;offset,
        int&nbsp;length,
        <A HREF="../../../javax/swing/text/Segment.html">Segment</A>&nbsp;txt)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Fetches the text contained within the given portion 
 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/Document.html#insertString(int, java.lang.String, javax.swing.text.AttributeSet)">insertString</A></B>(int&nbsp;offset,
             java.lang.String&nbsp;str,
             <A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A>&nbsp;a)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Inserts a string of content.</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/Document.html#putProperty(java.lang.Object, java.lang.Object)">putProperty</A></B>(java.lang.Object&nbsp;key,
            java.lang.Object&nbsp;value)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Puts a new property on the list.</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/Document.html#remove(int, int)">remove</A></B>(int&nbsp;offs,
       int&nbsp;len)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes a portion of the content 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/Document.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;Unregisters the given observer from the notification list
 so it will no longer receive change updates.</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/Document.html#removeUndoableEditListener(javax.swing.event.UndoableEditListener)">removeUndoableEditListener</A></B>(<A HREF="../../../javax/swing/event/UndoableEditListener.html">UndoableEditListener</A>&nbsp;listener)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Unregisters the given observer from the notification list
 so it will no longer receive updates.</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/Document.html#render(java.lang.Runnable)">render</A></B>(java.lang.Runnable&nbsp;r)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This allows the model to be safely rendered in the presence
 of currency, if the model supports being updated asynchronously.</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="StreamDescriptionProperty"><!-- --></A><H3>
StreamDescriptionProperty</H3>
<PRE>
public static final java.lang.String <B>StreamDescriptionProperty</B></PRE>
<DL>
<DD>The property name for the description of the stream
 used to initialize the document.  This should be used
 if the document was initialized from a stream and 
 anything is known about the stream.</DL>
<HR>

<A NAME="TitleProperty"><!-- --></A><H3>
TitleProperty</H3>
<PRE>
public static final java.lang.String <B>TitleProperty</B></PRE>
<DL>
<DD>The property name for the title of the document, if 
 there is one.</DL>

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


<!-- ============ 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="getLength()"><!-- --></A><H3>
getLength</H3>
<PRE>
public int <B>getLength</B>()</PRE>
<DL>
<DD>Returns number of characters of content currently 
 in the document.<DD><DL>
<DT><B>Returns:</B><DD>number of characters >= 0</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>Registers the given observer to begin receiving notifications
 when changes are made to the document.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>listener</CODE> - the observer to register<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/text/Document.html#removeDocumentListener(javax.swing.event.DocumentListener)"><CODE>removeDocumentListener(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>Unregisters the given observer from the notification list
 so it will no longer receive change updates.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>listener</CODE> - the observer to register<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/text/Document.html#addDocumentListener(javax.swing.event.DocumentListener)"><CODE>addDocumentListener(javax.swing.event.DocumentListener)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="addUndoableEditListener(javax.swing.event.UndoableEditListener)"><!-- --></A><H3>
addUndoableEditListener</H3>
<PRE>
public void <B>addUndoableEditListener</B>(<A HREF="../../../javax/swing/event/UndoableEditListener.html">UndoableEditListener</A>&nbsp;listener)</PRE>
<DL>
<DD>Registers the given observer to begin receiving notifications
 when undoable edits are made to the document.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>listener</CODE> - the observer to register<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/event/UndoableEditEvent.html"><CODE>UndoableEditEvent</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="removeUndoableEditListener(javax.swing.event.UndoableEditListener)"><!-- --></A><H3>
removeUndoableEditListener</H3>
<PRE>
public void <B>removeUndoableEditListener</B>(<A HREF="../../../javax/swing/event/UndoableEditListener.html">UndoableEditListener</A>&nbsp;listener)</PRE>
<DL>
<DD>Unregisters the given observer from the notification list
 so it will no longer receive updates.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>listener</CODE> - the observer to register<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/event/UndoableEditEvent.html"><CODE>UndoableEditEvent</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getProperty(java.lang.Object)"><!-- --></A><H3>
getProperty</H3>
<PRE>
public java.lang.Object <B>getProperty</B>(java.lang.Object&nbsp;key)</PRE>
<DL>
<DD>Gets properties associated with the document.  Allows one to
 store things like the document title, author, etc.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - a non-null property<DT><B>Returns:</B><DD>the properties</DL>
</DD>
</DL>
<HR>

<A NAME="putProperty(java.lang.Object, java.lang.Object)"><!-- --></A><H3>
putProperty</H3>
<PRE>
public void <B>putProperty</B>(java.lang.Object&nbsp;key,
                        java.lang.Object&nbsp;value)</PRE>
<DL>
<DD>Puts a new property on the list.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - the non-null property key<DD><CODE>value</CODE> - the property value</DL>
</DD>
</DL>
<HR>

<A NAME="remove(int, int)"><!-- --></A><H3>
remove</H3>
<PRE>
public void <B>remove</B>(int&nbsp;offs,
                   int&nbsp;len)
            throws <A HREF="../../../javax/swing/text/BadLocationException.html">BadLocationException</A></PRE>
<DL>
<DD>Removes a portion of the content of the document.  This
 will cause notification to be sent to the observers of
 the document (unless an exception is thrown).<DD><DL>
<DT><B>Parameters:</B><DD><CODE>offs</CODE> - the offset from the begining >= 0<DD><CODE>len</CODE> - the number of characters to remove >= 0<DT><B>Throws:</B><DD><A HREF="../../../javax/swing/text/BadLocationException.html">BadLocationException</A> - some portion of the removal range
   was not a valid part of the document.  The location in the exception
   is the first bad position encountered.<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/event/DocumentEvent.html"><CODE>DocumentEvent</CODE></A>, 
<A HREF="../../../javax/swing/event/DocumentListener.html"><CODE>DocumentListener</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="insertString(int, java.lang.String, javax.swing.text.AttributeSet)"><!-- --></A><H3>
insertString</H3>
<PRE>
public void <B>insertString</B>(int&nbsp;offset,
                         java.lang.String&nbsp;str,
                         <A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A>&nbsp;a)
                  throws <A HREF="../../../javax/swing/text/BadLocationException.html">BadLocationException</A></PRE>
<DL>
<DD>Inserts a string of content.  This will cause the observers of the
 the document to be notified, unless an exception is thrown.

 A position marks a location in the document between items.  

 If the attributes that have been defined exactly match the
 current attributes defined at the position, the element 
 representing the content at that position will simply be expanded.  
 If the attributes defined are different, a new content element
 will be created that matches the attributes.  Does nothing with null
 or empty strings.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>offset</CODE> - the offset into the document to insert the content >= 0.
    All positions that track change at or after the given location 
    will move.<DD><CODE>str</CODE> - the string to insert<DD><CODE>a</CODE> - the attributes to associate with the inserted
   content.  This may be null if there are no attributes.<DT><B>Throws:</B><DD><A HREF="../../../javax/swing/text/BadLocationException.html">BadLocationException</A> - the given insert position is not a valid 
 position within the document<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/event/DocumentEvent.html"><CODE>DocumentEvent</CODE></A>, 
<A HREF="../../../javax/swing/event/DocumentListener.html"><CODE>DocumentListener</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getText(int, int)"><!-- --></A><H3>
getText</H3>
<PRE>
public java.lang.String <B>getText</B>(int&nbsp;offset,
                                int&nbsp;length)
                         throws <A HREF="../../../javax/swing/text/BadLocationException.html">BadLocationException</A></PRE>
<DL>
<DD>Fetches the text contained within the given portion 
 of the document.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>offset</CODE> - the offset into the document representing the desired 
   start of the text >= 0<DD><CODE>length</CODE> - the length of the desired string >= 0<DT><B>Returns:</B><DD>the text, in a String of length >= 0<DT><B>Throws:</B><DD><A HREF="../../../javax/swing/text/BadLocationException.html">BadLocationException</A> - some portion of the given range
   was not a valid part of the document.  The location in the exception
   is the first bad position encountered.</DL>
</DD>
</DL>
<HR>

<A NAME="getText(int, int, javax.swing.text.Segment)"><!-- --></A><H3>
getText</H3>
<PRE>
public void <B>getText</B>(int&nbsp;offset,
                    int&nbsp;length,
                    <A HREF="../../../javax/swing/text/Segment.html">Segment</A>&nbsp;txt)
             throws <A HREF="../../../javax/swing/text/BadLocationException.html">BadLocationException</A></PRE>
<DL>
<DD>Fetches the text contained within the given portion 
 of the document.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>offset</CODE> - the offset into the document representing the desired 
   start of the text >= 0<DD><CODE>length</CODE> - the length of the desired string >= 0<DD><CODE>txt</CODE> - the Segment object to return the text in<DT><B>Throws:</B><DD><A HREF="../../../javax/swing/text/BadLocationException.html">BadLocationException</A> - Some portion of the given range
   was not a valid part of the document.  The location in the exception
   is the first bad position encountered.</DL>
</DD>
</DL>
<HR>

<A NAME="getStartPosition()"><!-- --></A><H3>
getStartPosition</H3>
<PRE>
public <A HREF="../../../javax/swing/text/Position.html">Position</A> <B>getStartPosition</B>()</PRE>
<DL>
<DD>Returns a position that represents the start of the document.  The 
 position returned can be counted on to track change and stay 
 located at the beginning of the document.<DD><DL>
<DT><B>Returns:</B><DD>the position</DL>
</DD>
</DL>
<HR>

<A NAME="getEndPosition()"><!-- --></A><H3>
getEndPosition</H3>
<PRE>
public <A HREF="../../../javax/swing/text/Position.html">Position</A> <B>getEndPosition</B>()</PRE>
<DL>
<DD>Returns a position that represents the end of the document.  The
 position returned can be counted on to track change and stay 
 located at the end of the document.<DD><DL>
<DT><B>Returns:</B><DD>the position</DL>
</DD>
</DL>
<HR>

<A NAME="createPosition(int)"><!-- --></A><H3>
createPosition</H3>
<PRE>
public <A HREF="../../../javax/swing/text/Position.html">Position</A> <B>createPosition</B>(int&nbsp;offs)
                        throws <A HREF="../../../javax/swing/text/BadLocationException.html">BadLocationException</A></PRE>
<DL>
<DD>Returns a position that will track change as the document
 is altered.  If the relative position pos is null, the
 start of the document will be used.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>offs</CODE> - the offset from the start of the document >= 0<DT><B>Returns:</B><DD>the position<DT><B>Throws:</B><DD><A HREF="../../../javax/swing/text/BadLocationException.html">BadLocationException</A> - if the given position does not
   represent a valid location in the associated document</DL>
</DD>
</DL>
<HR>

<A NAME="getRootElements()"><!-- --></A><H3>
getRootElements</H3>
<PRE>
public <A HREF="../../../javax/swing/text/Element.html">Element</A>[] <B>getRootElements</B>()</PRE>
<DL>
<DD>Returns all of the root elements that are defined.<DD><DL>
<DT><B>Returns:</B><DD>the root element</DL>
</DD>
</DL>
<HR>

<A NAME="getDefaultRootElement()"><!-- --></A><H3>
getDefaultRootElement</H3>
<PRE>
public <A HREF="../../../javax/swing/text/Element.html">Element</A> <B>getDefaultRootElement</B>()</PRE>
<DL>
<DD>Returns the root element that views should be based upon,
 unless some other mechanism for assigning views to element
 structures is provided.<DD><DL>
<DT><B>Returns:</B><DD>the root element</DL>
</DD>
</DL>
<HR>

<A NAME="render(java.lang.Runnable)"><!-- --></A><H3>
render</H3>
<PRE>
public void <B>render</B>(java.lang.Runnable&nbsp;r)</PRE>
<DL>
<DD>This allows the model to be safely rendered in the presence
 of currency, if the model supports being updated asynchronously.
 The given runnable will be executed in a way that allows it
 to safely read the model with no changes while the runnable
 is being executed.  The runnable itself may <em>not</em>
 make any mutations.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>r</CODE> - a Runnable used to render the model</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/Document.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/Caret.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../javax/swing/text/Element.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="Document.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2">
  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;CONSTR&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;CONSTR&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>
