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

📄 list.html

📁 J2ME MIDP2.0 final specification
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../javax/microedition/lcdui/List.html#List(java.lang.String, int, java.lang.String[], javax.microedition.lcdui.Image[])">List</A></B>(String&nbsp;title,     int&nbsp;listType,     String[]&nbsp;stringElements,     <A HREF="../../../javax/microedition/lcdui/Image.html">Image</A>[]&nbsp;imageElements)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new <code>List</code>, specifying its title, the type of the <code>List</code>, and an array of <code>Strings</code> and <code>Images</code> to be used as its initial contents.</TD></TR></TABLE>&nbsp;<!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/lcdui/List.html#append(java.lang.String, javax.microedition.lcdui.Image)">append</A></B>(String&nbsp;stringPart,       <A HREF="../../../javax/microedition/lcdui/Image.html">Image</A>&nbsp;imagePart)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Appends an element to the <code>List</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/lcdui/List.html#delete(int)">delete</A></B>(int&nbsp;elementNum)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Deletes the element referenced by <code>elementNum</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/lcdui/List.html#deleteAll()">deleteAll</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Deletes all elements from this List.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/lcdui/List.html#getFitPolicy()">getFitPolicy</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the application's preferred policy for fitting <code>Choice</code> element contents to the available screen space.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../javax/microedition/lcdui/Font.html">Font</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/lcdui/List.html#getFont(int)">getFont</A></B>(int&nbsp;elementNum)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the application's preferred font for rendering the specified element of this <code>Choice</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../javax/microedition/lcdui/Image.html">Image</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/lcdui/List.html#getImage(int)">getImage</A></B>(int&nbsp;elementNum)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the <code>Image</code> part of the element referenced by <code>elementNum</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/lcdui/List.html#getSelectedFlags(boolean[])">getSelectedFlags</A></B>(boolean[]&nbsp;selectedArray_return)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Queries the state of a <code>List</code> and returns the state of all elements in the boolean array <code>selectedArray_return</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/lcdui/List.html#getSelectedIndex()">getSelectedIndex</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the index number of an element in the <code>List</code> that is selected.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/lcdui/List.html#getString(int)">getString</A></B>(int&nbsp;elementNum)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the <code>String</code> part of the element referenced by <code>elementNum</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/lcdui/List.html#insert(int, java.lang.String, javax.microedition.lcdui.Image)">insert</A></B>(int&nbsp;elementNum,       String&nbsp;stringPart,       <A HREF="../../../javax/microedition/lcdui/Image.html">Image</A>&nbsp;imagePart)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Inserts an element into the <code>List</code> just prior to the element specified.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/lcdui/List.html#isSelected(int)">isSelected</A></B>(int&nbsp;elementNum)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets a boolean value indicating whether this element is selected.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/lcdui/List.html#removeCommand(javax.microedition.lcdui.Command)">removeCommand</A></B>(<A HREF="../../../javax/microedition/lcdui/Command.html">Command</A>&nbsp;cmd)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The same as <A HREF="../../../javax/microedition/lcdui/Displayable.html#removeCommand(javax.microedition.lcdui.Command)"><CODE>Displayable.removeCommand</CODE></A> but with the following additional semantics.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/lcdui/List.html#set(int, java.lang.String, javax.microedition.lcdui.Image)">set</A></B>(int&nbsp;elementNum,    String&nbsp;stringPart,    <A HREF="../../../javax/microedition/lcdui/Image.html">Image</A>&nbsp;imagePart)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the <code>String</code> and <code>Image</code> parts of the element referenced by <code>elementNum</code>, replacing the previous contents of the element.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/lcdui/List.html#setFitPolicy(int)">setFitPolicy</A></B>(int&nbsp;fitPolicy)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the application's preferred policy for fitting <code>Choice</code> element contents to the available screen space.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/lcdui/List.html#setFont(int, javax.microedition.lcdui.Font)">setFont</A></B>(int&nbsp;elementNum,        <A HREF="../../../javax/microedition/lcdui/Font.html">Font</A>&nbsp;font)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the application's preferred font for rendering the specified element of this <code>Choice</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/lcdui/List.html#setSelectCommand(javax.microedition.lcdui.Command)">setSelectCommand</A></B>(<A HREF="../../../javax/microedition/lcdui/Command.html">Command</A>&nbsp;command)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the <code>Command</code> to be used for an <code>IMPLICIT</code> <code>List</code> selection action.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/lcdui/List.html#setSelectedFlags(boolean[])">setSelectedFlags</A></B>(boolean[]&nbsp;selectedArray)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the selected state of all elements of the <code>List</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/lcdui/List.html#setSelectedIndex(int, boolean)">setSelectedIndex</A></B>(int&nbsp;elementNum,                 boolean&nbsp;selected)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the selected state of an element.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/lcdui/List.html#size()">size</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the number of elements in the <code>List</code>.</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_javax.microedition.lcdui.Displayable"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class javax.microedition.lcdui.<A HREF="../../../javax/microedition/lcdui/Displayable.html">Displayable</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../javax/microedition/lcdui/Displayable.html#addCommand(javax.microedition.lcdui.Command)">addCommand</A>, <A HREF="../../../javax/microedition/lcdui/Displayable.html#getHeight()">getHeight</A>, <A HREF="../../../javax/microedition/lcdui/Displayable.html#getTicker()">getTicker</A>, <A HREF="../../../javax/microedition/lcdui/Displayable.html#getTitle()">getTitle</A>, <A HREF="../../../javax/microedition/lcdui/Displayable.html#getWidth()">getWidth</A>, <A HREF="../../../javax/microedition/lcdui/Displayable.html#isShown()">isShown</A>, <A HREF="../../../javax/microedition/lcdui/Displayable.html#setCommandListener(javax.microedition.lcdui.CommandListener)">setCommandListener</A>, <A HREF="../../../javax/microedition/lcdui/Displayable.html#setTicker(javax.microedition.lcdui.Ticker)">setTicker</A>, <A HREF="../../../javax/microedition/lcdui/Displayable.html#setTitle(java.lang.String)">setTitle</A>, <A HREF="../../../javax/microedition/lcdui/Displayable.html#sizeChanged(int, int)">sizeChanged</A></CODE></TD></TR></TABLE>&nbsp;<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.Object</B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD></TR></TABLE>&nbsp;<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="SELECT_COMMAND"><!-- --></A><H3>SELECT_COMMAND</H3><PRE>public static final <A HREF="../../../javax/microedition/lcdui/Command.html">Command</A> <B>SELECT_COMMAND</B></PRE><DL><DD>The default select command for <code>IMPLICIT</code> <code>Lists</code>. Applications using an <code>IMPLICIT</code> <code>List</code> should set their own select command using <A HREF="../../../javax/microedition/lcdui/List.html#setSelectCommand(javax.microedition.lcdui.Command)"><CODE>setSelectCommand</CODE></A>. <p> The field values of <code>SELECT_COMMAND</code> are:<br> - <code>label = &quot;&quot;</code> (an empty string)<br> - <code>type = SCREEN</code><br> - <code>priority = 0</code><br> </p> <p>(It would be more appropriate if the type were <code>ITEM</code>, but the type of <code>SCREEN</code> is retained for historical purposes.)</p> <p> The application should not use these values for recognizing the <code>SELECT_COMMAND</code>. Instead, object identities of the <code>Command</code> and <code>Displayable</code> (<code>List</code>) should be used. </p> <p><code>SELECT_COMMAND</code> is treated as an ordinary <code>Command</code> if it is used with other <code>Displayable</code> types.</p></DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A>

⌨️ 快捷键说明

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