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

📄 imageitem.html

📁 J2ME MIDP2.0 final specification
💻 HTML
📖 第 1 页 / 共 3 页
字号:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new <code>ImageItem</code> object with the given label, image, layout directive, alternate text string, and appearance mode.</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;String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/lcdui/ImageItem.html#getAltText()">getAltText</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the text string to be used if the image exceeds the device's capacity to display it.</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/ImageItem.html#getAppearanceMode()">getAppearanceMode</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the appearance mode of the <code>ImageItem</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/ImageItem.html#getImage()">getImage</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the image contained within the <code>ImageItem</code>, or <code>null</code> if there is no contained image.</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/ImageItem.html#getLayout()">getLayout</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the layout directives used for placing the image.</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/ImageItem.html#setAltText(java.lang.String)">setAltText</A></B>(String&nbsp;text)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the alternate text of the <code>ImageItem</code>, or <code>null</code> if no alternate text is provided.</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/ImageItem.html#setImage(javax.microedition.lcdui.Image)">setImage</A></B>(<A HREF="../../../javax/microedition/lcdui/Image.html">Image</A>&nbsp;img)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the <code>Image</code> object contained within the <code>ImageItem</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/ImageItem.html#setLayout(int)">setLayout</A></B>(int&nbsp;layout)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the layout directives.</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_javax.microedition.lcdui.Item"><!-- --></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/Item.html">Item</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../javax/microedition/lcdui/Item.html#addCommand(javax.microedition.lcdui.Command)">addCommand</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#getLabel()">getLabel</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#getMinimumHeight()">getMinimumHeight</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#getMinimumWidth()">getMinimumWidth</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#getPreferredHeight()">getPreferredHeight</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#getPreferredWidth()">getPreferredWidth</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#notifyStateChanged()">notifyStateChanged</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#removeCommand(javax.microedition.lcdui.Command)">removeCommand</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#setDefaultCommand(javax.microedition.lcdui.Command)">setDefaultCommand</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#setItemCommandListener(javax.microedition.lcdui.ItemCommandListener)">setItemCommandListener</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#setLabel(java.lang.String)">setLabel</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#setPreferredSize(int, int)">setPreferredSize</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="LAYOUT_DEFAULT"><!-- --></A><H3>LAYOUT_DEFAULT</H3><PRE>public static final int <B>LAYOUT_DEFAULT</B></PRE><DL><DD>See <A HREF="../../../javax/microedition/lcdui/Item.html#LAYOUT_DEFAULT"><CODE>Item.LAYOUT_DEFAULT</CODE></A>.  <P>Value <code>0</code> is assigned to <code>LAYOUT_DEFAULT</code>.</P></DL><HR><A NAME="LAYOUT_LEFT"><!-- --></A><H3>LAYOUT_LEFT</H3><PRE>public static final int <B>LAYOUT_LEFT</B></PRE><DL><DD>See <A HREF="../../../javax/microedition/lcdui/Item.html#LAYOUT_LEFT"><CODE>Item.LAYOUT_LEFT</CODE></A>.  <P>Value <code>1</code> is assigned to <code>LAYOUT_LEFT</code>.</P></DL><HR><A NAME="LAYOUT_RIGHT"><!-- --></A><H3>LAYOUT_RIGHT</H3><PRE>public static final int <B>LAYOUT_RIGHT</B></PRE><DL><DD>See <A HREF="../../../javax/microedition/lcdui/Item.html#LAYOUT_RIGHT"><CODE>Item.LAYOUT_RIGHT</CODE></A>.  <P>Value <code>2</code> is assigned to <code>LAYOUT_RIGHT</code>.</P></DL><HR><A NAME="LAYOUT_CENTER"><!-- --></A><H3>LAYOUT_CENTER</H3><PRE>public static final int <B>LAYOUT_CENTER</B></PRE><DL><DD>See <A HREF="../../../javax/microedition/lcdui/Item.html#LAYOUT_CENTER"><CODE>Item.LAYOUT_CENTER</CODE></A>.  <P>Value <code>3</code> is assigned to <code>LAYOUT_CENTER</code>.</P></DL><HR><A NAME="LAYOUT_NEWLINE_BEFORE"><!-- --></A><H3>LAYOUT_NEWLINE_BEFORE</H3><PRE>public static final int <B>LAYOUT_NEWLINE_BEFORE</B></PRE><DL><DD>See <A HREF="../../../javax/microedition/lcdui/Item.html#LAYOUT_NEWLINE_BEFORE"><CODE>Item.LAYOUT_NEWLINE_BEFORE</CODE></A>.  <P>Value <code>0x100</code> is assigned to <code>LAYOUT_NEWLINE_BEFORE</code>.</P></DL><HR><A NAME="LAYOUT_NEWLINE_AFTER"><!-- --></A><H3>LAYOUT_NEWLINE_AFTER</H3><PRE>public static final int <B>LAYOUT_NEWLINE_AFTER</B></PRE><DL><DD>See <A HREF="../../../javax/microedition/lcdui/Item.html#LAYOUT_NEWLINE_AFTER"><CODE>Item.LAYOUT_NEWLINE_AFTER</CODE></A>.  <P>Value <code>0x200</code> is assigned to <code>LAYOUT_NEWLINE_AFTER</code>.</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="ImageItem(java.lang.String, javax.microedition.lcdui.Image, int, java.lang.String)"><!-- --></A><H3>ImageItem</H3><PRE>public <B>ImageItem</B>(String&nbsp;label,                 <A HREF="../../../javax/microedition/lcdui/Image.html">Image</A>&nbsp;img,                 int&nbsp;layout,                 String&nbsp;altText)</PRE><DL><DD>Creates a new <code>ImageItem</code> with the given label, image, layout directive, and alternate text string.  Calling this constructor is  equivalent to calling  <TABLE BORDER="2"> <TR> <TD ROWSPAN="1" COLSPAN="1">    <pre><code>    ImageItem(label, image, layout, altText, PLAIN);     </code></pre> </TD> </TR> </TABLE><DD><DL><DT><B>Parameters:</B><DD><CODE>label</CODE> - the label string<DD><CODE>img</CODE> - the image, can be mutable or immutable<DD><CODE>layout</CODE> - a combination of layout directives<DD><CODE>altText</CODE> - the text that may be used in place of the image<DT><B>Throws:</B><DD><CODE>IllegalArgumentException</CODE> - if the <code>layout</code> value is not a legal combination of directives<DT><B>See Also: </B><DD><A HREF="../../../javax/microedition/lcdui/ImageItem.html#ImageItem(java.lang.String, javax.microedition.lcdui.Image, int, java.lang.String, int)"><CODE>ImageItem(String, Image, int, String, int)</CODE></A></DL></DD></DL><HR><A NAME="ImageItem(java.lang.String, javax.microedition.lcdui.Image, int, java.lang.String, int)"><!-- --></A><H3>ImageItem</H3><PRE>public <B>ImageItem</B>(String&nbsp;label,                 <A HREF="../../../javax/microedition/lcdui/Image.html">Image</A>&nbsp;image,                 int&nbsp;layout,                 String&nbsp;altText,                 int&nbsp;appearanceMode)</PRE><DL><DD>Creates a new <code>ImageItem</code> object with the given label, image, layout directive, alternate text string, and appearance mode. Either label or alternative text may be present or <code>null</code>.

⌨️ 快捷键说明

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