📄 jlist.html
字号:
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JList.html#getScrollableTracksViewportHeight()">getScrollableTracksViewportHeight</A></B>()</CODE><BR> Returns true if this <code>JList</code> is displayed in a <code>JViewport</code> and the viewport is taller than <code>JList</code>'s preferred height; otherwise returns false.</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/JList.html#getScrollableTracksViewportWidth()">getScrollableTracksViewportWidth</A></B>()</CODE><BR> Returns true if this <code>JList</code> is displayed in a <code>JViewport</code> and the viewport is wider than <code>JList</code>'s preferred width; otherwise returns false.</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/JList.html#getScrollableUnitIncrement(java.awt.Rectangle, int, int)">getScrollableUnitIncrement</A></B>(<A HREF="../../java/awt/Rectangle.html">Rectangle</A> visibleRect, int orientation, int direction)</CODE><BR> Returns the distance to scroll to expose the next or previous row (for vertical scrolling) or character (for horizontal scrolling).</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/JList.html#getSelectedIndex()">getSelectedIndex</A></B>()</CODE><BR> Returns the first selected index; returns -1 if there is no selected item.</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/JList.html#getSelectedIndices()">getSelectedIndices</A></B>()</CODE><BR> Returns an array of all of the selected indices in increasing order.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/lang/Object.html">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JList.html#getSelectedValue()">getSelectedValue</A></B>()</CODE><BR> Returns the first selected value, or <code>null</code> if the selection is empty.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/lang/Object.html">Object</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JList.html#getSelectedValues()">getSelectedValues</A></B>()</CODE><BR> Returns an array of the values for the selected cells.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/awt/Color.html">Color</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JList.html#getSelectionBackground()">getSelectionBackground</A></B>()</CODE><BR> Returns the background color for selected cells.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/awt/Color.html">Color</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JList.html#getSelectionForeground()">getSelectionForeground</A></B>()</CODE><BR> Returns the selection foreground color.</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/JList.html#getSelectionMode()">getSelectionMode</A></B>()</CODE><BR> Returns whether single-item or multiple-item selections are allowed.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../javax/swing/ListSelectionModel.html">ListSelectionModel</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JList.html#getSelectionModel()">getSelectionModel</A></B>()</CODE><BR> Returns the value of the current selection model.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../javax/swing/plaf/ListUI.html">ListUI</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JList.html#getUI()">getUI</A></B>()</CODE><BR> Returns the look and feel (L&F) object that renders this component.</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/JList.html#getUIClassID()">getUIClassID</A></B>()</CODE><BR> Returns the suffix used to construct the name of the look and feel (L&F) class used to render this component.</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/JList.html#getValueIsAdjusting()">getValueIsAdjusting</A></B>()</CODE><BR> Returns the value of the data model's <code>isAdjusting</code> property.</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/JList.html#getVisibleRowCount()">getVisibleRowCount</A></B>()</CODE><BR> Returns the preferred number of visible rows.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/awt/Point.html">Point</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JList.html#indexToLocation(int)">indexToLocation</A></B>(int index)</CODE><BR> Returns the origin of the specified item in <code>JList</code> coordinates.</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/JList.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/JList.html#isSelectionEmpty()">isSelectionEmpty</A></B>()</CODE><BR> Returns true if nothing is selected.</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/JList.html#locationToIndex(java.awt.Point)">locationToIndex</A></B>(<A HREF="../../java/awt/Point.html">Point</A> location)</CODE><BR> Converts a point in <code>JList</code> coordinates to the index of the cell at that location.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected <A HREF="../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JList.html#paramString()">paramString</A></B>()</CODE><BR> Returns a string representation of this <code>JList</code>.</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/JList.html#removeListSelectionListener(javax.swing.event.ListSelectionListener)">removeListSelectionListener</A></B>(<A HREF="../../javax/swing/event/ListSelectionListener.html">ListSelectionListener</A> listener)</CODE><BR> Removes 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/JList.html#removeSelectionInterval(int, int)">removeSelectionInterval</A></B>(int index0, int index1)</CODE><BR> Sets the selection to be the set difference of the specified interval and the current selection.</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/JList.html#setCellRenderer(javax.swing.ListCellRenderer)">setCellRenderer</A></B>(<A HREF="../../javax/swing/ListCellRenderer.html">ListCellRenderer</A> cellRenderer)</CODE>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -