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

📄 display.html

📁 是MIDP 的API 查詢文件, 大家可以看一下裡面的index.html, 再用Package 或 Class 名字來查.
💻 HTML
📖 第 1 页 / 共 4 页
字号:
 modal alert.  The <code>nextDisplayable</code> must not be an <code>Alert</code>, and it must not be <code>null</code>. <p>The automatic advance to <code>nextDisplayable</code> occurs only  when the <code>Alert's</code> default listener is present on the <code>Alert</code> when it is dismissed.  See <a href="Alert.html#commands">Alert Commands and Listeners</a> for details.</p>  <p> In other respects, this method behaves identically to <A HREF="../../../javax/microedition/lcdui/Display.html#setCurrent(javax.microedition.lcdui.Displayable)"><CODE>setCurrent(Displayable)</CODE></A>. </p><DD><DL>
<DT><B>Parameters:</B><DD><CODE>alert</CODE> - the alert to be shown<DD><CODE>nextDisplayable</CODE> - the <code>Displayable</code> to be shown after this alert is  dismissed<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/NullPointerException.html">NullPointerException</A></CODE> - if alert or <code>nextDisplayable</code> is <code>null</code><DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if <code>nextDisplayable</code> is an <code>Alert</code><DT><B>See Also: </B><DD><A HREF="../../../javax/microedition/lcdui/Alert.html"><CODE>Alert</CODE></A>, 
<A HREF="../../../javax/microedition/lcdui/Display.html#getCurrent()"><CODE>getCurrent()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setCurrentItem(javax.microedition.lcdui.Item)"><!-- --></A><H3>
setCurrentItem</H3>
<PRE>
public void <B>setCurrentItem</B>(<A HREF="../../../javax/microedition/lcdui/Item.html">Item</A>&nbsp;item)</PRE>
<DL>
<DD>Requests that the <code>Displayable</code> that contains this <code>Item</code> be made current, scrolls the <code>Displayable</code> so that this <code>Item</code> is visible, and possibly assigns the focus to this <code>Item</code>.  The containing <code>Displayable</code> is first made current as if <A HREF="../../../javax/microedition/lcdui/Display.html#setCurrent(javax.microedition.lcdui.Displayable)"><CODE>setCurrent(Displayable)</CODE></A> had been called.  When the containing <code>Displayable</code> becomes current, or if it is already current, it is scrolled if necessary so that the requested <code>Item</code> is made visible. Then, if the implementation supports the notion of input focus, and if the <code>Item</code> accepts the input focus, the input focus is assigned to the <code>Item</code>. <p>This method always returns immediately, without waiting for the switching of the <code>Displayable</code>, the scrolling, and the assignment of input focus to take place.</p> <p>It is an error for the <code>Item</code> not to be contained within a container. It is also an error if the <code>Item</code> is contained within an <code>Alert</code>.</p><DD><DL>
<DT><B>Parameters:</B><DD><CODE>item</CODE> - the item that should be made visible<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/IllegalStateException.html">IllegalStateException</A></CODE> - if the item is not owned by a container<DD><CODE><A HREF="../../../java/lang/IllegalStateException.html">IllegalStateException</A></CODE> - if the item is owned by an  <code>Alert</code><DD><CODE><A HREF="../../../java/lang/NullPointerException.html">NullPointerException</A></CODE> - if <code>item</code> is <code>null</code><DT><B>Since: </B><DD>MIDP 2.0</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="callSerially(java.lang.Runnable)"><!-- --></A><H3>
callSerially</H3>
<PRE>
public void <B>callSerially</B>(<A HREF="../../../java/lang/Runnable.html">Runnable</A>&nbsp;r)</PRE>
<DL>
<DD>Causes the <code>Runnable</code> object <code>r</code> to have its <code>run()</code> method called later, serialized with the event stream, soon after completion of the repaint cycle.  As noted in the <a href="./package-summary.html#events">Event Handling</a> section of the package summary, the methods that deliver event notifications to the application are all called serially. The call to <code>r.run()</code> will be serialized along with the event calls into the application. The <code>run()</code> method will be called exactly once for each call to <code>callSerially()</code>. Calls to <code>run()</code> will occur in the order in which they were requested by calls to <code>callSerially()</code>. <p> If the current <code>Displayable</code> is a <code>Canvas</code> that has a repaint pending at the time of a call to <code>callSerially()</code>, the <code>paint()</code> method of the <code>Canvas</code> will be called and will return, and a buffer switch will occur (if double buffering is in effect), before the <code>run()</code> method of the <code>Runnable</code> is called. If the current <code>Displayable</code> contains one or more <code>CustomItems</code> that have repaints pending at the time of a call to <code>callSerially()</code>, the <code>paint()</code> methods of the <code>CustomItems</code> will be called and will return before the <code>run()</code> method of the <code>Runnable</code> is called. Calls to the <code>run()</code> method will occur in a timely fashion, but they are not guaranteed to occur immediately after the repaint cycle finishes, or even before the next event is delivered. </p> <p> The <code>callSerially()</code> method may be called from any thread. The call to the <code>run()</code> method will occur independently of the call to <code>callSerially()</code>. In particular, <code>callSerially()</code> will <em>never</em> block waiting for <code>r.run()</code> to return. </p> <p> As with other callbacks, the call to <code>r.run()</code> must return quickly. If it is necessary to perform a long-running operation, it may be initiated from within the <code>run()</code> method. The operation itself should be performed within another thread, allowing <code>run()</code> to return. </p> <p> The <code>callSerially()</code> facility may be used by applications to run an animation that is properly synchronized with the repaint cycle. A typical application will set up a frame to be displayed and then call <code>repaint()</code>.  The application must then wait until the frame is actually displayed, after which the setup for the next frame may occur.  The call to <code>run()</code> notifies the application that the previous frame has finished painting.  The example below shows <code>callSerially()</code> being used for this purpose. </p> <TABLE BORDER="2"> <TR> <TD ROWSPAN="1" COLSPAN="1">    <pre><code>     class Animation extends Canvas         implements Runnable {     // paint the current frame     void paint(Graphics g) { ... }        Display display; // the display for the application        void paint(Graphics g) { ... } // paint the current frame        void startAnimation() {            // set up initial frame            repaint();            display.callSerially(this);        }        // called after previous repaint is finished        void run() {            if ( &#47;* there are more frames *&#47; ) {                // set up the next frame                repaint();                display.callSerially(this);            }        }     }    </code></pre> </TD> </TR> </TABLE><DD><DL>
<DT><B>Parameters:</B><DD><CODE>r</CODE> - instance of interface <code>Runnable</code> to be called</DL>
</DD>
</DL>
<HR>

<A NAME="flashBacklight(int)"><!-- --></A><H3>
flashBacklight</H3>
<PRE>
public boolean <B>flashBacklight</B>(int&nbsp;duration)</PRE>
<DL>
<DD>Requests a flashing effect for the device's backlight.  The flashing effect is intended to be used to attract the user's attention or as a special effect for games.  Examples of flashing are cycling the backlight on and off or from dim to bright repeatedly. The return value indicates if the flashing of the backlight can be controlled by the application. <p>The flashing effect occurs for the requested duration, or it is switched off if the requested duration is zero.  This method returns immediately; that is, it must not block the caller while the flashing effect is running.</p> <p>Calls to this method are honored only if the <code>Display</code> is in the foreground.  This method MUST perform no action and return <CODE>false</CODE> if the <code>Display</code> is in the background. <p>The device MAY limit or override the duration. For devices that do not include a controllable backlight, calls to this method return <CODE>false</CODE>.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>duration</CODE> - the number of milliseconds the backlight should be flashed, or zero if the flashing should be stopped<DT><B>Returns:</B><DD><CODE>true</CODE> if the backlight can be controlled           by the application and this display is in the foreground,          <CODE>false</CODE> otherwise<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if <code>duration</code> is negative<DT><B>Since: </B><DD>MIDP 2.0</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="vibrate(int)"><!-- --></A><H3>
vibrate</H3>
<PRE>
public boolean <B>vibrate</B>(int&nbsp;duration)</PRE>
<DL>
<DD>Requests operation of the device's vibrator.  The vibrator is intended to be used to attract the user's attention or as a special effect for games.  The return value indicates if the vibrator can be controlled by the application. <p>This method switches on the vibrator for the requested duration, or switches it off if the requested duration is zero. If this method is called while the vibrator is still activated from a previous call, the request is interpreted as setting a new duration. It is not interpreted as adding additional time to the original request. This method returns immediately; that is, it must not block the caller while the vibrator is running. </p> <p>Calls to this method are honored only if the <code>Display</code> is in the foreground.  This method MUST perform no action and return <CODE>false</CODE> if the <code>Display</code> is in the background.</p> <p>The device MAY limit or override the duration.  For devices that do not include a controllable vibrator, calls to this method return <CODE>false</CODE>.</p><DD><DL>
<DT><B>Parameters:</B><DD><CODE>duration</CODE> - the number of milliseconds the vibrator should be run, or zero if the vibrator should be turned off<DT><B>Returns:</B><DD><CODE>true</CODE> if the vibrator can be controlled by the           application and this display is in the foreground,          <CODE>false</CODE> otherwise<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if <code>duration</code> is negative<DT><B>Since: </B><DD>MIDP 2.0</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="getBestImageWidth(int)"><!-- --></A><H3>
getBestImageWidth</H3>
<PRE>
public int <B>getBestImageWidth</B>(int&nbsp;imageType)</PRE>
<DL>
<DD>Returns the best image width for a given image type. The image type must be one of <A HREF="../../../javax/microedition/lcdui/Display.html#LIST_ELEMENT"><CODE>LIST_ELEMENT</CODE></A>, <A HREF="../../../javax/microedition/lcdui/Display.html#CHOICE_GROUP_ELEMENT"><CODE>CHOICE_GROUP_ELEMENT</CODE></A>, or <A HREF="../../../javax/microedition/lcdui/Display.html#ALERT"><CODE>ALERT</CODE></A>.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>imageType</CODE> - the image type<DT><B>Returns:</B><DD>the best image width for the image type, may be zero if there is no best size; must not be negative<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if <code>imageType</code> is illegal<DT><B>Since: </B><DD>MIDP 2.0</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="getBestImageHeight(int)"><!-- --></A><H3>
getBestImageHeight</H3>
<PRE>
public int <B>getBestImageHeight</B>(int&nbsp;imageType)</PRE>
<DL>
<DD>Returns the best image height for a given image type. The image type must be one of <A HREF="../../../javax/microedition/lcdui/Display.html#LIST_ELEMENT"><CODE>LIST_ELEMENT</CODE></A>, <A HREF="../../../javax/microedition/lcdui/Display.html#CHOICE_GROUP_ELEMENT"><CODE>CHOICE_GROUP_ELEMENT</CODE></A>, or <A HREF="../../../javax/microedition/lcdui/Display.html#ALERT"><CODE>ALERT</CODE></A>.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>imageType</CODE> - the image type<DT><B>Returns:</B><DD>the best image height for the image type, may be zero if there is no best size; must not be negative<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if <code>imageType</code> is illegal<DT><B>Since: </B><DD>MIDP 2.0</DD>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_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>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Display.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<strong>MID Profile</strong></EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../javax/microedition/lcdui/DateField.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../javax/microedition/lcdui/Displayable.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>  &nbsp;
&nbsp;<A HREF="Display.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>
<font size="-1"><a href="mailto:midp-feedback@risc.sps.mot.com">Submit a comment or suggestion</a> Version 2.0 of MID Profile Specification<br>Java is a trademark or registered trademark of Sun Microsystems,  Inc. in the US and other countries. Copyright (c) 1993-2002 Sun Microsystems, Inc. 901 San Antonio Road,Palo Alto, California, 94303, U.S.A.  All Rights Reserved.</font>
</BODY>
</HTML>

⌨️ 快捷键说明

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