📄 form.html
字号:
<A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../javax/microedition/lcdui/Form.html#Form(java.lang.String)">Form</A></B>(<A HREF="../../../java/lang/String.html">String</A> title)</CODE>
<BR>
Creates a new, empty <code>Form</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../javax/microedition/lcdui/Form.html#Form(java.lang.String, javax.microedition.lcdui.Item[])">Form</A></B>(<A HREF="../../../java/lang/String.html">String</A> title, <A HREF="../../../javax/microedition/lcdui/Item.html">Item</A>[] items)</CODE>
<BR>
Creates a new <code>Form</code> with the specified contents.</TD>
</TR>
</TABLE>
<!-- ========== 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> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/lcdui/Form.html#append(javax.microedition.lcdui.Image)">append</A></B>(<A HREF="../../../javax/microedition/lcdui/Image.html">Image</A> img)</CODE>
<BR>
Adds an item consisting of one <code>Image</code> to the <code>Form</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/Form.html#append(javax.microedition.lcdui.Item)">append</A></B>(<A HREF="../../../javax/microedition/lcdui/Item.html">Item</A> item)</CODE>
<BR>
Adds an <code>Item</code> into the <code>Form</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/Form.html#append(java.lang.String)">append</A></B>(<A HREF="../../../java/lang/String.html">String</A> str)</CODE>
<BR>
Adds an item consisting of one <code>String</code> to the <code>Form</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/microedition/lcdui/Form.html#delete(int)">delete</A></B>(int itemNum)</CODE>
<BR>
Deletes the <code>Item</code> referenced by <code>itemNum</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/microedition/lcdui/Form.html#deleteAll()">deleteAll</A></B>()</CODE>
<BR>
Deletes all the items from this <code>Form</code>, leaving it with zero items.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../javax/microedition/lcdui/Item.html">Item</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/lcdui/Form.html#get(int)">get</A></B>(int itemNum)</CODE>
<BR>
Gets the item at given position.</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/Form.html#getHeight()">getHeight</A></B>()</CODE>
<BR>
Returns the height in pixels of the displayable area available for items.</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/Form.html#getWidth()">getWidth</A></B>()</CODE>
<BR>
Returns the width in pixels of the displayable area available for items.</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/Form.html#insert(int, javax.microedition.lcdui.Item)">insert</A></B>(int itemNum, <A HREF="../../../javax/microedition/lcdui/Item.html">Item</A> item)</CODE>
<BR>
Inserts an item into the <code>Form</code> just prior to the item specified.</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/Form.html#set(int, javax.microedition.lcdui.Item)">set</A></B>(int itemNum, <A HREF="../../../javax/microedition/lcdui/Item.html">Item</A> item)</CODE>
<BR>
Sets the item referenced by <code>itemNum</code> to the specified item, replacing the previous item.</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/Form.html#setItemStateListener(javax.microedition.lcdui.ItemStateListener)">setItemStateListener</A></B>(<A HREF="../../../javax/microedition/lcdui/ItemStateListener.html">ItemStateListener</A> iListener)</CODE>
<BR>
Sets the <code>ItemStateListener</code> for the <code>Form</code>, replacing any previous <code>ItemStateListener</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/Form.html#size()">size</A></B>()</CODE>
<BR>
Gets the number of items in the <code>Form</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#getTicker()">getTicker</A>, <A HREF="../../../javax/microedition/lcdui/Displayable.html#getTitle()">getTitle</A>, <A HREF="../../../javax/microedition/lcdui/Displayable.html#isShown()">isShown</A>, <A HREF="../../../javax/microedition/lcdui/Displayable.html#removeCommand(javax.microedition.lcdui.Command)">removeCommand</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>
<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 =========== -->
<!-- ========= 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="Form(java.lang.String)"><!-- --></A><H3>
Form</H3>
<PRE>
public <B>Form</B>(<A HREF="../../../java/lang/String.html">String</A> title)</PRE>
<DL>
<DD>Creates a new, empty <code>Form</code>.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>title</CODE> - the <code>Form's</code> title, or <code>null</code> for no title</DL>
</DD>
</DL>
<HR>
<A NAME="Form(java.lang.String, javax.microedition.lcdui.Item[])"><!-- --></A><H3>
Form</H3>
<PRE>
public <B>Form</B>(<A HREF="../../../java/lang/String.html">String</A> title, <A HREF="../../../javax/microedition/lcdui/Item.html">Item</A>[] items)</PRE>
<DL>
<DD>Creates a new <code>Form</code> with the specified contents. This is identical to creating an empty <code>Form</code> and then using a set of <code>append</code> methods. The items array may be <code>null</code>, in which case the <code>Form</code> is created empty. If the items array is non-null, each element must be a valid <code>Item</code> not already contained within another <code>Form</code>.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>title</CODE> - the <code>Form's</code> title string<DD><CODE>items</CODE> - the array of items to be placed in the <code>Form</code>, or <code>null</code> if there are no items<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/IllegalStateException.html">IllegalStateException</A></CODE> - if one of the items is already owned by another container<DD><CODE><A HREF="../../../java/lang/NullPointerException.html">NullPointerException</A></CODE> - if an element of the items array is <code>null</code></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="append(javax.microedition.lcdui.Item)"><!-- --></A><H3>
append</H3>
<PRE>
public int <B>append</B>(<A HREF="../../../javax/microedition/lcdui/Item.html">Item</A> item)</PRE>
<DL>
<DD>Adds an <code>Item</code> into the <code>Form</code>. The newly added <code>Item</code> becomes the last <code>Item</code> in the <code>Form</code>, and the size of the <code>Form</code> grows by one.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>item</CODE> - the <A HREF="../../../javax/microedition/lcdui/Item.html"><CODE>Item</CODE></A> to be added.<DT><B>Returns:</B><DD>the assigned index of the <code>Item</code><DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/IllegalStateException.html">IllegalStateException</A></CODE> - if the item is already owned by a container<DD><CODE><A HREF="../../../java/lang/NullPointerException.html">NullPointerException</A></CODE> - if item is <code>null</code></DL>
</DD>
</DL>
<HR>
<A NAME="append(java.lang.String)"><!-- --></A><H3>
append</H3>
<PRE>
public int <B>append</B>(<A HREF="../../../java/lang/String.html">String</A> str)</PRE>
<DL>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -