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

📄 gauge.html

📁 是MIDP 的API 查詢文件, 大家可以看一下裡面的index.html, 再用Package 或 Class 名字來查.
💻 HTML
📖 第 1 页 / 共 4 页
字号:
 <p>This value has special meaning only for non-interactive gauges with indefinite range.  It is treated as an ordinary value for interactive gauges and for non-interactive gauges with definite range.</p> <p>The value of <code>INCREMENTAL_IDLE</code> is <code>1</code>.</p><DD><DL>
<DT><B>Since: </B><DD>MIDP 2.0</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="CONTINUOUS_RUNNING"><!-- --></A><H3>
CONTINUOUS_RUNNING</H3>
<PRE>
public static final int <B>CONTINUOUS_RUNNING</B></PRE>
<DL>
<DD>The value representing the continuous-running state of a non-interactive <code>Gauge</code> with indefinite range.  In the continuous-running state, the gauge shows a continually-updating animation sequence that indicates that work is in progress.  Once the application sets a gauge into the continuous-running state, the animation should proceed without further requests from the application.  <p>This value has special meaning only for non-interactive gauges with indefinite range.  It is treated as an ordinary value for interactive gauges and for non-interactive gauges with definite range.</p> <p>The value of <code>CONTINUOUS_RUNNING</code> is <code>2</code>.</p><DD><DL>
<DT><B>Since: </B><DD>MIDP 2.0</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="INCREMENTAL_UPDATING"><!-- --></A><H3>
INCREMENTAL_UPDATING</H3>
<PRE>
public static final int <B>INCREMENTAL_UPDATING</B></PRE>
<DL>
<DD>The value representing the incremental-updating state of a non-interactive <code>Gauge</code> with indefinite range.  In the incremental-updating state, the gauge shows a graphic indicating that work is in progress, typically one frame of an animation sequence.  The graphic should be updated to the next frame in the sequence only when the application calls <code>setValue(INCREMENTAL_UPDATING)</code>.  <p>This value has special meaning only for non-interactive gauges with indefinite range.  It is treated as an ordinary value for interactive gauges and for non-interactive gauges with definite range.</p>  <p> The value of <code>INCREMENTAL_UPDATING</code> is <code>3</code>.</p><DD><DL>
<DT><B>Since: </B><DD>MIDP 2.0</DD>
</DL>
</DD>
</DL>

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

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

<A NAME="Gauge(java.lang.String, boolean, int, int)"><!-- --></A><H3>
Gauge</H3>
<PRE>
public <B>Gauge</B>(<A HREF="../../../java/lang/String.html">String</A>&nbsp;label,             boolean&nbsp;interactive,             int&nbsp;maxValue,             int&nbsp;initialValue)</PRE>
<DL>
<DD>Creates a new <code>Gauge</code> object with the given label, in interactive or non-interactive mode, with the given maximum and initial values.  In interactive mode (where <code>interactive</code> is <code>true</code>) the maximum value must be greater than zero, otherwise an exception is thrown.  In non-interactive mode (where <code>interactive</code> is <code>false</code>) the maximum value must be greater than zero or equal to the special value <code>INDEFINITE</code>, otherwise an exception is thrown. <p>If the maximum value is greater than zero, the gauge has definite range.  In this case the initial value must be within the range zero to <code>maxValue</code>, inclusive.  If the initial value is less than zero, the value is set to zero.  If the initial value is greater than <code>maxValue</code>, it is set to <code>maxValue</code>.</p> <p>If <code>interactive</code> is <code>false</code> and the maximum value is <code>INDEFINITE</code>, this creates a non-interactive gauge with indefinite range. The initial value must be one of <code>CONTINUOUS_IDLE</code>, <code>INCREMENTAL_IDLE</code>, <code>CONTINUOUS_RUNNING</code>, or <code>INCREMENTAL_UPDATING</code>.</p><DD><DL>
<DT><B>Parameters:</B><DD><CODE>label</CODE> - the <code>Gauge's</code> label<DD><CODE>interactive</CODE> - tells whether the user can change the value<DD><CODE>maxValue</CODE> - the maximum value, or <code>INDEFINITE</code><DD><CODE>initialValue</CODE> - the initial value in the range <code>[0..maxValue]</code>, or one of <code>CONTINUOUS_IDLE</code>, <code>INCREMENTAL_IDLE</code>, <code>CONTINUOUS_RUNNING</code>, or <code>INCREMENTAL_UPDATING</code> if <code>maxValue</code> is <code>INDEFINITE</code>.<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if <code>maxValue</code> is not positive for interactive gauges<DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if <code>maxValue</code> is neither positive nor <code>INDEFINITE</code> for non-interactive gauges<DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if initialValue is not one of <code>CONTINUOUS_IDLE</code>, <code>INCREMENTAL_IDLE</code>, <code>CONTINUOUS_RUNNING</code>, or <code>INCREMENTAL_UPDATING</code> for a non-interactive gauge with indefinite range<DT><B>See Also: </B><DD><A HREF="../../../javax/microedition/lcdui/Gauge.html#INDEFINITE"><CODE>INDEFINITE</CODE></A>, 
<A HREF="../../../javax/microedition/lcdui/Gauge.html#CONTINUOUS_IDLE"><CODE>CONTINUOUS_IDLE</CODE></A>, 
<A HREF="../../../javax/microedition/lcdui/Gauge.html#INCREMENTAL_IDLE"><CODE>INCREMENTAL_IDLE</CODE></A>, 
<A HREF="../../../javax/microedition/lcdui/Gauge.html#CONTINUOUS_RUNNING"><CODE>CONTINUOUS_RUNNING</CODE></A>, 
<A HREF="../../../javax/microedition/lcdui/Gauge.html#INCREMENTAL_UPDATING"><CODE>INCREMENTAL_UPDATING</CODE></A></DL>
</DD>
</DL>

<!-- ============ 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="setLabel(java.lang.String)"><!-- --></A><H3>
setLabel</H3>
<PRE>
public void <B>setLabel</B>(<A HREF="../../../java/lang/String.html">String</A>&nbsp;label)</PRE>
<DL>
<DD>Sets the label of the <code>Item</code>. If <code>label</code> is <code>null</code>, specifies that this item has no label.  <p>It is illegal to call this method if this <code>Item</code> is contained within  an <code>Alert</code>.</p><DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/microedition/lcdui/Item.html#setLabel(java.lang.String)">setLabel</A></CODE> in class <CODE><A HREF="../../../javax/microedition/lcdui/Item.html">Item</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>label</CODE> - the label string<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/IllegalStateException.html">IllegalStateException</A></CODE> - if this <code>Item</code> is contained  within an <code>Alert</code><DT><B>See Also: </B><DD><A HREF="../../../javax/microedition/lcdui/Item.html#getLabel()"><CODE>Item.getLabel()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setLayout(int)"><!-- --></A><H3>
setLayout</H3>
<PRE>
public void <B>setLayout</B>(int&nbsp;layout)</PRE>
<DL>
<DD>Sets the layout directives for this item. <p>It is illegal to call this method if this <code>Item</code>  is contained within an <code>Alert</code>.</p><DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/microedition/lcdui/Item.html#setLayout(int)">setLayout</A></CODE> in class <CODE><A HREF="../../../javax/microedition/lcdui/Item.html">Item</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>layout</CODE> - a combination of layout directive values for this item<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if the value of layout is not a valid combination of layout directives<DD><CODE><A HREF="../../../java/lang/IllegalStateException.html">IllegalStateException</A></CODE> - if this <code>Item</code> is contained within an <code>Alert</code><DT><B>Since: </B><DD>MIDP 2.0</DD>
<DT><B>See Also: </B><DD><A HREF="../../../javax/microedition/lcdui/Item.html#getLayout()"><CODE>Item.getLayout()</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>Adds a context sensitive <code>Command</code> to the item.  The semantic type of <code>Command</code> should be <code>ITEM</code>. The implementation  will present the command only when the the item is active, for example, highlighted. <p> If the added command is already in the item (tested by comparing the object references), the method has no effect. If the item is actually visible on the display, and this call affects the set of visible commands, the implementation should update the display as soon as it is feasible to do so. <p>It is illegal to call this method if this <code>Item</code> is contained within an <code>Alert</code>.</p><DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/microedition/lcdui/Item.html#addCommand(javax.microedition.lcdui.Command)">addCommand</A></CODE> in class <CODE><A HREF="../../../javax/microedition/lcdui/Item.html">Item</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/IllegalStateException.html">IllegalStateException</A></CODE> - if this <code>Item</code> is contained within an <code>Alert</code><DD><CODE><A HREF="../../../java/lang/NullPointerException.html">NullPointerException</A></CODE> - if cmd is <code>null</code><DT><B>Since: </B><DD>MIDP 2.0</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="setItemCommandListener(javax.microedition.lcdui.ItemCommandListener)"><!-- --></A><H3>
setItemCommandListener</H3>
<PRE>
public void <B>setItemCommandListener</B>(<A HREF="../../../javax/microedition/lcdui/ItemCommandListener.html">ItemCommandListener</A>&nbsp;l)</PRE>
<DL>
<DD>Sets a listener for <code>Commands</code> to this Item,  replacing any previous <code>ItemCommandListener</code>. A <code>null</code> reference  is allowed and has the effect of removing any existing listener. <p>It is illegal to call this method if this <code>Item</code>  is contained within an <code>Alert</code>.</p><DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/microedition/lcdui/Item.html#setItemCommandListener(javax.microedition.lcdui.ItemCommandListener)">setItemCommandListener</A></CODE> in class <CODE><A HREF="../../../javax/microedition/lcdui/Item.html">Item</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>l</CODE> - the new listener, or <code>null</code>.<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/IllegalStateException.html">IllegalStateException</A></CODE> - if this <code>Item</code> is contained within an <code>Alert</code><DT><B>Since: </B><DD>MIDP 2.0</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="setPreferredSize(int, int)"><!-- --></A><H3>
setPreferredSize</H3>
<PRE>
public void <B>setPreferredSize</B>(int&nbsp;width,                             int&nbsp;height)</PRE>
<DL>
<DD>Sets the preferred width and height for this <code>Item</code>. Values for width and height less than <code>-1</code> are illegal. If the width is between zero and the minimum width, inclusive, the minimum width is used instead. If the height is between zero and the minimum height, inclusive, the minimum height is used instead. <p>Supplying a width or height value greater than the minimum width or 

⌨️ 快捷键说明

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