📄 customitem.html
字号:
<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/CustomItem.html#getGameAction(int)">getGameAction</A></B>(int keyCode)</CODE><BR> Gets the game action associated with the given key code of the device.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/lcdui/CustomItem.html#getInteractionModes()">getInteractionModes</A></B>()</CODE><BR> Gets the available interaction modes.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected abstract int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/lcdui/CustomItem.html#getMinContentHeight()">getMinContentHeight</A></B>()</CODE><BR> Implemented by the subclass to return the minimum height of the content area, in pixels.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected abstract int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/lcdui/CustomItem.html#getMinContentWidth()">getMinContentWidth</A></B>()</CODE><BR> Implemented by the subclass to return the minimum width of the content area, in pixels.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected abstract int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/lcdui/CustomItem.html#getPrefContentHeight(int)">getPrefContentHeight</A></B>(int width)</CODE><BR> Implemented by the subclass to return the preferred height of the content area, in pixels.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected abstract int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/lcdui/CustomItem.html#getPrefContentWidth(int)">getPrefContentWidth</A></B>(int height)</CODE><BR> Implemented by the subclass to return the preferred width of the content area, in pixels.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/lcdui/CustomItem.html#hideNotify()">hideNotify</A></B>()</CODE><BR> Called by the system to notify the item that it is now completely invisible, when it previously had been at least partially visible.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/lcdui/CustomItem.html#invalidate()">invalidate</A></B>()</CODE><BR> Signals that the <code>CustomItem's</code> size and traversal location need to be updated.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/lcdui/CustomItem.html#keyPressed(int)">keyPressed</A></B>(int keyCode)</CODE><BR> Called by the system when a key is pressed.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/lcdui/CustomItem.html#keyReleased(int)">keyReleased</A></B>(int keyCode)</CODE><BR> Called by the system when a key is released.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/lcdui/CustomItem.html#keyRepeated(int)">keyRepeated</A></B>(int keyCode)</CODE><BR> Called by the system when a key is repeated.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected abstract void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/lcdui/CustomItem.html#paint(javax.microedition.lcdui.Graphics, int, int)">paint</A></B>(<A HREF="../../../javax/microedition/lcdui/Graphics.html">Graphics</A> g, int w, int h)</CODE><BR> Implemented by the subclass to render the item within its container.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/lcdui/CustomItem.html#pointerDragged(int, int)">pointerDragged</A></B>(int x, int y)</CODE><BR> Called by the system when a pointer drag action (for example, pen motion after a press but before a release) has occurred within the item.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/lcdui/CustomItem.html#pointerPressed(int, int)">pointerPressed</A></B>(int x, int y)</CODE><BR> Called by the system when a pointer down action (for example, a pen tap) has occurred within the item.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/lcdui/CustomItem.html#pointerReleased(int, int)">pointerReleased</A></B>(int x, int y)</CODE><BR> Called by the system when a pointer up action (for example, a pen lift) has occurred after a pointer down action had occurred within the item.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/lcdui/CustomItem.html#repaint()">repaint</A></B>()</CODE><BR> Called by subclass code to request that the item be repainted.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/lcdui/CustomItem.html#repaint(int, int, int, int)">repaint</A></B>(int x, int y, int w, int h)</CODE><BR> Called by subclass code to request that the specified rectangular area of the item be repainted.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/lcdui/CustomItem.html#showNotify()">showNotify</A></B>()</CODE><BR> Called by the system to notify the item that it is now at least partially visible, when it previously had been completely invisible.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/lcdui/CustomItem.html#sizeChanged(int, int)">sizeChanged</A></B>(int w, int h)</CODE><BR> Implemented by the subclass in order to handle size change events.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/lcdui/CustomItem.html#traverse(int, int, int, int[])">traverse</A></B>(int dir, int viewportWidth, int viewportHeight, int[] visRect_inout)</CODE><BR> Called by the system when traversal has entered the item or has occurred within the item.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/lcdui/CustomItem.html#traverseOut()">traverseOut</A></B>()</CODE><BR> Called by the system when traversal has occurred out of the item.</TD></TR></TABLE> <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#getLayout()">getLayout</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#setLayout(int)">setLayout</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#setPreferredSize(int, int)">setPreferredSize</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.Object</B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</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="TRAVERSE_HORIZONTAL"><!-- --></A><H3>TRAVERSE_HORIZONTAL</H3><PRE>protected static final int <B>TRAVERSE_HORIZONTAL</B></PRE><DL><DD>Interaction mode bit indicating support of horizontal traversal internal to the <code>CustomItem</code>. <p><code>TRAVERSE_HORIZONTAL</code> has the value <code>1</code>.</p><DD><DL><DT><B>See Also: </B><DD><A HREF="../../../javax/microedition/lcdui/CustomItem.html#getInteractionModes()"><CODE>getInteractionModes()</CODE></A>, <A HREF="../../../javax/microedition/lcdui/CustomItem.html#traverse(int, int, int, int[])"><CODE>traverse(int, int, int, int[])</CODE></A></DL></DD></DL><HR><A NAME="TRAVERSE_VERTICAL"><!-- --></A><H3>TRAVERSE_VERTICAL</H3><PRE>protected static final int <B>TRAVERSE_VERTICAL</B></PRE><DL><DD>Interaction mode bit indicating support for vertical traversal internal to the <code>CustomItem</code>. <p><code>TRAVERSE_VERTICAL</code> has the value <code>2</code>.</p><DD><DL><DT><B>See Also: </B><DD><A HREF="../../../javax/microedition/lcdui/CustomItem.html#getInteractionModes()"><CODE>getInteractionModes()</CODE></A>, <A HREF="../../../javax/microedition/lcdui/CustomItem.html#traverse(int, int, int, int[])"><CODE>traverse(int, int, int, int[])</CODE></A></DL></DD></DL><HR>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -