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

📄 display.html

📁 是MIDP 的API 查詢文件, 大家可以看一下裡面的index.html, 再用Package 或 Class 名字來查.
💻 HTML
📖 第 1 页 / 共 4 页
字号:
</DD>
</DL>
<HR>

<A NAME="COLOR_BORDER"><!-- --></A><H3>
COLOR_BORDER</H3>
<PRE>
public static final int <B>COLOR_BORDER</B></PRE>
<DL>
<DD>A color specifier for use with <code>getColor</code>. <code>COLOR_BORDER</code> identifies the color for boxes and borders when the object is to be drawn in a non-highlighted state.  The border color is intended to be used with  the background color and will contrast with it. The application should draw its borders using the stroke style returned  by <code>getBorderStyle()</code>. <p> <code>COLOR_BORDER</code> has the value <code>4</code>.<DD><DL>
<DT><B>See Also: </B><DD><A HREF="../../../javax/microedition/lcdui/Display.html#getColor(int)"><CODE>getColor(int)</CODE></A><DT><B>Since: </B><DD>MIDP 2.0</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="COLOR_HIGHLIGHTED_BORDER"><!-- --></A><H3>
COLOR_HIGHLIGHTED_BORDER</H3>
<PRE>
public static final int <B>COLOR_HIGHLIGHTED_BORDER</B></PRE>
<DL>
<DD>A color specifier for use with <code>getColor</code>. <code>COLOR_HIGHLIGHTED_BORDER</code> identifies the color for boxes and borders when the object is to be drawn in a highlighted state.  The highlighted border color is intended to be used with the background color (not the highlighted background color) and will contrast with it.  The application should draw its borders using the stroke style returned <code>by getBorderStyle()</code>. <p> <code>COLOR_HIGHLIGHTED_BORDER</code> has the value <code>5</code>.<DD><DL>
<DT><B>See Also: </B><DD><A HREF="../../../javax/microedition/lcdui/Display.html#getColor(int)"><CODE>getColor(int)</CODE></A><DT><B>Since: </B><DD>MIDP 2.0</DD>
</DL>
</DD>
</DL>

<!-- ========= CONSTRUCTOR DETAIL ======== -->


<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="getDisplay(javax.microedition.midlet.MIDlet)"><!-- --></A><H3>
getDisplay</H3>
<PRE>
public static <A HREF="../../../javax/microedition/lcdui/Display.html">Display</A> <B>getDisplay</B>(<A HREF="../../../javax/microedition/midlet/MIDlet.html">MIDlet</A>&nbsp;m)</PRE>
<DL>
<DD>Gets the <code>Display</code> object that is unique to this <code>MIDlet</code>.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>m</CODE> - <code>MIDlet</code> of the application<DT><B>Returns:</B><DD>the display object that application can use for its user interface<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/NullPointerException.html">NullPointerException</A></CODE> - if <code>m</code> is <code>null</code></DL>
</DD>
</DL>
<HR>

<A NAME="getColor(int)"><!-- --></A><H3>
getColor</H3>
<PRE>
public int <B>getColor</B>(int&nbsp;colorSpecifier)</PRE>
<DL>
<DD>Returns one of the colors from the high level user interface color scheme, in the form <code>0x00RRGGBB</code> based on the <code>colorSpecifier</code> passed in.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>colorSpecifier</CODE> - the predefined color specifier;  must be one of  <A HREF="../../../javax/microedition/lcdui/Display.html#COLOR_BACKGROUND"><CODE>COLOR_BACKGROUND</CODE></A>,  <A HREF="../../../javax/microedition/lcdui/Display.html#COLOR_FOREGROUND"><CODE>COLOR_FOREGROUND</CODE></A>,  <A HREF="../../../javax/microedition/lcdui/Display.html#COLOR_HIGHLIGHTED_BACKGROUND"><CODE>COLOR_HIGHLIGHTED_BACKGROUND</CODE></A>,  <A HREF="../../../javax/microedition/lcdui/Display.html#COLOR_HIGHLIGHTED_FOREGROUND"><CODE>COLOR_HIGHLIGHTED_FOREGROUND</CODE></A>,  <A HREF="../../../javax/microedition/lcdui/Display.html#COLOR_BORDER"><CODE>COLOR_BORDER</CODE></A>, or  <A HREF="../../../javax/microedition/lcdui/Display.html#COLOR_HIGHLIGHTED_BORDER"><CODE>COLOR_HIGHLIGHTED_BORDER</CODE></A><DT><B>Returns:</B><DD>color in the form of <code>0x00RRGGBB</code><DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if <code>colorSpecifier</code> is not a valid color specifier<DT><B>Since: </B><DD>MIDP 2.0</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="getBorderStyle(boolean)"><!-- --></A><H3>
getBorderStyle</H3>
<PRE>
public int <B>getBorderStyle</B>(boolean&nbsp;highlighted)</PRE>
<DL>
<DD>Returns the stroke style used for border drawing depending on the state of the component (highlighted/non-highlighted). For example, on a monochrome system, the border around a non-highlighted item might be drawn with a <code>DOTTED</code> stroke style while the border around a highlighted item might be drawn with a <code>SOLID</code> stroke style.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>highlighted</CODE> - <code>true</code> if the border style being requested is for the highlighted state, <code>false</code> if the border style being requested is for the non-highlighted state<DT><B>Returns:</B><DD><A HREF="../../../javax/microedition/lcdui/Graphics.html#DOTTED"><CODE>Graphics.DOTTED</CODE></A> or <A HREF="../../../javax/microedition/lcdui/Graphics.html#SOLID"><CODE>Graphics.SOLID</CODE></A><DT><B>Since: </B><DD>MIDP 2.0</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="isColor()"><!-- --></A><H3>
isColor</H3>
<PRE>
public boolean <B>isColor</B>()</PRE>
<DL>
<DD>Gets information about color support of the device.<DD><DL>
<DT><B>Returns:</B><DD><code>true</code> if the display supports color,  <code>false</code> otherwise</DL>
</DD>
</DL>
<HR>

<A NAME="numColors()"><!-- --></A><H3>
numColors</H3>
<PRE>
public int <B>numColors</B>()</PRE>
<DL>
<DD>Gets the number of colors (if <code>isColor()</code> is <code>true</code>) or graylevels (if <code>isColor()</code> is <code>false</code>) that can be represented on the device.<P> Note that the number of colors for a black and white display is <code>2</code>.<DD><DL>
<DT><B>Returns:</B><DD>number of colors</DL>
</DD>
</DL>
<HR>

<A NAME="numAlphaLevels()"><!-- --></A><H3>
numAlphaLevels</H3>
<PRE>
public int <B>numAlphaLevels</B>()</PRE>
<DL>
<DD>Gets the number of alpha transparency levels supported by this implementation.  The minimum legal return value is <code>2</code>, which indicates support for full transparency and full opacity and no blending.  Return values greater than <code>2</code> indicate that alpha blending is supported.  For further information, see <a href="Image.html#alpha">Alpha Processing</a>.<DD><DL>
<DT><B>Returns:</B><DD>number of alpha levels supported<DT><B>Since: </B><DD>MIDP 2.0</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="getCurrent()"><!-- --></A><H3>
getCurrent</H3>
<PRE>
public <A HREF="../../../javax/microedition/lcdui/Displayable.html">Displayable</A> <B>getCurrent</B>()</PRE>
<DL>
<DD>Gets the current <code>Displayable</code> object for this <code>MIDlet</code>.  The <code>Displayable</code> object returned may not actually be visible on the display if the <code>MIDlet</code> is running in the background, or if the <code>Displayable</code> is obscured by a system screen.  The <A HREF="../../../javax/microedition/lcdui/Displayable.html#isShown()"><CODE>Displayable.isShown()</CODE></A> method may be called to determine whether the <code>Displayable</code> is actually visible on the display.  <p> The value returned by <code>getCurrent()</code> may be <code>null</code>. This occurs after the application has been initialized but before the first call to <code>setCurrent()</code>. </p><DD><DL>
<DT><B>Returns:</B><DD>the <code>MIDlet's</code> current <code>Displayable</code> object<DT><B>See Also: </B><DD><A HREF="../../../javax/microedition/lcdui/Display.html#setCurrent(javax.microedition.lcdui.Displayable)"><CODE>setCurrent(javax.microedition.lcdui.Displayable)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setCurrent(javax.microedition.lcdui.Displayable)"><!-- --></A><H3>
setCurrent</H3>
<PRE>
public void <B>setCurrent</B>(<A HREF="../../../javax/microedition/lcdui/Displayable.html">Displayable</A>&nbsp;nextDisplayable)</PRE>
<DL>
<DD>Requests that a different <code>Displayable</code> object be made visible on the display.  The change will typically not take effect immediately.  It may be delayed so that it occurs between event delivery method calls, although it is not guaranteed to occur before the next event delivery method is called.  The <code>setCurrent()</code> method returns immediately, without waiting for the change to take place.  Because of this delay, a call to <code>getCurrent()</code> shortly after a call to <code>setCurrent()</code> is unlikely to return the value passed to <code>setCurrent()</code>. <p> Calls to <code>setCurrent()</code> are not queued.  A delayed request made by a <code>setCurrent()</code> call may be superseded by a subsequent call to <code>setCurrent()</code>.  For example, if screen <code>S1</code> is current, then </p> <TABLE BORDER="2"> <TR> <TD ROWSPAN="1" COLSPAN="1">    <pre><code>     d.setCurrent(S2);     d.setCurrent(S3);     </code></pre> </TD> </TR> </TABLE> <p> may eventually result in <code>S3</code> being made current, bypassing <code>S2</code> entirely. </p> <p> When a <code>MIDlet</code> application is first started, there is no current <code>Displayable</code> object.  It is the responsibility of the application to ensure that a <code>Displayable</code> is visible and can interact with the user at all times.  Therefore, the application should always call <code>setCurrent()</code> as part of its initialization. </p> <p> The application may pass <code>null</code> as the argument to <code>setCurrent()</code>.  This does not have the effect of setting the current <code>Displayable</code> to <code>null</code>; instead, the current <code>Displayable</code> remains unchanged.  However, the application management software may interpret this call as a request from the application that it is requesting to be placed into the background.  Similarly, if the application is in the background, passing a non-null reference to <code>setCurrent()</code> may be interpreted by the application management software as a request that the application is requesting to be brought to the foreground.  The request should be considered to be made even if the current <code>Displayable</code> is passed to the <code>setCurrent()</code>.  For example, the code </p> <TABLE BORDER="2"> <TR> <TD ROWSPAN="1" COLSPAN="1">    <pre><code>   d.setCurrent(d.getCurrent());    </code></pre> </TD> </TR> </TABLE> <p> generally will have no effect other than requesting that the application be brought to the foreground.  These are only requests, and there is no requirement that the application management software comply with these requests in a timely fashion if at all. </p> <p> If the <code>Displayable</code> passed to <code>setCurrent()</code> is an <A HREF="../../../javax/microedition/lcdui/Alert.html"><CODE>Alert</CODE></A>, the previously current <code>Displayable</code>, if any, is restored after the <code>Alert</code> has been dismissed.  If there is a current <code>Displayable</code>, the effect is as if <code>setCurrent(Alert, getCurrent())</code> had been called.  Note that this will result in an exception being thrown if the current <code>Displayable</code> is already an alert.  If there is no current <code>Displayable</code> (which may occur at startup time) the implementation's previous state will be restored after the <code>Alert</code> has been dismissed.  The automatic restoration of the previous <code>Displayable</code> or the previous state 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>To specify the <code>Displayable</code> to be shown after an <code>Alert</code> is dismissed, the application should use the <A HREF="../../../javax/microedition/lcdui/Display.html#setCurrent(javax.microedition.lcdui.Alert, javax.microedition.lcdui.Displayable)"><CODE>setCurrent(Alert, Displayable)</CODE></A> method.  If the application calls <code>setCurrent()</code> while an <code>Alert</code> is current, the <code>Alert</code> is removed from the display and any timer it may have set is cancelled. </p> <p> If the application calls <code>setCurrent()</code> while a system screen is active, the effect may be delayed until after the system screen is dismissed.  The implementation may choose to interpret <code>setCurrent()</code> in such a situation as a request to cancel the effect of the system screen, regardless of whether <code>setCurrent()</code> has been delayed. </p><DD><DL>
<DT><B>Parameters:</B><DD><CODE>nextDisplayable</CODE> - the <code>Displayable</code> requested to be made current; <code>null</code> is allowed<DT><B>See Also: </B><DD><A HREF="../../../javax/microedition/lcdui/Display.html#getCurrent()"><CODE>getCurrent()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setCurrent(javax.microedition.lcdui.Alert, javax.microedition.lcdui.Displayable)"><!-- --></A><H3>
setCurrent</H3>
<PRE>
public void <B>setCurrent</B>(<A HREF="../../../javax/microedition/lcdui/Alert.html">Alert</A>&nbsp;alert,                       <A HREF="../../../javax/microedition/lcdui/Displayable.html">Displayable</A>&nbsp;nextDisplayable)</PRE>
<DL>
<DD>Requests that this <code>Alert</code> be made current, and that <code>nextDisplayable</code> be made current after the <code>Alert</code> is dismissed.  This call returns immediately regardless of the <code>Alert's</code> timeout value or whether it is a

⌨️ 快捷键说明

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