<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Tue Jun 29 06:02:23 GMT+01:00 1999 -->
<TITLE>
Swing 1.1 API Specification: Class  UndoManager
</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/UndoManager.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/undo/UndoableEditSupport.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="UndoManager.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="#fields_inherited_from_class_javax.swing.undo.CompoundEdit">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;FIELD&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.undo</FONT>
<BR>
Class  UndoManager</H2>
<PRE>
java.lang.Object
  |
  +--<A HREF="../../../javax/swing/undo/AbstractUndoableEdit.html">javax.swing.undo.AbstractUndoableEdit</A>
        |
        +--<A HREF="../../../javax/swing/undo/CompoundEdit.html">javax.swing.undo.CompoundEdit</A>
              |
              +--<B>javax.swing.undo.UndoManager</B>
</PRE>
<HR>
<DL>
<DT>public class <B>UndoManager</B><DT>extends <A HREF="../../../javax/swing/undo/CompoundEdit.html">CompoundEdit</A><DT>implements <A HREF="../../../javax/swing/event/UndoableEditListener.html">UndoableEditListener</A></DL>

<P>
Concrete subclass of CompoundEdit which can serve as an
 UndoableEditListener, consolidating the UndoableEditEvents from a
 variety of sources, and undoing or redoing them one at a time.

 Unlike AbstractUndoableEdit and CompoundEdit, the public methods of this
 class are synchronized, and should be safe to call from multiple
 threads. This should make UndoManager a convenient marshall for
 sets of undoable JavaBeans.
 <p>
 <strong>Warning:</strong>
 Serialized objects of this class will not be compatible with
 future Swing releases.  The current serialization support is appropriate
 for short term storage or RMI between applications running the same
 version of Swing.  A future release of Swing will provide support for
 long term persistence.
<P>
<DL>
<DT><B>See Also: </B><DD><A HREF="../../../serialized-form.html#javax.swing.undo.UndoManager">Serialized Form</A></DL>
<HR>

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


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

<A NAME="fields_inherited_from_class_javax.swing.undo.CompoundEdit"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" ID="TableSubHeadingColor">
<TD><B>Fields inherited from class javax.swing.undo.<A HREF="../../../javax/swing/undo/CompoundEdit.html">CompoundEdit</A></B></TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD><CODE><A HREF="../../../javax/swing/undo/CompoundEdit.html#edits">edits</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="fields_inherited_from_class_javax.swing.undo.AbstractUndoableEdit"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" ID="TableSubHeadingColor">
<TD><B>Fields inherited from class javax.swing.undo.<A HREF="../../../javax/swing/undo/AbstractUndoableEdit.html">AbstractUndoableEdit</A></B></TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD><CODE><A HREF="../../../javax/swing/undo/AbstractUndoableEdit.html#RedoName">RedoName</A>,  
<A HREF="../../../javax/swing/undo/AbstractUndoableEdit.html#UndoName">UndoName</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/undo/UndoManager.html#UndoManager()">UndoManager</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</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;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/undo/UndoManager.html#addEdit(javax.swing.undo.UndoableEdit)">addEdit</A></B>(<A HREF="../../../javax/swing/undo/UndoableEdit.html">UndoableEdit</A>&nbsp;anEdit)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If inProgress, inserts anEdit at indexOfNextAdd, and removes
 any old edits that were at indexOfNextAdd or later.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/undo/UndoManager.html#canRedo()">canRedo</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Overridden to preserve usual semantics: returns true if a redo
 operation would be successful now, false otherwise</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/undo/UndoManager.html#canUndo()">canUndo</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Overridden to preserve usual semantics: returns true if an undo
 operation would be successful now, false otherwise</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/undo/UndoManager.html#canUndoOrRedo()">canUndoOrRedo</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return true if calling undoOrRedo will undo or redo.</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/undo/UndoManager.html#discardAllEdits()">discardAllEdits</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Empty the undo manager, sending each edit a die message
 in the process.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../../../javax/swing/undo/UndoableEdit.html">UndoableEdit</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/undo/UndoManager.html#editToBeRedone()">editToBeRedone</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the the next significant edit to be redone if redo is
 called.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../../../javax/swing/undo/UndoableEdit.html">UndoableEdit</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/swing/undo/UndoManager.html#editToBeUndone()">editToBeUndone</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the the next significant edit to be undone if undo is
 called.</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/undo/UndoManager.html#end()">end</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sending end() to an UndoManager turns it into a plain old
 (ended) CompoundEdit.</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/undo/UndoManager.html#getLimit()">getLimit</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the maximum number of edits this UndoManager will
 hold.</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/undo/UndoManager.html#getRedoPresentationName()">getRedoPresentationName</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If inProgress, returns getRedoPresentationName of the
 significant edit that will be redone when redo() is invoked.</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/undo/UndoManager.html#getUndoOrRedoPresentationName()">getUndoOrRedoPresentationName</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the appropriate name for a command that toggles between
 undo and redo.</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/undo/UndoManager.html#getUndoPresentationName()">getUndoPresentationName</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If inProgress, returns getUndoPresentationName of the
 significant edit that will be undone when undo() is invoked.</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/undo/UndoManager.html#redo()">redo</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If this UndoManager is inProgress, redoes the last significant
 UndoableEdit at indexOfNextAdd or after, and all insignificant
 edits up to it.</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/undo/UndoManager.html#redoTo(javax.swing.undo.UndoableEdit)">redoTo</A></B>(<A HREF="../../../javax/swing/undo/UndoableEdit.html">UndoableEdit</A>&nbsp;edit)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Redoes all changes from indexOfNextAdd to edit.</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/undo/UndoManager.html#setLimit(int)">setLimit</A></B>(int&nbsp;l)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the maximum number of edits this UndoManager will hold.</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/undo/UndoManager.html#toString()">toString</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a string that displays and identifies this
 object's properties.</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/undo/UndoManager.html#trimEdits(int, int)">trimEdits</A></B>(int&nbsp;from,
          int&nbsp;to)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tell the edits in the given range (inclusive) to die, and
 remove them from edits.</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/undo/UndoManager.html#trimForLimit()">trimForLimit</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reduce the number of queued edits to a range of size limit,
 centered on indexOfNextAdd.</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/undo/UndoManager.html#undo()">undo</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If this UndoManager is inProgress, undo the last significant
 UndoableEdit before indexOfNextAdd, and all insignificant edits back to
 it.</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/undo/UndoManager.html#undoableEditHappened(javax.swing.event.UndoableEditEvent)">undoableEditHappened</A></B>(<A HREF="../../../javax/swing/event/UndoableEditEvent.html">UndoableEditEvent</A>&nbsp;e)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Called by the UndoabledEdit sources this UndoManager listens
 to.</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/undo/UndoManager.html#undoOrRedo()">undoOrRedo</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Undo or redo as appropriate.</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/undo/UndoManager.html#undoTo(javax.swing.undo.UndoableEdit)">undoTo</A></B>(<A HREF="../../../javax/swing/undo/UndoableEdit.html">UndoableEdit</A>&nbsp;edit)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Undoes all changes from indexOfNextAdd to edit.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_javax.swing.undo.CompoundEdit"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" ID="TableSubHeadingColor">
<TD><B>Methods inherited from class javax.swing.undo.<A HREF="../../../javax/swing/undo/CompoundEdit.html">CompoundEdit</A></B></TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD><CODE><A HREF="../../../javax/swing/undo/CompoundEdit.html#die()">die</A>, 
<A HREF="../../../javax/swing/undo/CompoundEdit.html#getPresentationName()">getPresentationName</A>, 
<A HREF="../../../javax/swing/undo/CompoundEdit.html#isInProgress()">isInProgress</A>, 
<A HREF="../../../javax/swing/undo/CompoundEdit.html#isSignificant()">isSignificant</A>, 
<A HREF="../../../javax/swing/undo/CompoundEdit.html#lastEdit()">lastEdit</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_javax.swing.undo.AbstractUndoableEdit"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" ID="TableSubHeadingColor">
<TD><B>Methods inherited from class javax.swing.undo.<A HREF="../../../javax/swing/undo/AbstractUndoableEdit.html">AbstractUndoableEdit</A></B></TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD><CODE><A HREF="../../../javax/swing/undo/AbstractUndoableEdit.html#replaceEdit(javax.swing.undo.UndoableEdit)">replaceEdit</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, 
wait, 
wait, 
wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

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


<!-- ========= 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="UndoManager()"><!-- --></A><H3>
UndoManager</H3>
<PRE>
public <B>UndoManager</B>()</PRE>
<DL>
</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="getLimit()"><!-- --></A><H3>
getLimit</H3>
<PRE>
public int <B>getLimit</B>()</PRE>
<DL>
<DD>Returns the maximum number of edits this UndoManager will
 hold. Default value is 100.<DD><DL>
<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/undo/UndoManager.html#addEdit(javax.swing.undo.UndoableEdit)"><CODE>addEdit(javax.swing.undo.UndoableEdit)</CODE></A>, 
<A HREF="../../../javax/swing/undo/UndoManager.html#setLimit(int)"><CODE>setLimit(int)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="discardAllEdits()"><!-- --></A><H3>
discardAllEdits</H3>
<PRE>
public void <B>discardAllEdits</B>()</PRE>
<DL>
<DD>Empty the undo manager, sending each edit a die message
 in the process.<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="trimForLimit()"><!-- --></A><H3>
trimForLimit</H3>
<PRE>
protected void <B>trimForLimit</B>()</PRE>
<DL>
<DD>Reduce the number of queued edits to a range of size limit,
 centered on indexOfNextAdd.<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="trimEdits(int, int)"><!-- --></A><H3>
trimEdits</H3>
<PRE>
protected void <B>trimEdits</B>(int&nbsp;from,
                         int&nbsp;to)</PRE>
<DL>
<DD>Tell the edits in the given range (inclusive) to die, and
 remove them from edits. from > to is a no-op.<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="setLimit(int)"><!-- --></A><H3>
setLimit</H3>
<PRE>
public void <B>setLimit</B>(int&nbsp;l)</PRE>
<DL>
<DD>Set the maximum number of edits this UndoManager will hold. If
 edits need to be discarded to shrink the limit, they will be
 told to die in the reverse of the order that they were added.<DD><DL>
<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/undo/UndoManager.html#addEdit(javax.swing.undo.UndoableEdit)"><CODE>addEdit(javax.swing.undo.UndoableEdit)</CODE></A>, 
<A HREF="../../../javax/swing/undo/UndoManager.html#getLimit()"><CODE>getLimit()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="editToBeUndone()"><!-- --></A><H3>
editToBeUndone</H3>
<PRE>
protected <A HREF="../../../javax/swing/undo/UndoableEdit.html">UndoableEdit</A> <B>editToBeUndone</B>()</PRE>
<DL>
<DD>Returns the the next significant edit to be undone if undo is
 called. May return null<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="editToBeRedone()"><!-- --></A><H3>
editToBeRedone</H3>
<PRE>
protected <A HREF="../../../javax/swing/undo/UndoableEdit.html">UndoableEdit</A> <B>editToBeRedone</B>()</PRE>
<DL>
<DD>Returns the the next significant edit to be redone if redo is
 called. May return null<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="undoTo(javax.swing.undo.UndoableEdit)"><!-- --></A><H3>
undoTo</H3>
<PRE>
protected void <B>undoTo</B>(<A HREF="../../../javax/swing/undo/UndoableEdit.html">UndoableEdit</A>&nbsp;edit)
               throws <A HREF="../../../javax/swing/undo/CannotUndoException.html">CannotUndoException</A></PRE>
<DL>
<DD>Undoes all changes from indexOfNextAdd to edit. Updates indexOfNextAdd accordingly.<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="redoTo(javax.swing.undo.UndoableEdit)"><!-- --></A><H3>
redoTo</H3>
<PRE>
protected void <B>redoTo</B>(<A HREF="../../../javax/swing/undo/UndoableEdit.html">UndoableEdit</A>&nbsp;edit)
               throws <A HREF="../../../javax/swing/undo/CannotRedoException.html">CannotRedoException</A></PRE>
<DL>
<DD>Redoes all changes from indexOfNextAdd to edit. Updates indexOfNextAdd accordingly.<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="undoOrRedo()"><!-- --></A><H3>
undoOrRedo</H3>
<PRE>
public void <B>undoOrRedo</B>()
                throws <A HREF="../../../javax/swing/undo/CannotRedoException.html">CannotRedoException</A>,
                       <A HREF="../../../javax/swing/undo/CannotUndoException.html">CannotUndoException</A></PRE>
<DL>
<DD>Undo or redo as appropriate. Suitable for binding to an action
 that toggles between these two functions. Only makes sense
 to send this if limit == 1.<DD><DL>
<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/undo/UndoManager.html#canUndoOrRedo()"><CODE>canUndoOrRedo()</CODE></A>, 
<A HREF="../../../javax/swing/undo/UndoManager.html#getUndoOrRedoPresentationName()"><CODE>getUndoOrRedoPresentationName()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="canUndoOrRedo()"><!-- --></A><H3>
canUndoOrRedo</H3>
<PRE>
public boolean <B>canUndoOrRedo</B>()</PRE>
<DL>
<DD>Return true if calling undoOrRedo will undo or redo. Suitable
 for deciding to enable a command that toggles between the two
 functions, which only makes sense to use if limit == 1.<DD><DL>
<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/undo/UndoManager.html#undoOrRedo()"><CODE>undoOrRedo()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="undo()"><!-- --></A><H3>
undo</H3>
<PRE>
public void <B>undo</B>()
          throws <A HREF="../../../javax/swing/undo/CannotUndoException.html">CannotUndoException</A></PRE>
<DL>
<DD>If this UndoManager is inProgress, undo the last significant
 UndoableEdit before indexOfNextAdd, and all insignificant edits back to
 it. Updates indexOfNextAdd accordingly.

 <p>If not inProgress, indexOfNextAdd is ignored and super's routine is
 called.</p><DD><DL>
<DT><B>Overrides:</B><DD><A HREF="../../../javax/swing/undo/CompoundEdit.html#undo()">undo</A> in class <A HREF="../../../javax/swing/undo/CompoundEdit.html">CompoundEdit</A><DT><B>See Also: </B><DD><A HREF="../../../javax/swing/undo/CompoundEdit.html#end()"><CODE>CompoundEdit.end()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="canUndo()"><!-- --></A><H3>
canUndo</H3>
<PRE>
public boolean <B>canUndo</B>()</PRE>
<DL>
<DD>Overridden to preserve usual semantics: returns true if an undo
 operation would be successful now, false otherwise<DD><DL>
<DT><B>Overrides:</B><DD><A HREF="../../../javax/swing/undo/CompoundEdit.html#canUndo()">canUndo</A> in class <A HREF="../../../javax/swing/undo/CompoundEdit.html">CompoundEdit</A></DL>
</DD>
</DL>
<HR>

<A NAME="redo()"><!-- --></A><H3>
redo</H3>
<PRE>
public void <B>redo</B>()
          throws <A HREF="../../../javax/swing/undo/CannotRedoException.html">CannotRedoException</A></PRE>
<DL>
<DD>If this UndoManager is inProgress, redoes the last significant
 UndoableEdit at indexOfNextAdd or after, and all insignificant
 edits up to it. Updates indexOfNextAdd accordingly.

 <p>If not inProgress, indexOfNextAdd is ignored and super's routine is
 called.</p><DD><DL>
<DT><B>Overrides:</B><DD><A HREF="../../../javax/swing/undo/CompoundEdit.html#redo()">redo</A> in class <A HREF="../../../javax/swing/undo/CompoundEdit.html">CompoundEdit</A><DT><B>See Also: </B><DD><A HREF="../../../javax/swing/undo/CompoundEdit.html#end()"><CODE>CompoundEdit.end()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="canRedo()"><!-- --></A><H3>
canRedo</H3>
<PRE>
public boolean <B>canRedo</B>()</PRE>
<DL>
<DD>Overridden to preserve usual semantics: returns true if a redo
 operation would be successful now, false otherwise<DD><DL>
<DT><B>Overrides:</B><DD><A HREF="../../../javax/swing/undo/CompoundEdit.html#canRedo()">canRedo</A> in class <A HREF="../../../javax/swing/undo/CompoundEdit.html">CompoundEdit</A></DL>
</DD>
</DL>
<HR>

<A NAME="addEdit(javax.swing.undo.UndoableEdit)"><!-- --></A><H3>
addEdit</H3>
<PRE>
public boolean <B>addEdit</B>(<A HREF="../../../javax/swing/undo/UndoableEdit.html">UndoableEdit</A>&nbsp;anEdit)</PRE>
<DL>
<DD>If inProgress, inserts anEdit at indexOfNextAdd, and removes
 any old edits that were at indexOfNextAdd or later. The die
 method is called on each edit that is removed is sent, in the
 reverse of the order the edits were added. Updates
 indexOfNextAdd.

 <p>If not inProgress, acts as a CompoundEdit</p><DD><DL>
<DT><B>Overrides:</B><DD><A HREF="../../../javax/swing/undo/CompoundEdit.html#addEdit(javax.swing.undo.UndoableEdit)">addEdit</A> in class <A HREF="../../../javax/swing/undo/CompoundEdit.html">CompoundEdit</A><DT><B>See Also: </B><DD><A HREF="../../../javax/swing/undo/CompoundEdit.html#end()"><CODE>CompoundEdit.end()</CODE></A>, 
<A HREF="../../../javax/swing/undo/CompoundEdit.html#addEdit(javax.swing.undo.UndoableEdit)"><CODE>CompoundEdit.addEdit(javax.swing.undo.UndoableEdit)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="end()"><!-- --></A><H3>
end</H3>
<PRE>
public void <B>end</B>()</PRE>
<DL>
<DD>Sending end() to an UndoManager turns it into a plain old
 (ended) CompoundEdit.

 <p> Calls super's end() method (making inProgress false), then
 sends die() to the unreachable edits at indexOfNextAdd and
 beyond, in the reverse of the order in which they were added.<DD><DL>
<DT><B>Overrides:</B><DD><A HREF="../../../javax/swing/undo/CompoundEdit.html#end()">end</A> in class <A HREF="../../../javax/swing/undo/CompoundEdit.html">CompoundEdit</A><DT><B>See Also: </B><DD><A HREF="../../../javax/swing/undo/CompoundEdit.html#end()"><CODE>CompoundEdit.end()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getUndoOrRedoPresentationName()"><!-- --></A><H3>
getUndoOrRedoPresentationName</H3>
<PRE>
public java.lang.String <B>getUndoOrRedoPresentationName</B>()</PRE>
<DL>
<DD>Return the appropriate name for a command that toggles between
 undo and redo.  Only makes sense to use such a command if limit
 == 1 and we're not in progress.<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="getUndoPresentationName()"><!-- --></A><H3>
getUndoPresentationName</H3>
<PRE>
public java.lang.String <B>getUndoPresentationName</B>()</PRE>
<DL>
<DD>If inProgress, returns getUndoPresentationName of the
 significant edit that will be undone when undo() is invoked.
 If there is none, returns AbstractUndoableEdit.UndoName</p>
 
 <p>If not inProgress, acts as a CompoundEdit</p><DD><DL>
<DT><B>Overrides:</B><DD><A HREF="../../../javax/swing/undo/CompoundEdit.html#getUndoPresentationName()">getUndoPresentationName</A> in class <A HREF="../../../javax/swing/undo/CompoundEdit.html">CompoundEdit</A><DT><B>See Also: </B><DD><A HREF="../../../javax/swing/undo/UndoManager.html#undo()"><CODE>undo()</CODE></A>, 
<A HREF="../../../javax/swing/undo/CompoundEdit.html#getUndoPresentationName()"><CODE>CompoundEdit.getUndoPresentationName()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getRedoPresentationName()"><!-- --></A><H3>
getRedoPresentationName</H3>
<PRE>
public java.lang.String <B>getRedoPresentationName</B>()</PRE>
<DL>
<DD>If inProgress, returns getRedoPresentationName of the
 significant edit that will be redone when redo() is invoked.
 If there is none, returns AbstractUndoableEdit.RedoName
 
 <p>If not inProgress, acts as a CompoundEdit</p><DD><DL>
<DT><B>Overrides:</B><DD><A HREF="../../../javax/swing/undo/CompoundEdit.html#getRedoPresentationName()">getRedoPresentationName</A> in class <A HREF="../../../javax/swing/undo/CompoundEdit.html">CompoundEdit</A><DT><B>See Also: </B><DD><A HREF="../../../javax/swing/undo/UndoManager.html#redo()"><CODE>redo()</CODE></A>, 
<A HREF="../../../javax/swing/undo/CompoundEdit.html#getUndoPresentationName()"><CODE>CompoundEdit.getUndoPresentationName()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="undoableEditHappened(javax.swing.event.UndoableEditEvent)"><!-- --></A><H3>
undoableEditHappened</H3>
<PRE>
public void <B>undoableEditHappened</B>(<A HREF="../../../javax/swing/event/UndoableEditEvent.html">UndoableEditEvent</A>&nbsp;e)</PRE>
<DL>
<DD>Called by the UndoabledEdit sources this UndoManager listens
 to. Calls addEdit with e.getEdit().<DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../../javax/swing/event/UndoableEditListener.html#undoableEditHappened(javax.swing.event.UndoableEditEvent)">undoableEditHappened</A> in interface <A HREF="../../../javax/swing/event/UndoableEditListener.html">UndoableEditListener</A><DT><B>See Also: </B><DD><A HREF="../../../javax/swing/undo/UndoManager.html#addEdit(javax.swing.undo.UndoableEdit)"><CODE>addEdit(javax.swing.undo.UndoableEdit)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="toString()"><!-- --></A><H3>
toString</H3>
<PRE>
public java.lang.String <B>toString</B>()</PRE>
<DL>
<DD>Returns a string that displays and identifies this
 object's properties.<DD><DL>
<DT><B>Returns:</B><DD>a String representation of this object<DT><B>Overrides:</B><DD><A HREF="../../../javax/swing/undo/CompoundEdit.html#toString()">toString</A> in class <A HREF="../../../javax/swing/undo/CompoundEdit.html">CompoundEdit</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/UndoManager.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/undo/UndoableEditSupport.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="UndoManager.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="#fields_inherited_from_class_javax.swing.undo.CompoundEdit">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;FIELD&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>
