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

📄 customitem.html

📁 是MIDP 的API 查詢文件, 大家可以看一下裡面的index.html, 再用Package 或 Class 名字來查.
💻 HTML
📖 第 1 页 / 共 5 页
字号:
 supports traversal, the system might use directional keys for traversal and elect not to deliver these keys to <code>CustomItems</code>.  The mapping between key codes and game actions in a <code>CustomItem</code> may differ from the mapping in a <code>Canvas</code>.  See <a href="Canvas.html#keyevents">Key Events</a> and <a href="Canvas.html#gameactions">Game Actions</a> on class <code>Canvas</code> for further information about key codes and game actions.</p> <a name="pointer"></a> <h2>Pointer Input</h2> <p>The implementation may optionally support delivery of pointer events (such as taps with a stylus) to the <code>CustomItem</code>.   The implementation indicates the level of support by setting the <code>POINTER_PRESS</code>, <code>POINTER_RELEASE</code>, and <code>POINTER_DRAG</code> bits in the value returned by <code>getInteractionModes</code>.  Events corresponding to these bits are delivered through calls to the <code>pointerPressed()</code>,  <code>pointerReleased()</code>, and <code>pointerDragged()</code> methods, respectively.   If an implementation supports <code>POINTER_RELEASE</code> events, it must also support  <code>POINTER_PRESS</code> events.  If an implementation supports <code>POINTER_DRAG</code> events,  it must also support <code>POINTER_PRESS</code> and <code>POINTER_RELEASE</code> events.   If supported, <code>POINTER_RELEASE</code> events will generally occur after a corresponding  <code>POINTER_PRESS</code> event is received, and <code>POINTER_DRAG</code> events will generally occur between <code>POINTER_PRESS</code> and <code>POINTER_RELEASE</code> events.   However, it is possible for the <code>CustomItem</code> to receive <code>POINTER_RELEASE</code>  or <code>POINTER_DRAG</code> events without a corresponding <code>POINTER_PRESS</code> if the pointer is  down when the <code>CustomItem</code> becomes visible.</p> <p>The <code>(x,y)</code> location of the pointer event is  reported with every pointer event.  This location is expressed in the coordinate system of the <code>CustomItem</code>, where <code>(0,0)</code> is the upper-left corner of the <code>CustomItem</code>.  Under certain circumstances, pointer events may occur outside the bounds of the item. </p> <h2>Traversal</h2> <p>An implementation may support traversal <em>internal</em> to a <code>CustomItem</code>, that is, the implementation  may temporarily delegate the responsibility for traversal to the item itself.  Even if there is only one traversal location inside the <code>CustomItem</code>,  the item may want support the internal traversal protocol so that it can perform specialized highlighting, animation, etc. when the user has traversed into it.</p> <p>The implementation indicates its support for traversal internal to a <code>CustomItem</code> by setting one or both of the  <code>TRAVERSE_HORIZONTAL</code> or <code>TRAVERSE_VERTICAL</code> bits in the value returned by <code>getInteractionModes()</code>. If neither of these bits is set, the implementation is unwilling to let <code>CustomItems</code> traverse internally, or the  implementation does not support traversal at all.  If the implementation does support traversal but has declined to permit traversal internal to <code>CustomItems</code>, the implementation will supply its own highlighting outside the  <code>CustomItem's</code> content area.</p> <p>The <code>CustomItem</code> need not support internal traversal at all.  It can do this by returning <code>false</code> to the initial call to the <code>traverse</code> method.  (This is the default behavior if this method hasn't been overridden by the <code>CustomItem</code>.)  If this occurs, the system must arrange for the user to be able to traverse onto and past this item.  The system must also arrange for proper scrolling to take place, particularly if the item exceeds the height of the screen, regardless of whether internal traversal is occurring.</p> <p>An implementation may provide support for delivering keypad or pointer events to <code>CustomItems</code> even if it has declined to support delivering traverse events to <code>CustomItems</code>.   If an implementation provides support for delivering keypad or pointer events to <code>CustomItems</code>, it must provide a means to do so for every <code>CustomItem</code>, even for those that have refused internal traversal by returning <code>false</code> to the initial  <code>traverse()</code> call.   This implies that such implementations must still support some notion of focus for an item, even if that item is not supporting internal traversal.</p> <p>See the documentation for the <A HREF="../../../javax/microedition/lcdui/CustomItem.html#traverse(int, int, int, int[])"><CODE>traverse</CODE></A> method for a full specification of the behavior and responsibilities required for the item to perform internal traversal.</p> <h2>Item Appearance</h2> <p>The visual appearance of each item consists of a label (handled by the implementation) and its contents (handled by the subclass).</p> <p>Labels are the responsibility of the implementation, not the item.  The screen area that is allocated to the <code>CustomItem</code> for its contents is separate from the area that the implementation uses to display the <code>CustomItem's</code> label.  The implementation controls the rendering of the label and its layout with respect to the content area.</p> <p>The <code>CustomItem</code> is responsible for  painting its contents whenever the <code>paint</code> method is called.</p> <p>The colors for foreground, background, highlighted foreground, highlighted background, border, and highlighted border should be retrieved from <A HREF="../../../javax/microedition/lcdui/Display.html#getColor(int)"><CODE>Display.getColor(int)</CODE></A>.   This will allow <code>CustomItems</code> to match the color scheme of other items provided with the device. The <code>CustomItem</code> is responsible for keeping  track of its own highlighted and unhighlighted state.</p> <p>The fonts used should be retrieved from <A HREF="../../../javax/microedition/lcdui/Font.html#getFont(int)"><CODE>Font.getFont(int)</CODE></A>. This will allow them to match the fonts used by other items on the device for a consistent visual appearance. </p>
<P>
<DL>
<DT><B>Since: </B><DD>MIDP 2.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>protected static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/lcdui/CustomItem.html#KEY_PRESS">KEY_PRESS</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Interaction mode bit indicating support for key pressed events.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/lcdui/CustomItem.html#KEY_RELEASE">KEY_RELEASE</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Interaction mode bit indicating support for key released events.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/lcdui/CustomItem.html#KEY_REPEAT">KEY_REPEAT</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Interaction mode bit indicating support for key repeated events.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/lcdui/CustomItem.html#NONE">NONE</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A value for traversal direction that indicates that traversal has entered or has changed location within this item, but that no specific direction is associated with this traversal event.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/lcdui/CustomItem.html#POINTER_DRAG">POINTER_DRAG</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Interaction mode bit indicating support for point dragged events.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/lcdui/CustomItem.html#POINTER_PRESS">POINTER_PRESS</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Interaction mode bit indicating support for point pressed events.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/lcdui/CustomItem.html#POINTER_RELEASE">POINTER_RELEASE</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Interaction mode bit indicating support for point released events.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/lcdui/CustomItem.html#TRAVERSE_HORIZONTAL">TRAVERSE_HORIZONTAL</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Interaction mode bit indicating support of horizontal traversal internal to the <code>CustomItem</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/lcdui/CustomItem.html#TRAVERSE_VERTICAL">TRAVERSE_VERTICAL</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Interaction mode bit indicating support for vertical traversal internal to the <code>CustomItem</code>.</TD>
</TR>
</TABLE>
&nbsp;<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_CENTER">LAYOUT_CENTER</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#LAYOUT_DEFAULT">LAYOUT_DEFAULT</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#LAYOUT_EXPAND">LAYOUT_EXPAND</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#LAYOUT_LEFT">LAYOUT_LEFT</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#LAYOUT_NEWLINE_AFTER">LAYOUT_NEWLINE_AFTER</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#LAYOUT_NEWLINE_BEFORE">LAYOUT_NEWLINE_BEFORE</A>, <A HREF="../../../javax/microedition/lcdui/Item.html#LAYOUT_RIGHT">LAYOUT_RIGHT</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>
&nbsp;
<!-- ======== 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 ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected </CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/lcdui/CustomItem.html#CustomItem(java.lang.String)">CustomItem</A></B>(<A HREF="../../../java/lang/String.html">String</A>&nbsp;label)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Superclass constructor, provided so that the

⌨️ 快捷键说明

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