list.html
来自「API資料大全」· HTML 代码 · 共 1,249 行 · 第 1/5 页
HTML
1,249 行
<TD><CODE><B><A HREF="../../java/awt/List.html#addActionListener(java.awt.event.ActionListener)">addActionListener</A></B>(<A HREF="../../java/awt/event/ActionListener.html">ActionListener</A> l)</CODE><BR> Adds the specified action listener to receive action events from this list.</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="../../java/awt/List.html#addItem(java.lang.String)">addItem</A></B>(<A HREF="../../java/lang/String.html">String</A> item)</CODE><BR> <B>Deprecated.</B> <I>replaced by <code>add(String)</code>.</I></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="../../java/awt/List.html#addItem(java.lang.String, int)">addItem</A></B>(<A HREF="../../java/lang/String.html">String</A> item, int index)</CODE><BR> <B>Deprecated.</B> <I>replaced by <code>add(String, int)</code>.</I></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="../../java/awt/List.html#addItemListener(java.awt.event.ItemListener)">addItemListener</A></B>(<A HREF="../../java/awt/event/ItemListener.html">ItemListener</A> l)</CODE><BR> Adds the specified item listener to receive item events from this list.</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="../../java/awt/List.html#addNotify()">addNotify</A></B>()</CODE><BR> Creates the peer for the list.</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="../../java/awt/List.html#allowsMultipleSelections()">allowsMultipleSelections</A></B>()</CODE><BR> <B>Deprecated.</B> <I>As of JDK version 1.1, replaced by <code>isMultipleMode()</code>.</I></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="../../java/awt/List.html#clear()">clear</A></B>()</CODE><BR> <B>Deprecated.</B> <I>As of JDK version 1.1, replaced by <code>removeAll()</code>.</I></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="../../java/awt/List.html#countItems()">countItems</A></B>()</CODE><BR> <B>Deprecated.</B> <I>As of JDK version 1.1, replaced by <code>getItemCount()</code>.</I></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="../../java/awt/List.html#delItem(int)">delItem</A></B>(int position)</CODE><BR> <B>Deprecated.</B> <I>replaced by <code>remove(String)</code> and <code>remove(int)</code>.</I></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="../../java/awt/List.html#delItems(int, int)">delItems</A></B>(int start, int end)</CODE><BR> <B>Deprecated.</B> <I>As of JDK version 1.1, Not for public use in the future. This method is expected to be retained only as a package private method.</I></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="../../java/awt/List.html#deselect(int)">deselect</A></B>(int index)</CODE><BR> Deselects the item at the specified index.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../javax/accessibility/AccessibleContext.html">AccessibleContext</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/List.html#getAccessibleContext()">getAccessibleContext</A></B>()</CODE><BR> Gets the AccessibleContext associated with this List.</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="../../java/awt/List.html#getItem(int)">getItem</A></B>(int index)</CODE><BR> Gets the item associated with the specified index.</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="../../java/awt/List.html#getItemCount()">getItemCount</A></B>()</CODE><BR> Gets the number of items in the list.</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="../../java/awt/List.html#getItems()">getItems</A></B>()</CODE><BR> Gets the items in the list.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/util/EventListener.html">EventListener</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/List.html#getListeners(java.lang.Class)">getListeners</A></B>(<A HREF="../../java/lang/Class.html">Class</A> listenerType)</CODE><BR> Return an array of all the listeners that were added to the List with addXXXListener(), where XXX is the name of the <code>listenerType</code> argument.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/awt/Dimension.html">Dimension</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/List.html#getMinimumSize()">getMinimumSize</A></B>()</CODE><BR> Determines the minimum size of this scrolling list.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/awt/Dimension.html">Dimension</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/List.html#getMinimumSize(int)">getMinimumSize</A></B>(int rows)</CODE><BR> Gets the minumum dimensions for a list with the specified number of rows.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/awt/Dimension.html">Dimension</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/List.html#getPreferredSize()">getPreferredSize</A></B>()</CODE><BR> Gets the preferred size of this scrolling list.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/awt/Dimension.html">Dimension</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/List.html#getPreferredSize(int)">getPreferredSize</A></B>(int rows)</CODE><BR> Gets the preferred dimensions for a list with the specified number of rows.</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="../../java/awt/List.html#getRows()">getRows</A></B>()</CODE><BR> Get the number of visible lines in this list.</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="../../java/awt/List.html#getSelectedIndex()">getSelectedIndex</A></B>()</CODE><BR> Gets the index of the selected item on the list,</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="../../java/awt/List.html#getSelectedIndexes()">getSelectedIndexes</A></B>()</CODE><BR> Gets the selected indexes on the list.</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="../../java/awt/List.html#getSelectedItem()">getSelectedItem</A></B>()</CODE><BR> Get the selected item on this scrolling list.</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="../../java/awt/List.html#getSelectedItems()">getSelectedItems</A></B>()</CODE><BR> Get the selected items on this scrolling list.</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="../../java/awt/List.html#getSelectedObjects()">getSelectedObjects</A></B>()</CODE><BR> Returns the selected items on the list in an array of Objects.</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="../../java/awt/List.html#getVisibleIndex()">getVisibleIndex</A></B>()</CODE><BR> Gets the index of the item that was last made visible by the method <code>makeVisible</code>.</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="../../java/awt/List.html#isIndexSelected(int)">isIndexSelected</A></B>(int index)</CODE><BR> Determines if the specified item in this scrolling list 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="../../java/awt/List.html#isMultipleMode()">isMultipleMode</A></B>()</CODE><BR> Determines whether this list allows multiple selections.</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="../../java/awt/List.html#isSelected(int)">isSelected</A></B>(int index)</CODE>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?