亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? gauge.java

?? 有關j2me的很好的例子可以研究一下
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/* * @(#)Gauge.java	1.73 01/08/09 * Copyright (c) 1999-2001 Sun Microsystems, Inc. All Rights Reserved. * * This software is the confidential and proprietary information of Sun * Microsystems, Inc. ("Confidential Information").  You shall not * disclose such Confidential Information and shall use it only in * accordance with the terms of the license agreement you entered into * with Sun. * * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR * PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING * THIS SOFTWARE OR ITS DERIVATIVES. */package javax.microedition.lcdui;/** * <P>The Gauge class implements a bar graph display of a value intended for * use in a form. Gauge is optionally * interactive. The values accepted by the object are small integers in the * range zero through a maximum value established by the application. The * application is expected to normalize its values into this range. The * device is expected to normalize this range into a smaller set of values for * display purposes. Doing so will not change the actual value contained * within the object. 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> * * <P>For example, consider a Gauge object that has a range of values from zero * to 99, running on a device that displays the Gauge's 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 19, three bars for * values 20 through 29, and so forth. </p> * * <P>A Gauge may be interactive or non-interactive. Applications may set or * retrieve the Gauge's 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. * An expected use of the non-interactive mode is as a "progress indicator" to * give the user some feedback as progress occurs during a long-running * operation. The application is expected to update the value periodically * using the setValue() method. An application using the Gauge as a progress * indicator should typically also attach a * {@link Command#STOP STOP} * command to the Form containing the Gauge to allow the user to halt the * operation in progress. * </p> */public class Gauge extends Item {    /** The current value of this gauge */    private int value;    /** The maximum possible value of this gauge */    private int maxValue;    /** Wether this gauge is interactive or not */    private boolean interactive;    /** The number of blocks making up this gauge */    private int blockCount;    /**     * The buffer of horizontal space to split on     * either side of this gauge (creating left/right margins)     */    private static final int BLOCK_SPACE    = 8;    /**     * Greatest height, in pixels, this gauge will     * occupy on screen     */    private static final int GAUGE_HEIGHT   = 25;    /**     * The numerical value assigned to each block.     * The number of blocks (blockCount) times the     * value of each block (valueOfEachBlock) shall     * equal the maximum value of this gauge (maxValue)     */    private int valueOfEachBlock;    /** Gauge overall height */    private int height;    /**     * <p>Creates a new Gauge object with the given label, in interactive or     * non-interactive mode, with the given maximum and initial values. The     * maximum value must be greater than zero, otherwise an exception is     * thrown.  The initial value must be within the range zero to maxValue,     * inclusive.  If the initial value is less than zero, the value is set to     * zero.  If the initial value is greater than maxValue, it is set to     * maxValue.</p>     *     * @param label the Gauge's label     * @param interactive tells whether the user can change the value     * @param maxValue the maximum value     * @param initialValue the initial value in the range [0..maxValue]     * @throws IllegalArgumentException if maxValue is invalid     */    public Gauge(String label, boolean interactive, int maxValue,                 int initialValue)    {        // This super.constructor call guarantees that our layouts[] is        // non-null and that index 0 contains a StringLayout        super(label, 1);        synchronized (Display.LCDUILock) {            this.interactive = interactive;            this.value = initialValue;            setMaxValueImpl(maxValue);        }    }    // public implementation    /**     * <p>Sets the current value of this Gauge object. If the value is less     * than zero, zero is used. If the current value is greater than the     * maximum value, the current value is set to be equal to the maximum     * value. </p>     *     * @param value the new value     *     * @see #getValue     */    public void setValue(int value) {        synchronized (Display.LCDUILock) {            this.value = value;            checkValue();            contentChanged(0, height - (GAUGE_HEIGHT + 5), 0);        }    }    /**     * <p>Gets the current value of this Gauge object.</p>     *     * @return current value of the Gauge     *     * @see #setValue     */    public int getValue() {        // SYNC NOTE: return of atomic value, no locking necessary        return value;    }    /**     * <p>Sets the maximum value of this Gauge object.  The new maximum value     * must be greater than zero, otherwise an exception is thrown.  If the     * current value is greater than new maximum value, the current value is     * set to be equal to the new maximum value.</p>     *     * @param maxValue the new maximum value     *     * @throws IllegalArgumentException if maxValue is invalid     *      * @see #getMaxValue     */    public void setMaxValue(int maxValue) {        synchronized (Display.LCDUILock) {            setMaxValueImpl(maxValue);        }    }    /**     * <p>Gets the maximum value of this Gauge object.</p>     *     * @return the maximum value of the Gauge     *     * @see #setMaxValue     */    public int getMaxValue() {        // SYNC NOTE: return of atomic value, no locking necessary        return maxValue;    }    /**     * <p>Tells whether the user is allowed to change the value of the Gauge.     * </p>     *     * @return a boolean indicating whether the Gauge is interactive     */    public boolean isInteractive() {        // SYNC NOTE: return of atomic value, no locking necessary        return interactive;    }    /**     * Sets the label of the Item. If label is null, specifies that this     * item has no label.     * @param label the label string     */    public void setLabel(String label) {        synchronized (Display.LCDUILock) {            super.setLabel(label);            int deltaHeight = ((StringLayout)layouts[0]).setString(label);            height += deltaHeight;            contentChanged(0, 0, deltaHeight);        }    }    // package private implementation    /**     * Paint this Gauge     *     * @param g The Graphics to paint to     */    void paint(Graphics g) {        g.setColor(Display.ERASE_COLOR);        g.fillRect(g.getClipX(), 0, g.getClipWidth(), height);        // We need to check the clip to determine if        // the label needs painting        int layoutHeight = layouts[0].getHeight();        if (g.getClipY() < layoutHeight) {            layouts[0].paint(g, false, false);        }        g.translate(0, layoutHeight);        // Depending on the clip, we may need to repaint        // only some or all of the blocks.        int startBlock = 0;        int stopBlock = blockCount;        if (g.getClipX() > 0) {            startBlock = (g.getClipX() - 6) / BLOCK_SPACE;        }        if (g.getClipWidth() == BLOCK_SPACE - 3) {            // We just need to paint 1 bar            stopBlock = startBlock + 1;            // NOTE: We're a little careless here. It could            // be possible that the clip contains several            // bars rather than one. If this is the case,            // we paint from the start bar to the end of            // the gauge, rather than figure the more precise            // end bar. Its not possible with the current            // emulator but it may be on some platforms.        }        if (hasFocus()) {            g.setColor(Display.FG_COLOR);        } else {            g.setColor(0x00606060); // dark gray            // Keep in mind that on a 1-bit display, dark gray will            // round to black        }        //        // these values are used in calculating the blockHeight        // they only need to be calculated once every paint        //        int bc  = blockCount - 1;        int bc2 = bc * bc;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩一级精品视频在线观看| 美腿丝袜亚洲三区| 成人福利视频在线| 亚洲欧洲精品天堂一级| 国产精品18久久久久久久久| 精品国产不卡一区二区三区| 成人福利视频在线看| 亚洲欧美日韩国产综合| 欧美日韩精品一区二区三区| 亚洲午夜在线电影| 欧美男人的天堂一二区| 秋霞av亚洲一区二区三| 2020国产精品| 色综合久久中文综合久久97 | 欧美一卡二卡三卡四卡| 国产日韩欧美精品一区| 日韩1区2区日韩1区2区| 亚洲一二三四在线| 成人激情av网| 中文字幕不卡三区| 欧美综合一区二区| 国内精品国产三级国产a久久 | 在线亚洲欧美专区二区| 琪琪久久久久日韩精品| 国产精品色哟哟| 欧美喷潮久久久xxxxx| 国产一区二区不卡在线| 一区二区三区在线视频免费| 精品国产一区a| 91黄色免费看| 国产在线一区观看| 亚洲视频一区二区在线| 91精品国产综合久久久久久漫画| 国产一区二区不卡| 亚洲色图一区二区三区| 欧美一区二区成人6969| 99久久99久久免费精品蜜臀| 蜜臀av亚洲一区中文字幕| 国产精品美女久久久久久久| 在线观看日韩电影| 国产成人av电影在线观看| 日本成人在线网站| 亚洲美女偷拍久久| 欧美精品一区二区三区蜜桃视频| 色噜噜久久综合| 激情综合网天天干| 国产人久久人人人人爽| 欧美久久久久中文字幕| 91片在线免费观看| 精品无人区卡一卡二卡三乱码免费卡| 一区二区三区蜜桃| 国产亚洲精品超碰| 欧美电影免费观看高清完整版| 日本高清不卡一区| 99riav久久精品riav| 国产黄色成人av| 狠狠色丁香婷婷综合| 日韩av一级片| 日日欢夜夜爽一区| 午夜日韩在线观看| 亚洲一区二区五区| 一区二区三区电影在线播| 亚洲人成电影网站色mp4| 国产精品欧美一区喷水| 国产欧美日韩不卡| 久久久久国色av免费看影院| 日韩欧美高清dvd碟片| 欧美一区在线视频| 欧美电影一区二区| 91精品婷婷国产综合久久性色| 欧洲一区二区av| 欧美丝袜丝交足nylons| 欧美日韩一区二区三区在线 | 国产麻豆成人传媒免费观看| 久草精品在线观看| 精品亚洲aⅴ乱码一区二区三区| 美女脱光内衣内裤视频久久网站| 免费在线观看精品| 九一久久久久久| 韩国精品主播一区二区在线观看| 国产专区欧美精品| 粉嫩久久99精品久久久久久夜| 丁香啪啪综合成人亚洲小说 | 在线观看中文字幕不卡| 欧美影院精品一区| 欧美精品成人一区二区三区四区| 欧美男男青年gay1069videost | 亚洲精品一区二区三区蜜桃下载| 久久久噜噜噜久久人人看 | 不卡的av电影在线观看| 一本色道a无线码一区v| 911国产精品| 欧美成人午夜电影| 国产亚洲欧美一区在线观看| 国产精品高潮呻吟久久| 一区二区三区 在线观看视频| 五月天丁香久久| 久久国产视频网| 成人午夜在线播放| 欧美亚洲免费在线一区| 欧美一级在线观看| 亚洲国产精品传媒在线观看| 亚洲欧美日韩国产综合在线 | 日韩女优制服丝袜电影| 国产午夜精品久久久久久免费视| 国产精品国产三级国产aⅴ原创| 又紧又大又爽精品一区二区| 无码av中文一区二区三区桃花岛| 另类中文字幕网| 国产成人精品三级| 欧美综合天天夜夜久久| 久久综合999| 亚洲一级二级在线| 国产伦精一区二区三区| 在线精品国精品国产尤物884a| 精品国产一二三区| 亚洲国产成人av网| 国产高清久久久| 欧美色视频在线观看| 国产欧美精品在线观看| 亚洲国产精品天堂| 懂色av噜噜一区二区三区av| 51精品视频一区二区三区| 欧美国产禁国产网站cc| 午夜av一区二区三区| 成人黄色小视频| 欧美一级高清片在线观看| 亚洲色图欧洲色图| 国内精品写真在线观看| 欧美性一二三区| 国产色婷婷亚洲99精品小说| 视频一区二区三区在线| 一本大道久久a久久综合| 精品成a人在线观看| 亚洲1区2区3区视频| 91在线观看下载| 欧美精品一区二区三区蜜桃视频 | 日韩va欧美va亚洲va久久| av资源网一区| 久久女同互慰一区二区三区| 亚洲成va人在线观看| 91免费观看国产| 久久精品一区二区三区av| 日韩av电影天堂| 欧美日韩一本到| 伊人性伊人情综合网| 菠萝蜜视频在线观看一区| 久久这里只有精品6| 麻豆精品视频在线观看| 欧美一区三区四区| 午夜精品成人在线| 欧美系列日韩一区| 亚洲码国产岛国毛片在线| 成人高清视频在线| 久久精品日韩一区二区三区| 精品影院一区二区久久久| 日韩一区二区免费高清| 丝袜亚洲另类丝袜在线| 欧美日韩国产一级片| 亚洲成人一区在线| 欧美日韩激情一区二区三区| 亚洲国产精品一区二区久久恐怖片| 色伊人久久综合中文字幕| 亚洲日本一区二区三区| 91视频免费看| 亚洲欧美日本韩国| 在线不卡免费av| 日本不卡一二三| 欧美一级午夜免费电影| 午夜精品成人在线| 欧美一区永久视频免费观看| 另类小说综合欧美亚洲| 精品国产网站在线观看| 国产盗摄一区二区三区| 中文字幕中文字幕一区| 91网址在线看| 亚洲成人免费电影| 欧美zozo另类异族| 国产一区二区电影| 国产精品久久久久久亚洲毛片| 波多野结衣的一区二区三区| 日韩毛片一二三区| 欧美日韩一区中文字幕| 久久成人久久鬼色| 国产视频一区二区三区在线观看| 波多野结衣在线一区| 亚洲精品国产视频| 日韩一区二区中文字幕| 国产毛片一区二区| 亚洲欧美日韩国产另类专区| 欧美日韩在线播放三区| 国产一区福利在线| 亚洲欧美一区二区在线观看| 欧美日韩精品欧美日韩精品一 | 亚洲国产精品一区二区久久| 日韩精品一区二区三区视频| 丁香激情综合国产| 亚洲成av人片观看| 国产欧美一区二区三区在线看蜜臀| 91在线看国产|