⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 undomanager.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<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" CLASS="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" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../java/lang/String.html">String</A></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" CLASS="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" CLASS="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" CLASS="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" CLASS="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" CLASS="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" CLASS="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" CLASS="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" CLASS="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" CLASS="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" CLASS="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" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.<A HREF="../../../java/lang/Object.html">Object</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../java/lang/Object.html#clone()">clone</A>, <A HREF="../../../java/lang/Object.html#equals(java.lang.Object)">equals</A>, <A HREF="../../../java/lang/Object.html#finalize()">finalize</A>, <A HREF="../../../java/lang/Object.html#getClass()">getClass</A>, <A HREF="../../../java/lang/Object.html#hashCode()">hashCode</A>, <A HREF="../../../java/lang/Object.html#notify()">notify</A>, <A HREF="../../../java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="../../../java/lang/Object.html#wait()">wait</A>, <A HREF="../../../java/lang/Object.html#wait(long)">wait</A>, <A HREF="../../../java/lang/Object.html#wait(long, int)">wait</A></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" CLASS="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" CLASS="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></DL></DD><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></DL></DD><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></DL>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -