📄 defaultlistselectionmodel.html
字号:
<BR> Returns the first selected index or -1 if the selection is empty.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/DefaultListSelectionModel.html#getSelectionMode()">getSelectionMode</A></B>()</CODE><BR> Returns the selection mode.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/DefaultListSelectionModel.html#getValueIsAdjusting()">getValueIsAdjusting</A></B>()</CODE><BR> Returns true if the value is undergoing a series of changes.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/DefaultListSelectionModel.html#insertIndexInterval(int, int, boolean)">insertIndexInterval</A></B>(int index, int length, boolean before)</CODE><BR> Insert length indices beginning before/after index.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/DefaultListSelectionModel.html#isLeadAnchorNotificationEnabled()">isLeadAnchorNotificationEnabled</A></B>()</CODE><BR> Returns the value of the <code>leadAnchorNotificationEnabled</code> flag.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/DefaultListSelectionModel.html#isSelectedIndex(int)">isSelectedIndex</A></B>(int index)</CODE><BR> 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> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/DefaultListSelectionModel.html#isSelectionEmpty()">isSelectionEmpty</A></B>()</CODE><BR> 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> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/DefaultListSelectionModel.html#removeIndexInterval(int, int)">removeIndexInterval</A></B>(int index0, int index1)</CODE><BR> 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> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/DefaultListSelectionModel.html#removeListSelectionListener(javax.swing.event.ListSelectionListener)">removeListSelectionListener</A></B>(<A HREF="../../javax/swing/event/ListSelectionListener.html">ListSelectionListener</A> l)</CODE><BR> 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> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/DefaultListSelectionModel.html#removeSelectionInterval(int, int)">removeSelectionInterval</A></B>(int index0, int index1)</CODE><BR> 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> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/DefaultListSelectionModel.html#setAnchorSelectionIndex(int)">setAnchorSelectionIndex</A></B>(int anchorIndex)</CODE><BR> Set the anchor selection index, leaving all selection values unchanged.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/DefaultListSelectionModel.html#setLeadAnchorNotificationEnabled(boolean)">setLeadAnchorNotificationEnabled</A></B>(boolean flag)</CODE><BR> Sets the value of the leadAnchorNotificationEnabled flag.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/DefaultListSelectionModel.html#setLeadSelectionIndex(int)">setLeadSelectionIndex</A></B>(int leadIndex)</CODE><BR> Sets the lead selection index, ensuring that values between the anchor and the new lead are either all selected or all deselected.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/DefaultListSelectionModel.html#setSelectionInterval(int, int)">setSelectionInterval</A></B>(int index0, int index1)</CODE><BR> 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> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/DefaultListSelectionModel.html#setSelectionMode(int)">setSelectionMode</A></B>(int selectionMode)</CODE><BR> Sets the selection mode.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/DefaultListSelectionModel.html#setValueIsAdjusting(boolean)">setValueIsAdjusting</A></B>(boolean isAdjusting)</CODE><BR> This property is true if upcoming changes to the value of the model should be considered a single event.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/DefaultListSelectionModel.html#toString()">toString</A></B>()</CODE><BR> Returns a string that displays and identifies this object's properties.</TD></TR></TABLE> <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#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> <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="listenerList"><!-- --></A><H3>listenerList</H3><PRE>protected <A HREF="../../javax/swing/event/EventListenerList.html">EventListenerList</A> <B>listenerList</B></PRE><DL></DL><HR><A NAME="leadAnchorNotificationEnabled"><!-- --></A><H3>leadAnchorNotificationEnabled</H3><PRE>protected boolean <B>leadAnchorNotificationEnabled</B></PRE><DL></DL><!-- ========= 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="DefaultListSelectionModel()"><!-- --></A><H3>DefaultListSelectionModel</H3><PRE>public <B>DefaultListSelectionModel</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="getMinSelectionIndex()"><!-- --></A><H3>getMinSelectionIndex</H3><PRE>public int <B>getMinSelectionIndex</B>()</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../javax/swing/ListSelectionModel.html">ListSelectionModel</A></CODE></B></DD><DD>Returns the first selected index or -1 if the selection is empty.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../javax/swing/ListSelectionModel.html#getMinSelectionIndex()">getMinSelectionIndex</A></CODE> in interface <CODE><A HREF="../../javax/swing/ListSelectionModel.html">ListSelectionModel</A></CODE></DL></DD></DL><HR><A NAME="getMaxSelectionIndex()"><!-- --></A><H3>getMaxSelectionIndex</H3><PRE>public int <B>getMaxSelectionIndex</B>()</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../javax/swing/ListSelectionModel.html">ListSelectionModel</A></CODE></B></DD><DD>Returns the last selected index or -1 if the selection is empty.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../javax/swing/ListSelectionModel.html#getMaxSelectionIndex()">getMaxSelectionIndex</A></CODE> in interface <CODE><A HREF="../../javax/swing/ListSelectionModel.html">ListSelectionModel</A></CODE></DL></DD></DL><HR><A NAME="getValueIsAdjusting()"><!-- --></A><H3>getValueIsAdjusting</H3><PRE>public boolean <B>getValueIsAdjusting</B>()</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../javax/swing/ListSelectionModel.html">ListSelectionModel</A></CODE></B></DD><DD>Returns true if the value is undergoing a series of changes.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../javax/swing/ListSelectionModel.html#getValueIsAdjusting()">getValueIsAdjusting</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>Returns:</B><DD>true if the value is currently adjusting<DT><B>See Also: </B><DD><A HREF="../../javax/swing/ListSelectionModel.html#setValueIsAdjusting(boolean)"><CODE>ListSelectionModel.setValueIsAdjusting(boolean)</CODE></A></DL></DD></DL><HR><A NAME="getSelectionMode()"><!-- --></A><H3>getSelectionMode</H3><PRE>public int <B>getSelectionMode</B>()</PRE>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -