📄 imageitem.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Fri Sep 27 14:47:31 CDT 2002 --><TITLE>Mobile Information Device Profile 2.0: Class ImageItem</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"></HEAD><BODY BGCOLOR="white"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ImageItem.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><strong>MIDP 2.0</strong></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../javax/microedition/lcdui/Image.html"><B>PREV CLASS</B></A> <A HREF="../../../javax/microedition/lcdui/Item.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="ImageItem.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">javax.microedition.lcdui</FONT><BR>Class ImageItem</H2><PRE>java.lang.Object | +--<A HREF="../../../javax/microedition/lcdui/Item.html">javax.microedition.lcdui.Item</A> | +--<B>javax.microedition.lcdui.ImageItem</B></PRE><HR><DL><DT>public class <B>ImageItem</B><DT>extends <A HREF="../../../javax/microedition/lcdui/Item.html">Item</A></DL><P>An item that can contain an image. <P> Each <code>ImageItem</code> object contains a reference to an <A HREF="../../../javax/microedition/lcdui/Image.html"><CODE>Image</CODE></A> object. This <code>Image</code> may be mutable or immutable. If the <code>Image</code> is mutable, the effect is as if snapshot of its contents is taken at the time the <code>ImageItem</code> is constructed with this <code>Image</code> and when <code>setImage</code> is called with an <code>Image</code>. The snapshot is used whenever the contents of the <code>ImageItem</code> are to be displayed. Even if the application subsequently draws into the <code>Image</code>, the snapshot is not modified until the next call to <code>setImage</code>. The snapshot is <em>not</em> updated when the container of the <code>ImageItem</code> becomes current or becomes visible on the display. (This is because the application does not have control over exactly when <code>Displayables</code> and Items appear and disappear from the display.)</P> <P>The value <code>null</code> may be specified for the image contents of an <code>ImageItem</code>. If this occurs (and if the label is also <code>null</code>) the <code>ImageItem</code> will occupy no space on the screen. </p> <p><code>ImageItem</code> contains layout directives that were originally defined in MIDP 1.0. These layout directives have been moved to the <A HREF="../../../javax/microedition/lcdui/Item.html"><CODE>Item</CODE></A> class and now apply to all items. The declarations are left in <code>ImageItem</code> for source compatibility purposes.</p> <P>The <code>altText</code> parameter specifies a string to be displayed in place of the image if the image exceeds the capacity of the display. The <code>altText</code> parameter may be <code>null</code>.</P><P><DL><DT><B>Since: </B><DD>MIDP 1.0</DD></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Field Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/lcdui/ImageItem.html#LAYOUT_CENTER">LAYOUT_CENTER</A></B></CODE><BR> See <A HREF="../../../javax/microedition/lcdui/Item.html#LAYOUT_CENTER"><CODE>Item.LAYOUT_CENTER</CODE></A>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/lcdui/ImageItem.html#LAYOUT_DEFAULT">LAYOUT_DEFAULT</A></B></CODE><BR> See <A HREF="../../../javax/microedition/lcdui/Item.html#LAYOUT_DEFAULT"><CODE>Item.LAYOUT_DEFAULT</CODE></A>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/lcdui/ImageItem.html#LAYOUT_LEFT">LAYOUT_LEFT</A></B></CODE><BR> See <A HREF="../../../javax/microedition/lcdui/Item.html#LAYOUT_LEFT"><CODE>Item.LAYOUT_LEFT</CODE></A>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/lcdui/ImageItem.html#LAYOUT_NEWLINE_AFTER">LAYOUT_NEWLINE_AFTER</A></B></CODE><BR> See <A HREF="../../../javax/microedition/lcdui/Item.html#LAYOUT_NEWLINE_AFTER"><CODE>Item.LAYOUT_NEWLINE_AFTER</CODE></A>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/lcdui/ImageItem.html#LAYOUT_NEWLINE_BEFORE">LAYOUT_NEWLINE_BEFORE</A></B></CODE><BR> See <A HREF="../../../javax/microedition/lcdui/Item.html#LAYOUT_NEWLINE_BEFORE"><CODE>Item.LAYOUT_NEWLINE_BEFORE</CODE></A>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/lcdui/ImageItem.html#LAYOUT_RIGHT">LAYOUT_RIGHT</A></B></CODE><BR> See <A HREF="../../../javax/microedition/lcdui/Item.html#LAYOUT_RIGHT"><CODE>Item.LAYOUT_RIGHT</CODE></A>.</TD></TR></TABLE> <A NAME="fields_inherited_from_class_javax.microedition.lcdui.Item"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields 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#BUTTON">BUTTON</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#HYPERLINK">HYPERLINK</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#LAYOUT_2">LAYOUT_2</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#LAYOUT_BOTTOM">LAYOUT_BOTTOM</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#LAYOUT_EXPAND">LAYOUT_EXPAND</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#LAYOUT_SHRINK">LAYOUT_SHRINK</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#LAYOUT_TOP">LAYOUT_TOP</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#LAYOUT_VCENTER">LAYOUT_VCENTER</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#LAYOUT_VEXPAND">LAYOUT_VEXPAND</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#LAYOUT_VSHRINK">LAYOUT_VSHRINK</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#PLAIN">PLAIN</A></CODE></TD></TR></TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --><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/ImageItem.html#ImageItem(java.lang.String, javax.microedition.lcdui.Image, int, java.lang.String)">ImageItem</A></B>(String label, <A HREF="../../../javax/microedition/lcdui/Image.html">Image</A> img, int layout, String altText)</CODE><BR> Creates a new <code>ImageItem</code> with the given label, image, layout directive, and alternate text string.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../javax/microedition/lcdui/ImageItem.html#ImageItem(java.lang.String, javax.microedition.lcdui.Image, int, java.lang.String, int)">ImageItem</A></B>(String label, <A HREF="../../../javax/microedition/lcdui/Image.html">Image</A> image, int layout, String altText, int appearanceMode)</CODE><BR>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -