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

📄 gauge.html

📁 是MIDP 的API 查詢文件, 大家可以看一下裡面的index.html, 再用Package 或 Class 名字來查.
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Wed Sep 24 14:57:49 PDT 2003 -->
<TITLE>
MID Profile: Class  Gauge
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
</HEAD>
<BODY BGCOLOR="white">

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_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/Gauge.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/Form.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../javax/microedition/lcdui/Graphics.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="Gauge.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>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
javax.microedition.lcdui</FONT>
<BR>
Class  Gauge</H2>
<PRE>
<A HREF="../../../java/lang/Object.html">java.lang.Object</A>
  |
  +--<A HREF="../../../javax/microedition/lcdui/Item.html">javax.microedition.lcdui.Item</A>
        |
        +--<B>javax.microedition.lcdui.Gauge</B>
</PRE>
<HR>
<DL>
<DT>public class <B>Gauge</B><DT>extends <A HREF="../../../javax/microedition/lcdui/Item.html">Item</A></DL>

<P>
Implements a graphical display, such as a bar graph, of an integer value.  The <code>Gauge</code> contains a <em>current value</em> that lies between zero and the <em>maximum value</em>, inclusive. The application can control the current value and maximum value. The range of values specified by the application may be larger than the number of distinct visual states possible on the device, so more than one value may have the same visual representation. <P>For example, consider a <code>Gauge</code> object that has a range of values from zero to <code>99</code>, running on a device that displays the <code>Gauge's</code> approximate value using a set of one to ten bars. The device might show one bar for values zero through nine, two bars for values ten through <code>19</code>, three bars for values <code>20</code> through <code>29</code>, and so forth. </p> <P>A <code>Gauge</code> may be interactive or non-interactive. Applications may set or retrieve the <code>Gauge's</code> value at any time regardless of the interaction mode.  The implementation may change the visual appearance of the bar graph depending on whether the object is created in interactive mode. </p> <P>In interactive mode, the user is allowed to modify the value. The user will always have the means to change the value up or down by one and may also have the means to change the value in greater increments.  The user is prohibited from moving the value outside the established range. The expected behavior is that the application sets the initial value and then allows the user to modify the value thereafter. However, the application is not prohibited from modifying the value even while the user is interacting with it. </p> <p> In many cases the only means for the user to modify the value will be to press a button to increase or decrease the value by one unit at a time.  Therefore, applications should specify a range of no more than a few dozen values. </p> <P>In non-interactive mode, the user is prohibited from modifying the value.  Non-interactive mode is used to provide feedback to the user on the state of a long-running operation. One expected use of the non-interactive mode is as a &quot;progress indicator&quot; or &quot;activity indicator&quot; to give the user some feedback during a long-running operation. The application may update the value periodically using the <code>setValue()</code> method. </P> <P>A non-interactive <code>Gauge</code> can have a definite or indefinite range.  If a <code>Gauge</code> has definite range, it will have an integer value between zero and the maximum value set by the application, inclusive.  The implementation will provide a graphical representation of this value such as described above.</p> <P>A non-interactive <code>Gauge</code> that has indefinite range will exist in one of four states: continuous-idle, incremental-idle, continuous-running, or incremental-updating. These states are intended to indicate to the user that some level of activity is occurring.  With incremental-updating, progress can be indicated to the user even though there is no known endpoint to the activity.  With continuous-running, there is no progress that gets reported to the user and there is no known endpoint; continuous-running is merely a busy state indicator. The implementation should use a graphical display that shows this appropriately.  The implementation may use different graphics for indefinite continuous gauges and indefinite incremental gauges. Because of this, separate idle states exist for each mode.  For example, the implementation might show an hourglass or spinning watch in the continuous-running state, but show an animation with different states, like a beach ball or candy-striped bar, in the incremental-updating state.</p> <p>In the continuous-idle or incremental-idle state, the <code>Gauge</code> indicates that no activity is occurring. In the incremental-updating state, the <code>Gauge</code> indicates activity, but its graphical representation should be updated only when the application requests an update with a call to <code>setValue()</code>.  In the continuous-running state, the <code>Gauge</code> indicates activity by showing an animation that runs continuously, without update requests from the application.</p> <p>The values <code>CONTINUOUS_IDLE</code>, <code>INCREMENTAL_IDLE</code>, <code>CONTINUOUS_RUNNING</code>, and <code>INCREMENTAL_UPDATING</code> have their special meaning only when the <code>Gauge</code> is non-interactive and has been set to have indefinite range.  They are treated as ordinary values if the <code>Gauge</code> is interactive or if it has been set to have a definite range.</p> <P>An application using the <code>Gauge</code> as a progress indicator should typically also attach a <A HREF="../../../javax/microedition/lcdui/Command.html#STOP"><CODE>STOP</CODE></A> command to the container containing the <code>Gauge</code> to allow the user to halt the operation in progress.</p> <h3>Notes for Application Developers</h3>  <P>As mentioned above, a non-interactive <code>Gauge</code> may be used to give user feedback during a long-running operation.  If the application can observe the progress of the operation as it proceeds to an endpoint known in advance, then the application should use a non-interactive <code>Gauge</code> with a definite range.  For example, consider an application that is downloading a file known to be <code>20</code> kilobytes in size.  The application could set the <code>Gauge's</code> maximum value to be <code>20</code> and set its value to the number of kilobytes downloaded so far.  The user will be presented with a <code>Gauge</code> that shows the portion of the task completed at any given time.</P> <P>If, on the other hand, the application is downloading a file of unknown size, it should use a non-interactive <code>Gauge</code> with indefinite range.  Ideally, the application should call <CODE>setValue(INCREMENTAL_UPDATING)</CODE> periodically, perhaps each time its input buffer has filled.  This will give the user an indication of the rate at which progress is occurring.</P> <P>Finally, if the application is performing an operation but has no means of detecting progress, it should set a non-interactive <code>Gauge</code> to have indefinite range and set its value to <CODE>CONTINUOUS_RUNNING</CODE> or <CODE>CONTINUOUS_IDLE</CODE> as appropriate.  For example, if the application has issued a request to a network server and is about to block waiting for the server to respond, it should set the <code>Gauge's</code> state to <CODE>CONTINUOUS_RUNNING</CODE> before awaiting the response, and it should set the state to <CODE>CONTINUOUS_IDLE</CODE> after it has received the response.</P>
<P>
<DL>
<DT><B>Since: </B><DD>MIDP 1.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>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/lcdui/Gauge.html#CONTINUOUS_IDLE">CONTINUOUS_IDLE</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The value representing the continuous-idle state of a non-interactive <code>Gauge</code> with indefinite range.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/lcdui/Gauge.html#CONTINUOUS_RUNNING">CONTINUOUS_RUNNING</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The value representing the continuous-running state of a non-interactive <code>Gauge</code> with indefinite range.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/lcdui/Gauge.html#INCREMENTAL_IDLE">INCREMENTAL_IDLE</A></B></CODE>

⌨️ 快捷键说明

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