📄 list.html
字号:
<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/microedition/lcdui/List.html#setTicker(javax.microedition.lcdui.Ticker)">setTicker</A></B>(<A HREF="../../../javax/microedition/lcdui/Ticker.html">Ticker</A> ticker)</CODE>
<BR>
Sets a ticker for use with this <code>Displayable</code>, replacing any previous ticker.</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/microedition/lcdui/List.html#setTitle(java.lang.String)">setTitle</A></B>(<A HREF="../../../java/lang/String.html">String</A> s)</CODE>
<BR>
Sets the title of the <code>Displayable</code>.</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/microedition/lcdui/List.html#size()">size</A></B>()</CODE>
<BR>
Gets the number of elements in the <code>List</code>.</TD>
</TR>
</TABLE>
<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#sizeChanged(int, int)">sizeChanged</A></CODE></TD>
</TR>
</TABLE>
<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.<A HREF="../../../java/lang/Object.html">Object</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../java/lang/Object.html#equals(java.lang.Object)">equals</A>, <A HREF="../../../java/lang/Object.html#getClass()">getClass</A>, <A HREF="../../../java/lang/Object.html#hashCode()">hashCode</A>, <A HREF="../../../java/lang/Object.html#notify()">notify</A>, <A HREF="../../../java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="../../../java/lang/Object.html#toString()">toString</A>, <A HREF="../../../java/lang/Object.html#wait()">wait</A>, <A HREF="../../../java/lang/Object.html#wait(long)">wait</A>, <A HREF="../../../java/lang/Object.html#wait(long, int)">wait</A></CODE></TD>
</TR>
</TABLE>
<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 = ""</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><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="List(java.lang.String, int)"><!-- --></A><H3>
List</H3>
<PRE>
public <B>List</B>(<A HREF="../../../java/lang/String.html">String</A> title, int listType)</PRE>
<DL>
<DD>Creates a new, empty <code>List</code>, specifying its title and the type of the list.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>title</CODE> - the screen's title (see <A HREF="../../../javax/microedition/lcdui/Displayable.html"><CODE>Displayable</CODE></A>)<DD><CODE>listType</CODE> - one of <code>IMPLICIT</code>, <code>EXCLUSIVE</code>, or <code>MULTIPLE</code><DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if <code>listType</code> is not one of <code>IMPLICIT</code>, <code>EXCLUSIVE</code>, or <code>MULTIPLE</code><DT><B>See Also: </B><DD><A HREF="../../../javax/microedition/lcdui/Choice.html"><CODE>Choice</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="List(java.lang.String, int, java.lang.String[], javax.microedition.lcdui.Image[])"><!-- --></A><H3>
List</H3>
<PRE>
public <B>List</B>(<A HREF="../../../java/lang/String.html">String</A> title, int listType, <A HREF="../../../java/lang/String.html">String</A>[] stringElements, <A HREF="../../../javax/microedition/lcdui/Image.html">Image</A>[] imageElements)</PRE>
<DL>
<DD>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. <p>The <code>stringElements</code> array must be non-null and every array element must also be non-null. The length of the <code>stringElements</code> array determines the number of elements in the <code>List</code>. The <code>imageElements</code> array may be <code>null</code> to indicate that the <code>List</code> elements have no images. If the <code>imageElements</code> array is non-null, it must be the same length as the <code>stringElements</code> array. Individual elements of the <code>imageElements</code> array may be <code>null</code> in order to indicate the absence of an image for the corresponding <code>List</code> element. Non-null elements of the <code>imageElements</code> array may refer to mutable or immutable images.</p><DD><DL>
<DT><B>Parameters:</B><DD><CODE>title</CODE> - the screen's title (see <A HREF="../../../javax/microedition/lcdui/Displayable.html"><CODE>Displayable</CODE></A>)<DD><CODE>listType</CODE> - one of <code>IMPLICIT</code>, <code>EXCLUSIVE</code>, or <code>MULTIPLE</code><DD><CODE>stringElements</CODE> - set of strings specifying the string parts of the <code>List</code> elements<DD><CODE>imageElements</CODE> - set of images specifying the image parts of the <code>List</code> elements<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/NullPointerException.html">NullPointerException</A></CODE> - if <code>stringElements</code> is <code>null</code><DD><CODE><A HREF="../../../java/lang/NullPointerException.html">NullPointerException</A></CODE> - if the <code>stringElements</code> array contains any null elements<DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if the <code>imageElements</code> array is non-null and has a different length from the <code>stringElements</code> array<DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if <code>listType</code> is not one of <code>IMPLICIT</code>, <code>EXCLUSIVE</code>, or <code>MULTIPLE</code><DT><B>See Also: </B><DD><A HREF="../../../javax/microedition/lcdui/Choice.html#EXCLUSIVE"><CODE>Choice.EXCLUSIVE</CODE></A>,
<A HREF="../../../javax/microedition/lcdui/Choice.html#MULTIPLE"><CODE>Choice.MULTIPLE</CODE></A>,
<A HREF="../../../javax/microedition/lcdui/Choice.html#IMPLICIT"><CODE>Choice.IMPLICIT</CODE></A></DL>
</DD>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="setTicker(javax.microedition.lcdui.Ticker)"><!-- --></A><H3>
setTicker</H3>
<PRE>
public void <B>setTicker</B>(<A HREF="../../../javax/microedition/lcdui/Ticker.html">Ticker</A> ticker)</PRE>
<DL>
<DD>Sets a ticker for use with this <code>Displayable</code>, replacing any previous ticker. If <code>null</code>, removes the ticker object from this <code>Displayable</code>. The same ticker may be shared by several <code>Displayable</code> objects within an application. This is done by calling <code>setTicker()</code> with the same <code>Ticker</code> object on several different <code>Displayable</code> objects. If the <code>Displayable</code> is actually visible on the display, the implementation should update the display as soon as it is feasible to do so. <p>The existence of a ticker may affect the size of the area available for <code>Displayable's</code> contents. If the application adds, removes, or sets the ticker text at runtime, this can dynamically change the size of the content area. This is most important to be aware of when using the <code>Canvas</code> class.<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/microedition/lcdui/Displayable.html#setTicker(javax.microedition.lcdui.Ticker)">setTicker</A></CODE> in class <CODE><A HREF="../../../javax/microedition/lcdui/Displayable.html">Displayable</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>ticker</CODE> - the ticker object used on this screen<DT><B>Since: </B><DD>MIDP 2.0</DD>
<DT><B>See Also: </B><DD><A HREF="../../../javax/microedition/lcdui/Displayable.html#getTicker()"><CODE>Displayable.getTicker()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="setTitle(java.lang.String)"><!-- --></A><H3>
setTitle</H3>
<PRE>
public void <B>setTitle</B>(<A HREF="../../../java/lang/String.html">String</A> s)</PRE>
<DL>
<DD>Sets the title of the <code>Displayable</code>. If <code>null</code> is given, removes the title. <P>If the <code>Displayable</code> is actually visible on the display, the implementation should update the display as soon as it is feasible to do so.</P> <P>The existence of a title may affect the size of the area available for <code>Displayable</code> content. If the application adds, removes, or sets the title text at runtime, this can dynamically change the size of the content area. This is most important to be aware of when using the <code>Canvas</code> class.</p><DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/microedition/lcdui/Displayable.html#setTitle(java.lang.String)">setTitle</A></CODE> in class <CODE><A HREF="../../../javax/microedition/lcdui/Displayable.html">Displayable</A></CODE></DL>
</DD>
<DD><DL>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -