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

📄 defaultlistselectionmodel.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<A NAME="removeSelectionInterval(int, int)"><!-- --></A><H3>removeSelectionInterval</H3><PRE>public void <B>removeSelectionInterval</B>(int&nbsp;index0,                                    int&nbsp;index1)</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../javax/swing/ListSelectionModel.html">ListSelectionModel</A></CODE></B></DD><DD>Change the selection to be the set difference of the current selection and the indices between index0 and index1 inclusive.  If this represents  a change to the current selection, then notify each  ListSelectionListener.  Note that index0 doesn't have to be less than or equal to index1.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../javax/swing/ListSelectionModel.html#removeSelectionInterval(int, int)">removeSelectionInterval</A></CODE> in interface <CODE><A HREF="../../javax/swing/ListSelectionModel.html">ListSelectionModel</A></CODE></DL></DD><DD>Following copied from interface: <CODE>javax.swing.ListSelectionModel</CODE></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>index0</CODE> - one end of the interval.<DD><CODE>index1</CODE> - other end of the interval<DT><B>See Also: </B><DD><A HREF="../../javax/swing/ListSelectionModel.html#addListSelectionListener(javax.swing.event.ListSelectionListener)"><CODE>ListSelectionModel.addListSelectionListener(javax.swing.event.ListSelectionListener)</CODE></A></DL></DD></DL><HR><A NAME="insertIndexInterval(int, int, boolean)"><!-- --></A><H3>insertIndexInterval</H3><PRE>public void <B>insertIndexInterval</B>(int&nbsp;index,                                int&nbsp;length,                                boolean&nbsp;before)</PRE><DL><DD>Insert length indices beginning before/after index. If the value  at index is itself selected, set all of the newly inserted  items, otherwise leave them unselected. This method is typically called to sync the selection model with a corresponding change in the data model.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../javax/swing/ListSelectionModel.html#insertIndexInterval(int, int, boolean)">insertIndexInterval</A></CODE> in interface <CODE><A HREF="../../javax/swing/ListSelectionModel.html">ListSelectionModel</A></CODE></DL></DD></DL><HR><A NAME="removeIndexInterval(int, int)"><!-- --></A><H3>removeIndexInterval</H3><PRE>public void <B>removeIndexInterval</B>(int&nbsp;index0,                                int&nbsp;index1)</PRE><DL><DD>Remove the indices in the interval index0,index1 (inclusive) from the selection model.  This is typically called to sync the selection model width a corresponding change in the data model.  Note that (as always) index0 need not be <= index1.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../javax/swing/ListSelectionModel.html#removeIndexInterval(int, int)">removeIndexInterval</A></CODE> in interface <CODE><A HREF="../../javax/swing/ListSelectionModel.html">ListSelectionModel</A></CODE></DL></DD></DL><HR><A NAME="setValueIsAdjusting(boolean)"><!-- --></A><H3>setValueIsAdjusting</H3><PRE>public void <B>setValueIsAdjusting</B>(boolean&nbsp;isAdjusting)</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../javax/swing/ListSelectionModel.html">ListSelectionModel</A></CODE></B></DD><DD>This property is true if upcoming changes to the value of the model should be considered a single event. For example if the model is being updated in response to a user drag, the value of the valueIsAdjusting property will be set to true when the drag is initiated and be set to false when the drag is finished.  This property allows listeners to  to update only when a change has been finalized, rather than always handling all of the intermediate values.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../javax/swing/ListSelectionModel.html#setValueIsAdjusting(boolean)">setValueIsAdjusting</A></CODE> in interface <CODE><A HREF="../../javax/swing/ListSelectionModel.html">ListSelectionModel</A></CODE></DL></DD><DD>Following copied from interface: <CODE>javax.swing.ListSelectionModel</CODE></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>valueIsAdjusting</CODE> - The new value of the property.<DT><B>See Also: </B><DD><A HREF="../../javax/swing/ListSelectionModel.html#getValueIsAdjusting()"><CODE>ListSelectionModel.getValueIsAdjusting()</CODE></A></DL></DD></DL><HR><A NAME="toString()"><!-- --></A><H3>toString</H3><PRE>public <A HREF="../../java/lang/String.html">String</A> <B>toString</B>()</PRE><DL><DD>Returns a string that displays and identifies this object's properties.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/lang/Object.html#toString()">toString</A></CODE> in class <CODE><A HREF="../../java/lang/Object.html">Object</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>a <code>String</code> representation of this object</DL></DD></DL><HR><A NAME="clone()"><!-- --></A><H3>clone</H3><PRE>public <A HREF="../../java/lang/Object.html">Object</A> <B>clone</B>()             throws <A HREF="../../java/lang/CloneNotSupportedException.html">CloneNotSupportedException</A></PRE><DL><DD>Returns a clone of this selection model with the same selection. <code>listenerLists</code> are not duplicated.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/lang/Object.html#clone()">clone</A></CODE> in class <CODE><A HREF="../../java/lang/Object.html">Object</A></CODE></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/CloneNotSupportedException.html">CloneNotSupportedException</A></CODE> - if the selection model does not    both (a) implement the Cloneable interface and (b) define a    <code>clone</code> method.</DL></DD></DL><HR><A NAME="getAnchorSelectionIndex()"><!-- --></A><H3>getAnchorSelectionIndex</H3><PRE>public int <B>getAnchorSelectionIndex</B>()</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../javax/swing/ListSelectionModel.html">ListSelectionModel</A></CODE></B></DD><DD>Return the first index argument from the most recent call to  setSelectionInterval(), addSelectionInterval() or removeSelectionInterval(). The most recent index0 is considered the "anchor" and the most recent index1 is considered the "lead".  Some interfaces display these indices specially, e.g. Windows95 displays the lead index with a  dotted yellow outline.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../javax/swing/ListSelectionModel.html#getAnchorSelectionIndex()">getAnchorSelectionIndex</A></CODE> in interface <CODE><A HREF="../../javax/swing/ListSelectionModel.html">ListSelectionModel</A></CODE></DL></DD><DD>Following copied from interface: <CODE>javax.swing.ListSelectionModel</CODE></DD><DD><DL><DT><B>See Also: </B><DD><A HREF="../../javax/swing/ListSelectionModel.html#getLeadSelectionIndex()"><CODE>ListSelectionModel.getLeadSelectionIndex()</CODE></A>, <A HREF="../../javax/swing/ListSelectionModel.html#setSelectionInterval(int, int)"><CODE>ListSelectionModel.setSelectionInterval(int, int)</CODE></A>, <A HREF="../../javax/swing/ListSelectionModel.html#addSelectionInterval(int, int)"><CODE>ListSelectionModel.addSelectionInterval(int, int)</CODE></A></DL></DD></DL><HR><A NAME="getLeadSelectionIndex()"><!-- --></A><H3>getLeadSelectionIndex</H3><PRE>public int <B>getLeadSelectionIndex</B>()</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../javax/swing/ListSelectionModel.html">ListSelectionModel</A></CODE></B></DD><DD>Return the second index argument from the most recent call to  setSelectionInterval(), addSelectionInterval() or removeSelectionInterval().<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../javax/swing/ListSelectionModel.html#getLeadSelectionIndex()">getLeadSelectionIndex</A></CODE> in interface <CODE><A HREF="../../javax/swing/ListSelectionModel.html">ListSelectionModel</A></CODE></DL></DD><DD>Following copied from interface: <CODE>javax.swing.ListSelectionModel</CODE></DD><DD><DL><DT><B>See Also: </B><DD><A HREF="../../javax/swing/ListSelectionModel.html#getAnchorSelectionIndex()"><CODE>ListSelectionModel.getAnchorSelectionIndex()</CODE></A>, <A HREF="../../javax/swing/ListSelectionModel.html#setSelectionInterval(int, int)"><CODE>ListSelectionModel.setSelectionInterval(int, int)</CODE></A>, <A HREF="../../javax/swing/ListSelectionModel.html#addSelectionInterval(int, int)"><CODE>ListSelectionModel.addSelectionInterval(int, int)</CODE></A></DL></DD></DL><HR><A NAME="setAnchorSelectionIndex(int)"><!-- --></A><H3>setAnchorSelectionIndex</H3><PRE>public void <B>setAnchorSelectionIndex</B>(int&nbsp;anchorIndex)</PRE><DL><DD>Set the anchor selection index, leaving all selection values unchanged.  If leadAnchorNotificationEnabled is true, send a notification covering  the old and new anchor cells.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../javax/swing/ListSelectionModel.html#setAnchorSelectionIndex(int)">setAnchorSelectionIndex</A></CODE> in interface <CODE><A HREF="../../javax/swing/ListSelectionModel.html">ListSelectionModel</A></CODE></DL></DD><DD><DL><DT><B>See Also: </B><DD><A HREF="../../javax/swing/DefaultListSelectionModel.html#getAnchorSelectionIndex()"><CODE>getAnchorSelectionIndex()</CODE></A>, <A HREF="../../javax/swing/DefaultListSelectionModel.html#setLeadSelectionIndex(int)"><CODE>setLeadSelectionIndex(int)</CODE></A></DL></DD></DL><HR><A NAME="setLeadSelectionIndex(int)"><!-- --></A><H3>setLeadSelectionIndex</H3><PRE>public void <B>setLeadSelectionIndex</B>(int&nbsp;leadIndex)</PRE><DL><DD>Sets the lead selection index, ensuring that values between the  anchor and the new lead are either all selected or all deselected.  If the value at the anchor index is selected, first clear all the  values in the range [anchor, oldLeadIndex], then select all the values  values in the range [anchor, newLeadIndex], where oldLeadIndex is the old leadIndex and newLeadIndex is the new one.  <p>  If the value at the anchor index is not selected, do the same thing in  reverse selecting values in the old range and deslecting values in the new one.  <p> Generate a single event for this change and notify all listeners.  For the purposes of generating minimal bounds in this event, do the  operation in a single pass; that way the first and last index inside the  ListSelectionEvent that is broadcast will refer to cells that actually  changed value because of this method. If, instead, this operation were  done in two steps the effect on the selection state would be the same  but two events would be generated and the bounds around the changed  values would be wider, including cells that had been first cleared only  to later be set.  <p> This method can be used in the <code>mouseDragged</code> method of a UI class to extend a selection.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../javax/swing/ListSelectionModel.html#setLeadSelectionIndex(int)">setLeadSelectionIndex</A></CODE> in interface <CODE><A HREF="../../javax/swing/ListSelectionModel.html">ListSelectionModel</A></CODE></DL></DD><DD><DL><DT><B>See Also: </B><DD><A HREF="../../javax/swing/DefaultListSelectionModel.html#getLeadSelectionIndex()"><CODE>getLeadSelectionIndex()</CODE></A>, <A HREF="../../javax/swing/DefaultListSelectionModel.html#setAnchorSelectionIndex(int)"><CODE>setAnchorSelectionIndex(int)</CODE></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" 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>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/DefaultListSelectionModel.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup>&nbsp;2&nbsp;Platform<br>Std.&nbsp;Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../javax/swing/DefaultListModel.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../javax/swing/DefaultSingleSelectionModel.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="DefaultListSelectionModel.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&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>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 + -