list.html

来自「API資料大全」· HTML 代码 · 共 1,249 行 · 第 1/5 页

HTML
1,249
字号
public void <B>delItem</B>(int&nbsp;position)</PRE><DL><DD><B>Deprecated.</B>&nbsp;<I>replaced by <code>remove(String)</code>                         and <code>remove(int)</code>.</I><P><DD><DL></DL></DD></DL><HR><A NAME="getSelectedIndex()"><!-- --></A><H3>getSelectedIndex</H3><PRE>public int <B>getSelectedIndex</B>()</PRE><DL><DD>Gets the index of the selected item on the list,<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the index of the selected item, or                     <code>-1</code> if no item is selected,                     or if more that one item is selected.<DT><B>See Also: </B><DD><A HREF="../../java/awt/List.html#select(int)"><CODE>select(int)</CODE></A>, <A HREF="../../java/awt/List.html#deselect(int)"><CODE>deselect(int)</CODE></A>, <A HREF="../../java/awt/List.html#isIndexSelected(int)"><CODE>isIndexSelected(int)</CODE></A></DL></DD></DL><HR><A NAME="getSelectedIndexes()"><!-- --></A><H3>getSelectedIndexes</H3><PRE>public int[] <B>getSelectedIndexes</B>()</PRE><DL><DD>Gets the selected indexes on the list.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>an array of the selected indexes                of this scrolling list. If no items are                 selected, a zero-length array is returned.<DT><B>See Also: </B><DD><A HREF="../../java/awt/List.html#select(int)"><CODE>select(int)</CODE></A>, <A HREF="../../java/awt/List.html#deselect(int)"><CODE>deselect(int)</CODE></A>, <A HREF="../../java/awt/List.html#isIndexSelected(int)"><CODE>isIndexSelected(int)</CODE></A></DL></DD></DL><HR><A NAME="getSelectedItem()"><!-- --></A><H3>getSelectedItem</H3><PRE>public <A HREF="../../java/lang/String.html">String</A> <B>getSelectedItem</B>()</PRE><DL><DD>Get the selected item on this scrolling list.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the selected item on the list,                     or null if no item is selected.<DT><B>See Also: </B><DD><A HREF="../../java/awt/List.html#select(int)"><CODE>select(int)</CODE></A>, <A HREF="../../java/awt/List.html#deselect(int)"><CODE>deselect(int)</CODE></A>, <A HREF="../../java/awt/List.html#isIndexSelected(int)"><CODE>isIndexSelected(int)</CODE></A></DL></DD></DL><HR><A NAME="getSelectedItems()"><!-- --></A><H3>getSelectedItems</H3><PRE>public <A HREF="../../java/lang/String.html">String</A>[] <B>getSelectedItems</B>()</PRE><DL><DD>Get the selected items on this scrolling list.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>an array of the selected items                            on this scrolling list.<DT><B>See Also: </B><DD><A HREF="../../java/awt/List.html#select(int)"><CODE>select(int)</CODE></A>, <A HREF="../../java/awt/List.html#deselect(int)"><CODE>deselect(int)</CODE></A>, <A HREF="../../java/awt/List.html#isIndexSelected(int)"><CODE>isIndexSelected(int)</CODE></A></DL></DD></DL><HR><A NAME="getSelectedObjects()"><!-- --></A><H3>getSelectedObjects</H3><PRE>public <A HREF="../../java/lang/Object.html">Object</A>[] <B>getSelectedObjects</B>()</PRE><DL><DD>Returns the selected items on the list in an array of Objects.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../java/awt/ItemSelectable.html#getSelectedObjects()">getSelectedObjects</A></CODE> in interface <CODE><A HREF="../../java/awt/ItemSelectable.html">ItemSelectable</A></CODE></DL></DD><DD><DL><DT><B>See Also: </B><DD><A HREF="../../java/awt/ItemSelectable.html"><CODE>ItemSelectable</CODE></A></DL></DD></DL><HR><A NAME="select(int)"><!-- --></A><H3>select</H3><PRE>public void <B>select</B>(int&nbsp;index)</PRE><DL><DD>Selects the item at the specified index in the scrolling list.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - the position of the item to select.<DT><B>See Also: </B><DD><A HREF="../../java/awt/List.html#getSelectedItem()"><CODE>getSelectedItem()</CODE></A>, <A HREF="../../java/awt/List.html#deselect(int)"><CODE>deselect(int)</CODE></A>, <A HREF="../../java/awt/List.html#isIndexSelected(int)"><CODE>isIndexSelected(int)</CODE></A></DL></DD></DL><HR><A NAME="deselect(int)"><!-- --></A><H3>deselect</H3><PRE>public void <B>deselect</B>(int&nbsp;index)</PRE><DL><DD>Deselects the item at the specified index. <p> If the item at the specified index is not selected, or if the index is out of range, then the operation is ignored.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - the position of the item to deselect.<DT><B>See Also: </B><DD><A HREF="../../java/awt/List.html#select(int)"><CODE>select(int)</CODE></A>, <A HREF="../../java/awt/List.html#getSelectedItem()"><CODE>getSelectedItem()</CODE></A>, <A HREF="../../java/awt/List.html#isIndexSelected(int)"><CODE>isIndexSelected(int)</CODE></A></DL></DD></DL><HR><A NAME="isIndexSelected(int)"><!-- --></A><H3>isIndexSelected</H3><PRE>public boolean <B>isIndexSelected</B>(int&nbsp;index)</PRE><DL><DD>Determines if the specified item in this scrolling list is selected.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - the item to be checked.<DT><B>Returns:</B><DD><code>true</code> if the specified item has been                       selected; <code>false</code> otherwise.<DT><B>Since: </B><DD>JDK1.1</DD><DT><B>See Also: </B><DD><A HREF="../../java/awt/List.html#select(int)"><CODE>select(int)</CODE></A>, <A HREF="../../java/awt/List.html#deselect(int)"><CODE>deselect(int)</CODE></A></DL></DD></DL><HR><A NAME="isSelected(int)"><!-- --></A><H3>isSelected</H3><PRE>public boolean <B>isSelected</B>(int&nbsp;index)</PRE><DL><DD><B>Deprecated.</B>&nbsp;<I>As of JDK version 1.1, replaced by <code>isIndexSelected(int)</code>.</I><P><DD><DL></DL></DD></DL><HR><A NAME="getRows()"><!-- --></A><H3>getRows</H3><PRE>public int <B>getRows</B>()</PRE><DL><DD>Get the number of visible lines in this list.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the number of visible lines in this scrolling list.</DL></DD></DL><HR><A NAME="isMultipleMode()"><!-- --></A><H3>isMultipleMode</H3><PRE>public boolean <B>isMultipleMode</B>()</PRE><DL><DD>Determines whether this list allows multiple selections.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD><code>true</code> if this list allows multiple                 selections; otherwise, <code>false</code>.<DT><B>Since: </B><DD>JDK1.1</DD><DT><B>See Also: </B><DD><A HREF="../../java/awt/List.html#setMultipleMode(boolean)"><CODE>setMultipleMode(boolean)</CODE></A></DL></DD></DL><HR><A NAME="allowsMultipleSelections()"><!-- --></A><H3>allowsMultipleSelections</H3><PRE>public boolean <B>allowsMultipleSelections</B>()</PRE><DL><DD><B>Deprecated.</B>&nbsp;<I>As of JDK version 1.1, replaced by <code>isMultipleMode()</code>.</I><P><DD><DL></DL></DD></DL><HR><A NAME="setMultipleMode(boolean)"><!-- --></A><H3>setMultipleMode</H3><PRE>public void <B>setMultipleMode</B>(boolean&nbsp;b)</PRE><DL><DD>Sets the flag that determines whether this list allows multiple selections.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>b</CODE> - if <code>true</code> then multiple selections                      are allowed; otherwise, only one item from                      the list can be selected at once.<DT><B>Since: </B><DD>JDK1.1</DD><DT><B>See Also: </B><DD><A HREF="../../java/awt/List.html#isMultipleMode()"><CODE>isMultipleMode()</CODE></A></DL></DD></DL><HR><A NAME="setMultipleSelections(boolean)"><!-- --></A><H3>setMultipleSelections</H3><PRE>public void <B>setMultipleSelections</B>(boolean&nbsp;b)</PRE><DL><DD><B>Deprecated.</B>&nbsp;<I>As of JDK version 1.1, replaced by <code>setMultipleMode(boolean)</code>.</I><P><DD><DL></DL></DD></DL><HR><A NAME="getVisibleIndex()"><!-- --></A><H3>getVisibleIndex</H3><PRE>public int <B>getVisibleIndex</B>()</PRE><DL><DD>Gets the index of the item that was last made visible by the method <code>makeVisible</code>.<DD><DL></DL></DD><DD><DL><

⌨️ 快捷键说明

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