📄 undoableedit.html
字号:
<!-- ========= CONSTRUCTOR DETAIL ======== --><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><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>Undo the edit that was made.</DL><HR><A NAME="canUndo()"><!-- --></A><H3>canUndo</H3><PRE>public boolean <B>canUndo</B>()</PRE><DL><DD>True if it is still possible to undo this operation</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>Re-apply the edit, assuming that it has been undone.</DL><HR><A NAME="canRedo()"><!-- --></A><H3>canRedo</H3><PRE>public boolean <B>canRedo</B>()</PRE><DL><DD>True if it is still possible to redo this operation</DL><HR><A NAME="die()"><!-- --></A><H3>die</H3><PRE>public void <B>die</B>()</PRE><DL><DD>May be sent to inform an edit that it should no longer be used. This is a useful hook for cleaning up state no longer needed once undoing or redoing is impossible--for example, deleting file resources used by objects that can no longer be undeleted. UndoManager calls this before it dequeues edits. Note that this is a one-way operation. There is no "undie" method.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../../javax/swing/undo/CompoundEdit.html#die()"><CODE>CompoundEdit.die()</CODE></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> anEdit)</PRE><DL><DD>This UndoableEdit should absorb anEdit if it can. Return true if anEdit has been incoporated, false if it has not. <p>Typically the receiver is already in the queue of a UndoManager (or other UndoableEditListener), and is being given a chance to incorporate anEdit rather than letting it be added to the queue in turn.</p> <p>If true is returned, from now on anEdit must return false from canUndo() and canRedo(), and must throw the appropriate exception on undo() or redo().</p></DL><HR><A NAME="replaceEdit(javax.swing.undo.UndoableEdit)"><!-- --></A><H3>replaceEdit</H3><PRE>public boolean <B>replaceEdit</B>(<A HREF="../../../javax/swing/undo/UndoableEdit.html">UndoableEdit</A> anEdit)</PRE><DL><DD>Return true if this UndoableEdit should replace anEdit. The receiver should incorporate anEdit's state before returning true. <p>This message is the opposite of addEdit--anEdit has typically already been queued in a UndoManager (or other UndoableEditListener), and the receiver is being given a chance to take its place.</p> <p>If true is returned, from now on anEdit must return false from canUndo() and canRedo(), and must throw the appropriate exception on undo() or redo().</p></DL><HR><A NAME="isSignificant()"><!-- --></A><H3>isSignificant</H3><PRE>public boolean <B>isSignificant</B>()</PRE><DL><DD>Return false if this edit is insignificant--for example one that maintains the user's selection, but does not change any model state. This status can be used by an UndoableEditListener (like UndoManager) when deciding which UndoableEdits to present to the user as Undo/Redo options, and which to perform as side effects of undoing or redoing other events.</DL><HR><A NAME="getPresentationName()"><!-- --></A><H3>getPresentationName</H3><PRE>public <A HREF="../../../java/lang/String.html">String</A> <B>getPresentationName</B>()</PRE><DL><DD>Provide a localized, human readable description of this edit suitable for use in, say, a change log.</DL><HR><A NAME="getUndoPresentationName()"><!-- --></A><H3>getUndoPresentationName</H3><PRE>public <A HREF="../../../java/lang/String.html">String</A> <B>getUndoPresentationName</B>()</PRE><DL><DD>Provide a localized, human readable description of the undoable form of this edit, e.g. for use as an Undo menu item. Typically derived from getDescription();</DL><HR><A NAME="getRedoPresentationName()"><!-- --></A><H3>getRedoPresentationName</H3><PRE>public <A HREF="../../../java/lang/String.html">String</A> <B>getRedoPresentationName</B>()</PRE><DL><DD>Provide a localized, human readable description of the redoable form of this edit, e.g. for use as a Redo menu item. Typically derived from getPresentationName();</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" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/UndoableEdit.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Std. Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../javax/swing/undo/StateEditable.html"><B>PREV CLASS</B></A> NEXT CLASS</FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="UndoableEdit.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | CONSTR | <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>For further API reference and developer documentation, see <a href="http://java.sun.com/products/jdk/1.3/devdocs-vs-specs.html">Java 2 SDK SE Developer Documentation</a>. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. <p>Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.<br>Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road<br>Palo Alto, California, 94303, U.S.A. All Rights Reserved.</font></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -