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

📄 defaultlistselectionmodel.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<DL><DD>Returns the selection mode.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../javax/swing/ListSelectionModel.html#getSelectionMode()">getSelectionMode</A></CODE> in interface <CODE><A HREF="../../javax/swing/ListSelectionModel.html">ListSelectionModel</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>one of the these values: <ul> <li>SINGLE_SELECTION <li>SINGLE_INTERVAL_SELECTION <li>MULTIPLE_INTERVAL_SELECTION </ul><DT><B>See Also: </B><DD><A HREF="../../javax/swing/DefaultListSelectionModel.html#getSelectionMode()"><CODE>getSelectionMode()</CODE></A></DL></DD></DL><HR><A NAME="setSelectionMode(int)"><!-- --></A><H3>setSelectionMode</H3><PRE>public void <B>setSelectionMode</B>(int&nbsp;selectionMode)</PRE><DL><DD>Sets the selection mode.  The default is MULTIPLE_INTERVAL_SELECTION.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../javax/swing/ListSelectionModel.html#setSelectionMode(int)">setSelectionMode</A></CODE> in interface <CODE><A HREF="../../javax/swing/ListSelectionModel.html">ListSelectionModel</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>selectionMode</CODE> - one of three values: <ul> <li>SINGLE_SELECTION <li>SINGLE_INTERVAL_SELECTION <li>MULTIPLE_INTERVAL_SELECTION </ul><DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if <code>selectionMode</code>		is not one of the legal values shown above<DT><B>See Also: </B><DD><A HREF="../../javax/swing/DefaultListSelectionModel.html#setSelectionMode(int)"><CODE>setSelectionMode(int)</CODE></A></DL></DD></DL><HR><A NAME="isSelectedIndex(int)"><!-- --></A><H3>isSelectedIndex</H3><PRE>public boolean <B>isSelectedIndex</B>(int&nbsp;index)</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 specified index is selected.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../javax/swing/ListSelectionModel.html#isSelectedIndex(int)">isSelectedIndex</A></CODE> in interface <CODE><A HREF="../../javax/swing/ListSelectionModel.html">ListSelectionModel</A></CODE></DL></DD></DL><HR><A NAME="isSelectionEmpty()"><!-- --></A><H3>isSelectionEmpty</H3><PRE>public boolean <B>isSelectionEmpty</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 no indices are selected.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../javax/swing/ListSelectionModel.html#isSelectionEmpty()">isSelectionEmpty</A></CODE> in interface <CODE><A HREF="../../javax/swing/ListSelectionModel.html">ListSelectionModel</A></CODE></DL></DD></DL><HR><A NAME="addListSelectionListener(javax.swing.event.ListSelectionListener)"><!-- --></A><H3>addListSelectionListener</H3><PRE>public void <B>addListSelectionListener</B>(<A HREF="../../javax/swing/event/ListSelectionListener.html">ListSelectionListener</A>&nbsp;l)</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../javax/swing/ListSelectionModel.html">ListSelectionModel</A></CODE></B></DD><DD>Add a listener to the list that's notified each time a change to the selection occurs.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../javax/swing/ListSelectionModel.html#addListSelectionListener(javax.swing.event.ListSelectionListener)">addListSelectionListener</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>l</CODE> - the ListSelectionListener<DT><B>See Also: </B><DD><A HREF="../../javax/swing/ListSelectionModel.html#removeListSelectionListener(javax.swing.event.ListSelectionListener)"><CODE>ListSelectionModel.removeListSelectionListener(javax.swing.event.ListSelectionListener)</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>, <A HREF="../../javax/swing/ListSelectionModel.html#removeSelectionInterval(int, int)"><CODE>ListSelectionModel.removeSelectionInterval(int, int)</CODE></A>, <A HREF="../../javax/swing/ListSelectionModel.html#clearSelection()"><CODE>ListSelectionModel.clearSelection()</CODE></A>, <A HREF="../../javax/swing/ListSelectionModel.html#insertIndexInterval(int, int, boolean)"><CODE>ListSelectionModel.insertIndexInterval(int, int, boolean)</CODE></A>, <A HREF="../../javax/swing/ListSelectionModel.html#removeIndexInterval(int, int)"><CODE>ListSelectionModel.removeIndexInterval(int, int)</CODE></A></DL></DD></DL><HR><A NAME="removeListSelectionListener(javax.swing.event.ListSelectionListener)"><!-- --></A><H3>removeListSelectionListener</H3><PRE>public void <B>removeListSelectionListener</B>(<A HREF="../../javax/swing/event/ListSelectionListener.html">ListSelectionListener</A>&nbsp;l)</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../javax/swing/ListSelectionModel.html">ListSelectionModel</A></CODE></B></DD><DD>Remove a listener from the list that's notified each time a  change to the selection occurs.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../javax/swing/ListSelectionModel.html#removeListSelectionListener(javax.swing.event.ListSelectionListener)">removeListSelectionListener</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>l</CODE> - the ListSelectionListener<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="fireValueChanged(boolean)"><!-- --></A><H3>fireValueChanged</H3><PRE>protected void <B>fireValueChanged</B>(boolean&nbsp;isAdjusting)</PRE><DL><DD>Notifies listeners that we have ended a series of adjustments.<DD><DL></DL></DD></DL><HR><A NAME="fireValueChanged(int, int)"><!-- --></A><H3>fireValueChanged</H3><PRE>protected void <B>fireValueChanged</B>(int&nbsp;firstIndex,                                int&nbsp;lastIndex)</PRE><DL><DD>Notifies <code>ListSelectionListeners</code> that the value of the selection, in the closed interval <code>firstIndex</code>, <code>lastIndex</code>, has changed.<DD><DL></DL></DD></DL><HR><A NAME="fireValueChanged(int, int, boolean)"><!-- --></A><H3>fireValueChanged</H3><PRE>protected void <B>fireValueChanged</B>(int&nbsp;firstIndex,                                int&nbsp;lastIndex,                                boolean&nbsp;isAdjusting)</PRE><DL><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>firstIndex</CODE> - the first index in the interval<DD><CODE>lastIndex</CODE> - the last index in the interval<DD><CODE>isAdjusting</CODE> - true if this is the final change in a series of		adjustments<DT><B>See Also: </B><DD><A HREF="../../javax/swing/event/EventListenerList.html"><CODE>EventListenerList</CODE></A></DL></DD></DL><HR><A NAME="getListeners(java.lang.Class)"><!-- --></A><H3>getListeners</H3><PRE>public <A HREF="../../java/util/EventListener.html">EventListener</A>[] <B>getListeners</B>(<A HREF="../../java/lang/Class.html">Class</A>&nbsp;listenerType)</PRE><DL><DD>Returns an array of all the listeners of the given type that  were added to this model.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>all of the objects receiving <em>listenerType</em>		notifications from this model<DT><B>Since: </B><DD>1.3</DD></DL></DD></DL><HR><A NAME="setLeadAnchorNotificationEnabled(boolean)"><!-- --></A><H3>setLeadAnchorNotificationEnabled</H3><PRE>public void <B>setLeadAnchorNotificationEnabled</B>(boolean&nbsp;flag)</PRE><DL><DD>Sets the value of the leadAnchorNotificationEnabled flag.<DD><DL></DL></DD><DD><DL><DT><B>See Also: </B><DD><A HREF="../../javax/swing/DefaultListSelectionModel.html#isLeadAnchorNotificationEnabled()"><CODE>isLeadAnchorNotificationEnabled()</CODE></A></DL></DD></DL><HR><A NAME="isLeadAnchorNotificationEnabled()"><!-- --></A><H3>isLeadAnchorNotificationEnabled</H3><PRE>public boolean <B>isLeadAnchorNotificationEnabled</B>()</PRE><DL><DD>Returns the value of the <code>leadAnchorNotificationEnabled</code> flag. When <code>leadAnchorNotificationEnabled</code> is true the model generates notification events with bounds that cover all the changes to the selection plus the changes to the lead and anchor indices. Setting the flag to false causes a narrowing of the event's bounds to include only the elements that have been selected or deselected since the last change. Either way, the model continues to maintain the lead and anchor variables internally. The default is true.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the value of the <code>leadAnchorNotificationEnabled</code> flag<DT><B>See Also: </B><DD><A HREF="../../javax/swing/DefaultListSelectionModel.html#setLeadAnchorNotificationEnabled(boolean)"><CODE>setLeadAnchorNotificationEnabled(boolean)</CODE></A></DL></DD></DL><HR><A NAME="clearSelection()"><!-- --></A><H3>clearSelection</H3><PRE>public void <B>clearSelection</B>()</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 the empty set.  If this represents a change to the current selection then notify each ListSelectionListener.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../javax/swing/ListSelectionModel.html#clearSelection()">clearSelection</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#addListSelectionListener(javax.swing.event.ListSelectionListener)"><CODE>ListSelectionModel.addListSelectionListener(javax.swing.event.ListSelectionListener)</CODE></A></DL></DD></DL><HR><A NAME="setSelectionInterval(int, int)"><!-- --></A><H3>setSelectionInterval</H3><PRE>public void <B>setSelectionInterval</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 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#setSelectionInterval(int, int)">setSelectionInterval</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="addSelectionInterval(int, int)"><!-- --></A><H3>addSelectionInterval</H3><PRE>public void <B>addSelectionInterval</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 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>Specified by: </B><DD><CODE><A HREF="../../javax/swing/ListSelectionModel.html#addSelectionInterval(int, int)">addSelectionInterval</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>

⌨️ 快捷键说明

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