<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Tue Jun 29 06:00:50 GMT+01:00 1999 -->
<TITLE>
Swing 1.1 API Specification: Interface  AbstractDocument.Content
</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/AbstractDocument.Content.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/AbstractDocument.AttributeContext.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../javax/swing/text/AttributeSet.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="AbstractDocument.Content.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;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;FIELD&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  AbstractDocument.Content</H2>
<DL>
<DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../javax/swing/text/GapContent.html">GapContent</A>, <A HREF="../../../javax/swing/text/StringContent.html">StringContent</A></DD>
</DL>
<HR>
<DL>
<DT>public abstract static interface <B>AbstractDocument.Content</B></DL>

<P>
Interface to describe a sequence of character content that
 can be edited.  Implementations may or may not support a 
 history mechanism which will be reflected by whether or not
 mutations return an UndoableEdit implementation.
<P>
<DL>
<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/text/AbstractDocument.html"><CODE>AbstractDocument</CODE></A></DL>
<HR>

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


<!-- =========== FIELD SUMMARY =========== -->


<!-- ======== 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;<A HREF="../../../javax/swing/text/Position.html">Position</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/AbstractDocument.Content.html#createPosition(int)">createPosition</A></B>(int&nbsp;offset)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a position within the content that will
 track change as the content is mutated.</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/AbstractDocument.Content.html#getChars(int, int, javax.swing.text.Segment)">getChars</A></B>(int&nbsp;where,
         int&nbsp;len,
         <A HREF="../../../javax/swing/text/Segment.html">Segment</A>&nbsp;txt)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets a sequence of characters and copies them into a Segment.</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/AbstractDocument.Content.html#getString(int, int)">getString</A></B>(int&nbsp;where,
          int&nbsp;len)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Fetches a string of characters contained in the sequence.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../javax/swing/undo/UndoableEdit.html">UndoableEdit</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/AbstractDocument.Content.html#insertString(int, java.lang.String)">insertString</A></B>(int&nbsp;where,
             java.lang.String&nbsp;str)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Inserts a string of characters into the sequence.</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/AbstractDocument.Content.html#length()">length</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Current length of the sequence of character content.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../javax/swing/undo/UndoableEdit.html">UndoableEdit</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/text/AbstractDocument.Content.html#remove(int, int)">remove</A></B>(int&nbsp;where,
       int&nbsp;nitems)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes some portion of the sequence.</TD>
</TR>
</TABLE>
&nbsp;
<P>

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


<!-- ========= 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="createPosition(int)"><!-- --></A><H3>
createPosition</H3>
<PRE>
public <A HREF="../../../javax/swing/text/Position.html">Position</A> <B>createPosition</B>(int&nbsp;offset)
                        throws <A HREF="../../../javax/swing/text/BadLocationException.html">BadLocationException</A></PRE>
<DL>
<DD>Creates a position within the content that will
 track change as the content is mutated.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>offset</CODE> - the offset in the content >= 0<DT><B>Returns:</B><DD>a Position<DT><B>Throws:</B><DD><A HREF="../../../javax/swing/text/BadLocationException.html">BadLocationException</A> - for an invalid offset</DL>
</DD>
</DL>
<HR>

<A NAME="length()"><!-- --></A><H3>
length</H3>
<PRE>
public int <B>length</B>()</PRE>
<DL>
<DD>Current length of the sequence of character content.<DD><DL>
<DT><B>Returns:</B><DD>the length >= 0</DL>
</DD>
</DL>
<HR>

<A NAME="insertString(int, java.lang.String)"><!-- --></A><H3>
insertString</H3>
<PRE>
public <A HREF="../../../javax/swing/undo/UndoableEdit.html">UndoableEdit</A> <B>insertString</B>(int&nbsp;where,
                                 java.lang.String&nbsp;str)
                          throws <A HREF="../../../javax/swing/text/BadLocationException.html">BadLocationException</A></PRE>
<DL>
<DD>Inserts a string of characters into the sequence.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>where</CODE> - Offset into the sequence to make the insertion >= 0.<DD><CODE>str</CODE> - String to insert.<DT><B>Returns:</B><DD>If the implementation supports a history mechansim, 
    a reference to an Edit implementation will be returned, 
    otherwise null.<DT><B>Throws:</B><DD><A HREF="../../../javax/swing/text/BadLocationException.html">BadLocationException</A> - Thrown if the area covered by
   the arguments is not contained in the character sequence.</DL>
</DD>
</DL>
<HR>

<A NAME="remove(int, int)"><!-- --></A><H3>
remove</H3>
<PRE>
public <A HREF="../../../javax/swing/undo/UndoableEdit.html">UndoableEdit</A> <B>remove</B>(int&nbsp;where,
                           int&nbsp;nitems)
                    throws <A HREF="../../../javax/swing/text/BadLocationException.html">BadLocationException</A></PRE>
<DL>
<DD>Removes some portion of the sequence.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>where</CODE> - The offset into the sequence to make the
   insertion >= 0.<DD><CODE>nitems</CODE> - The number of items in the sequence to remove >= 0.<DT><B>Returns:</B><DD>If the implementation supports a history mechansim, 
    a reference to an Edit implementation will be returned, 
    otherwise null.<DT><B>Throws:</B><DD><A HREF="../../../javax/swing/text/BadLocationException.html">BadLocationException</A> - Thrown if the area covered by
   the arguments is not contained in the character sequence.</DL>
</DD>
</DL>
<HR>

<A NAME="getString(int, int)"><!-- --></A><H3>
getString</H3>
<PRE>
public java.lang.String <B>getString</B>(int&nbsp;where,
                                  int&nbsp;len)
                           throws <A HREF="../../../javax/swing/text/BadLocationException.html">BadLocationException</A></PRE>
<DL>
<DD>Fetches a string of characters contained in the sequence.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>where</CODE> - Offset into the sequence to fetch >= 0.<DD><CODE>len</CODE> - number of characters to copy >= 0.<DT><B>Returns:</B><DD>the string<DT><B>Throws:</B><DD><A HREF="../../../javax/swing/text/BadLocationException.html">BadLocationException</A> - Thrown if the area covered by
   the arguments is not contained in the character sequence.</DL>
</DD>
</DL>
<HR>

<A NAME="getChars(int, int, javax.swing.text.Segment)"><!-- --></A><H3>
getChars</H3>
<PRE>
public void <B>getChars</B>(int&nbsp;where,
                     int&nbsp;len,
                     <A HREF="../../../javax/swing/text/Segment.html">Segment</A>&nbsp;txt)
              throws <A HREF="../../../javax/swing/text/BadLocationException.html">BadLocationException</A></PRE>
<DL>
<DD>Gets a sequence of characters and copies them into a Segment.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>where</CODE> - the starting offset >= 0<DD><CODE>len</CODE> - the number of characters >= 0<DD><CODE>txt</CODE> - the target location to copy into<DT><B>Throws:</B><DD><A HREF="../../../javax/swing/text/BadLocationException.html">BadLocationException</A> - Thrown if the area covered by
   the arguments is not contained in the character sequence.</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/AbstractDocument.Content.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/AbstractDocument.AttributeContext.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../javax/swing/text/AttributeSet.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="AbstractDocument.Content.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;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;FIELD&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>
