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

📄 listselectionmodel.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 3 页
字号:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if the specified index is selected.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/ListSelectionModel.html#isSelectionEmpty()">isSelectionEmpty</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if no indices are selected.</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/ListSelectionModel.html#removeIndexInterval(int, int)">removeIndexInterval</A></B>(int&nbsp;index0,                    int&nbsp;index1)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Remove the indices in the interval index0,index1 (inclusive) from the selection model.</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/ListSelectionModel.html#removeListSelectionListener(javax.swing.event.ListSelectionListener)">removeListSelectionListener</A></B>(<A HREF="../../javax/swing/event/ListSelectionListener.html">ListSelectionListener</A>&nbsp;x)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Remove a listener from the list that's notified each time a  change to the selection occurs.</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/ListSelectionModel.html#removeSelectionInterval(int, int)">removeSelectionInterval</A></B>(int&nbsp;index0,                        int&nbsp;index1)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Change the selection to be the set difference of the current selection and the indices between index0 and index1 inclusive.</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/ListSelectionModel.html#setAnchorSelectionIndex(int)">setAnchorSelectionIndex</A></B>(int&nbsp;index)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the anchor selection index.</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/ListSelectionModel.html#setLeadSelectionIndex(int)">setLeadSelectionIndex</A></B>(int&nbsp;index)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the lead selection index.</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/ListSelectionModel.html#setSelectionInterval(int, int)">setSelectionInterval</A></B>(int&nbsp;index0,                     int&nbsp;index1)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Change the selection to be between index0 and index1 inclusive.</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/ListSelectionModel.html#setSelectionMode(int)">setSelectionMode</A></B>(int&nbsp;selectionMode)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the selection mode.</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/ListSelectionModel.html#setValueIsAdjusting(boolean)">setValueIsAdjusting</A></B>(boolean&nbsp;valueIsAdjusting)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This property is true if upcoming changes to the value of the model should be considered a single event.</TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD></TR></TABLE><A NAME="SINGLE_SELECTION"><!-- --></A><H3>SINGLE_SELECTION</H3><PRE>public static final int <B>SINGLE_SELECTION</B></PRE><DL><DD>A value for the selectionMode property: select one list index at a time.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../javax/swing/ListSelectionModel.html#setSelectionMode(int)"><CODE>setSelectionMode(int)</CODE></A></DL></DD></DL><HR><A NAME="SINGLE_INTERVAL_SELECTION"><!-- --></A><H3>SINGLE_INTERVAL_SELECTION</H3><PRE>public static final int <B>SINGLE_INTERVAL_SELECTION</B></PRE><DL><DD>A value for the selectionMode property: select one contiguous range of indices at a time.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../javax/swing/ListSelectionModel.html#setSelectionMode(int)"><CODE>setSelectionMode(int)</CODE></A></DL></DD></DL><HR><A NAME="MULTIPLE_INTERVAL_SELECTION"><!-- --></A><H3>MULTIPLE_INTERVAL_SELECTION</H3><PRE>public static final int <B>MULTIPLE_INTERVAL_SELECTION</B></PRE><DL><DD>A value for the selectionMode property: select one or more  contiguous ranges of indices at a time.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../javax/swing/ListSelectionModel.html#setSelectionMode(int)"><CODE>setSelectionMode(int)</CODE></A></DL></DD></DL><!-- ========= 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="setSelectionInterval(int, int)"><!-- --></A><H3>setSelectionInterval</H3><PRE>public void <B>setSelectionInterval</B>(int&nbsp;index0,                                 int&nbsp;index1)</PRE><DL><DD>Change the selection to be 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>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>addListSelectionListener(javax.swing.event.ListSelectionListener)</CODE></A></DL></DD></DL><HR><A NAME="addSelectionInterval(int, int)"><!-- --></A><H3>addSelectionInterval</H3><PRE>public void <B>addSelectionInterval</B>(int&nbsp;index0,                                 int&nbsp;index1)</PRE><DL><DD>Change the selection to be the set union 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>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>addListSelectionListener(javax.swing.event.ListSelectionListener)</CODE></A></DL></DD></DL><HR><A NAME="removeSelectionInterval(int, int)"><!-- --></A><H3>removeSelectionInterval</H3><PRE>public void <B>removeSelectionInterval</B>(int&nbsp;index0,                                    int&nbsp;index1)</PRE><DL><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>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>addListSelectionListener(javax.swing.event.ListSelectionListener)</CODE></A></DL></DD></DL><HR><A NAME="getMinSelectionIndex()"><!-- --></A><H3>getMinSelectionIndex</H3><PRE>public int <B>getMinSelectionIndex</B>()</PRE><DL><DD>Returns the first selected index or -1 if the selection is empty.</DL><HR><A NAME="getMaxSelectionIndex()"><!-- --></A><H3>getMaxSelectionIndex</H3><PRE>public int <B>getMaxSelectionIndex</B>()</PRE><DL><DD>Returns the last selected index or -1 if the selection is empty.</DL><HR><A NAME="isSelectedIndex(int)"><!-- --></A><H3>isSelectedIndex</H3><PRE>public boolean <B>isSelectedIndex</B>(int&nbsp;index)</PRE><DL><DD>Returns true if the specified index is selected.</DL><HR><A NAME="getAnchorSelectionIndex()"><!-- --></A><H3>getAnchorSelectionIndex</H3><PRE>public int <B>getAnchorSelectionIndex</B>()</PRE><DL><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>See Also: </B><DD><A HREF="../../javax/swing/ListSelectionModel.html#getLeadSelectionIndex()"><CODE>getLeadSelectionIndex()</CODE></A>, <A HREF="../../javax/swing/ListSelectionModel.html#setSelectionInterval(int, int)"><CODE>setSelectionInterval(int, int)</CODE></A>, 

⌨️ 快捷键说明

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