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

📄 alert.html

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

<A NAME="getTimeout()"><!-- --></A><H3>
getTimeout</H3>
<PRE>
public int <B>getTimeout</B>()</PRE>
<DL>
<DD>Gets the time this <code>Alert</code> will be shown.  This is either a positive value, which indicates a time in milliseconds, or the special value <code>FOREVER</code>, which indicates that this <code>Alert</code> is modal.  This value is not necessarily the same value that might have been set by the application in a call to <A HREF="../../../javax/microedition/lcdui/Alert.html#setTimeout(int)"><CODE>setTimeout(int)</CODE></A>.  In particular, if the <code>Alert</code> is made modal because its contents is large enough to scroll, the value returned by <code>getTimeout</code> will be <code>FOREVER</code>.<DD><DL>
<DT><B>Returns:</B><DD>timeout in milliseconds, or <code>FOREVER</code><DT><B>See Also: </B><DD><A HREF="../../../javax/microedition/lcdui/Alert.html#setTimeout(int)"><CODE>setTimeout(int)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setTimeout(int)"><!-- --></A><H3>
setTimeout</H3>
<PRE>
public void <B>setTimeout</B>(int&nbsp;time)</PRE>
<DL>
<DD>Set the time for which the <code>Alert</code> is to be shown. This must either be a positive time value in milliseconds, or the special value <code>FOREVER</code>.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>time</CODE> - timeout in milliseconds, or <code>FOREVER</code><DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if time is not positive and is not <code>FOREVER</code><DT><B>See Also: </B><DD><A HREF="../../../javax/microedition/lcdui/Alert.html#getTimeout()"><CODE>getTimeout()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getType()"><!-- --></A><H3>
getType</H3>
<PRE>
public <A HREF="../../../javax/microedition/lcdui/AlertType.html">AlertType</A> <B>getType</B>()</PRE>
<DL>
<DD>Gets the type of the <code>Alert</code>.<DD><DL>
<DT><B>Returns:</B><DD>a reference to an instance of <code>AlertType</code>, or <code>null</code> if the <code>Alert</code> has no specific type<DT><B>See Also: </B><DD><A HREF="../../../javax/microedition/lcdui/Alert.html#setType(javax.microedition.lcdui.AlertType)"><CODE>setType(javax.microedition.lcdui.AlertType)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setType(javax.microedition.lcdui.AlertType)"><!-- --></A><H3>
setType</H3>
<PRE>
public void <B>setType</B>(<A HREF="../../../javax/microedition/lcdui/AlertType.html">AlertType</A>&nbsp;type)</PRE>
<DL>
<DD>Sets the type of the <code>Alert</code>. The handling and behavior of specific <code>AlertTypes</code> is described in <A HREF="../../../javax/microedition/lcdui/AlertType.html"><CODE>AlertType</CODE></A>.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>type</CODE> - an <code>AlertType</code>, or <code>null</code> if the <code>Alert</code> has no specific type<DT><B>See Also: </B><DD><A HREF="../../../javax/microedition/lcdui/Alert.html#getType()"><CODE>getType()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getString()"><!-- --></A><H3>
getString</H3>
<PRE>
public <A HREF="../../../java/lang/String.html">String</A> <B>getString</B>()</PRE>
<DL>
<DD>Gets the text string used in the <code>Alert</code>.<DD><DL>
<DT><B>Returns:</B><DD>the <code>Alert's</code> text string, or <code>null</code>  if there is no text<DT><B>See Also: </B><DD><A HREF="../../../javax/microedition/lcdui/Alert.html#setString(java.lang.String)"><CODE>setString(java.lang.String)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setString(java.lang.String)"><!-- --></A><H3>
setString</H3>
<PRE>
public void <B>setString</B>(<A HREF="../../../java/lang/String.html">String</A>&nbsp;str)</PRE>
<DL>
<DD>Sets the text string used in the <code>Alert</code>. <p>If the <code>Alert</code> is visible on the display when its contents are updated through a call to <code>setString</code>, the display will be updated with the new contents as soon as it is feasible for the implementation to do so. </p><DD><DL>
<DT><B>Parameters:</B><DD><CODE>str</CODE> - the <code>Alert's</code> text string, or <code>null</code> if there is no text<DT><B>See Also: </B><DD><A HREF="../../../javax/microedition/lcdui/Alert.html#getString()"><CODE>getString()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getImage()"><!-- --></A><H3>
getImage</H3>
<PRE>
public <A HREF="../../../javax/microedition/lcdui/Image.html">Image</A> <B>getImage</B>()</PRE>
<DL>
<DD>Gets the <code>Image</code> used in the <code>Alert</code>.<DD><DL>
<DT><B>Returns:</B><DD>the <code>Alert's</code> image, or <code>null</code>  if there is no image<DT><B>See Also: </B><DD><A HREF="../../../javax/microedition/lcdui/Alert.html#setImage(javax.microedition.lcdui.Image)"><CODE>setImage(javax.microedition.lcdui.Image)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setImage(javax.microedition.lcdui.Image)"><!-- --></A><H3>
setImage</H3>
<PRE>
public void <B>setImage</B>(<A HREF="../../../javax/microedition/lcdui/Image.html">Image</A>&nbsp;img)</PRE>
<DL>
<DD>Sets the <code>Image</code> used in the <code>Alert</code>. The <code>Image</code> may be mutable or immutable.  If <code>img</code> is <code>null</code>, specifies that this <code>Alert</code> has no image. If <code>img</code> is mutable, the effect is as if a snapshot is taken of <code>img's</code> contents immediately prior to the call to <code>setImage</code>.  This snapshot is used whenever the contents of the <code>Alert</code> are to be displayed.  If <code>img</code> is already the <code>Image</code> of this <code>Alert</code>, the effect is as if a new snapshot of img's contents is taken.  Thus, after painting into a mutable image contained by an <code>Alert</code>, the application can call <TABLE BORDER="2"> <TR> <TD ROWSPAN="1" COLSPAN="1">    <pre><code>    alert.setImage(alert.getImage());    </code></pre> </TD> </TR> </TABLE> <p>to refresh the <code>Alert's</code> snapshot of its <code>Image</code>.</p> <p>If the <code>Alert</code> is visible on the display when its contents are updated through a call to <code>setImage</code>, the display will be updated with the new snapshot as soon as it is feasible for the implementation to do so. </p><DD><DL>
<DT><B>Parameters:</B><DD><CODE>img</CODE> - the <code>Alert's</code> image, or <code>null</code> if there is no image<DT><B>See Also: </B><DD><A HREF="../../../javax/microedition/lcdui/Alert.html#getImage()"><CODE>getImage()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setIndicator(javax.microedition.lcdui.Gauge)"><!-- --></A><H3>
setIndicator</H3>
<PRE>
public void <B>setIndicator</B>(<A HREF="../../../javax/microedition/lcdui/Gauge.html">Gauge</A>&nbsp;indicator)</PRE>
<DL>
<DD>Sets an activity indicator on this <code>Alert</code>.  The activity indicator is a <A HREF="../../../javax/microedition/lcdui/Gauge.html"><CODE>Gauge</CODE></A> object.  It must be in a restricted state in order for it to be used as the activity indicator for an <code>Alert</code>. The restrictions are listed <a href="#indicator">above</a>.  If the <code>Gauge</code> object violates any of these restrictions, <code>IllegalArgumentException</code> is thrown. <p>If <code>indicator</code> is <code>null</code>, this removes any activity indicator present on this <code>Alert</code>.</p><DD><DL>
<DT><B>Parameters:</B><DD><CODE>indicator</CODE> - the activity indicator for this <code>Alert</code>, or <code>null</code> if  there is to be none<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if <code>indicator</code> does not meet the restrictions for its use in an <code>Alert</code><DT><B>Since: </B><DD>MIDP 2.0</DD>
<DT><B>See Also: </B><DD><A HREF="../../../javax/microedition/lcdui/Alert.html#getIndicator()"><CODE>getIndicator()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getIndicator()"><!-- --></A><H3>
getIndicator</H3>
<PRE>
public <A HREF="../../../javax/microedition/lcdui/Gauge.html">Gauge</A> <B>getIndicator</B>()</PRE>
<DL>
<DD>Gets the activity indicator for this <code>Alert</code>.<DD><DL>
<DT><B>Returns:</B><DD>a reference to this <code>Alert's</code> activity indicator, or <code>null</code> if  there is none<DT><B>Since: </B><DD>MIDP 2.0</DD>
<DT><B>See Also: </B><DD><A HREF="../../../javax/microedition/lcdui/Alert.html#setIndicator(javax.microedition.lcdui.Gauge)"><CODE>setIndicator(javax.microedition.lcdui.Gauge)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="addCommand(javax.microedition.lcdui.Command)"><!-- --></A><H3>
addCommand</H3>
<PRE>
public void <B>addCommand</B>(<A HREF="../../../javax/microedition/lcdui/Command.html">Command</A>&nbsp;cmd)</PRE>
<DL>
<DD>Similar to <A HREF="../../../javax/microedition/lcdui/Displayable.html#addCommand(javax.microedition.lcdui.Command)"><CODE>Displayable.addCommand(javax.microedition.lcdui.Command)</CODE></A>, however when the application first adds a command to an <code>Alert</code>, <A HREF="../../../javax/microedition/lcdui/Alert.html#DISMISS_COMMAND"><CODE>DISMISS_COMMAND</CODE></A> is implicitly removed.  Calling this method with <code>DISMISS_COMMAND</code> as the parameter has no effect.<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/microedition/lcdui/Displayable.html#addCommand(javax.microedition.lcdui.Command)">addCommand</A></CODE> in class <CODE><A HREF="../../../javax/microedition/lcdui/Displayable.html">Displayable</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>cmd</CODE> - the command to be added<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/NullPointerException.html">NullPointerException</A></CODE> - if cmd is <code>null</code></DL>
</DD>
</DL>
<HR>

<A NAME="removeCommand(javax.microedition.lcdui.Command)"><!-- --></A><H3>
removeCommand</H3>
<PRE>
public void <B>removeCommand</B>(<A HREF="../../../javax/microedition/lcdui/Command.html">Command</A>&nbsp;cmd)</PRE>
<DL>
<DD>Similar to <A HREF="../../../javax/microedition/lcdui/Displayable.html#removeCommand(javax.microedition.lcdui.Command)"><CODE>Displayable.removeCommand(javax.microedition.lcdui.Command)</CODE></A>, however when the application removes the last command from an <code>Alert</code>, <A HREF="../../../javax/microedition/lcdui/Alert.html#DISMISS_COMMAND"><CODE>DISMISS_COMMAND</CODE></A> is implicitly added.  Calling this method with <code>DISMISS_COMMAND</code> as the parameter has no effect.<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/microedition/lcdui/Displayable.html#removeCommand(javax.microedition.lcdui.Command)">removeCommand</A></CODE> in class <CODE><A HREF="../../../javax/microedition/lcdui/Displayable.html">Displayable</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>cmd</CODE> - the command to be removed</DL>
</DD>
</DL>
<HR>

<A NAME="setCommandListener(javax.microedition.lcdui.CommandListener)"><!-- --></A><H3>
setCommandListener</H3>
<PRE>
public void <B>setCommandListener</B>(<A HREF="../../../javax/microedition/lcdui/CommandListener.html">CommandListener</A>&nbsp;l)</PRE>
<DL>
<DD>The same as <A HREF="../../../javax/microedition/lcdui/Displayable.html#setCommandListener(javax.microedition.lcdui.CommandListener)"><CODE>Displayable.setCommandListener(javax.microedition.lcdui.CommandListener)</CODE></A> but with the  following additional semantics.  If the listener parameter is <code>null</code>, the <em>default listener</em> is restored. See <a href="#commands">Commands and Listeners</a> for the definition  of the behavior of the default listener.<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/microedition/lcdui/Displayable.html#setCommandListener(javax.microedition.lcdui.CommandListener)">setCommandListener</A></CODE> in class <CODE><A HREF="../../../javax/microedition/lcdui/Displayable.html">Displayable</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>l</CODE> - the new listener, or <code>null</code></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/Alert.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;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../javax/microedition/lcdui/AlertType.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="Alert.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;<A HREF="#constructor_summary">CONSTR</A>&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;<A HREF="#constructor_detail">CONSTR</A>&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 + -