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

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

?? gauge.java

?? 有關j2me的很好的例子可以研究一下
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
        for (int i = startBlock; i < stopBlock; i++) {            int blockHeight;            if (interactive && blockCount > 1) {                //                // this implements a quadratic spline from                // p0 to p2 using p1 as a control point to                // affect the curve                //                // int p0 = 5,                 // minimum height                //     p1 = 1,                 // control point                //     p2 = GAUGE_HEIGHT - p0; // maximum height                //                 // the original equation is below, but the one used                // has been expanded to use the p values above                //                // blockHeight = p0 +                //     (2 * p1 * i * (bc - i) / bc2) +                 //     ((p2 * (i * i)) / bc2);                //                blockHeight = 5 +                               (((i * (bc - i)) << 1) / bc2) +                               (((GAUGE_HEIGHT - 5) * (i * i)) / bc2);            } else {                blockHeight = GAUGE_HEIGHT;            }            if ((valueOfEachBlock * (i + 1)) > value && value != maxValue)            {                if (hasFocus()) {                    g.drawRect((i * BLOCK_SPACE) + 6,                                GAUGE_HEIGHT - blockHeight,                               BLOCK_SPACE - 3, blockHeight);                } else {                    g.setStrokeStyle(Graphics.DOTTED);                    g.drawRect((i * BLOCK_SPACE) + 6,                                GAUGE_HEIGHT - blockHeight,                               BLOCK_SPACE - 3, blockHeight);                    g.setStrokeStyle(Graphics.SOLID);                }            } else {                g.fillRect((i * BLOCK_SPACE) + 6,                            GAUGE_HEIGHT - blockHeight,                           BLOCK_SPACE - 3, blockHeight);            }        }        g.translate(0, -layoutHeight);        setHorizontalScroll();    }    /**     * Signal this Gauge that its focus has changed     * (either gained or lost focus)     */    void focusChanged() {        if (!hasFocus()) {            // We have lost the focus, so we need to re-set            // the right/left arrows, as the next component            // to receive focus may not use the left/right            // arrows at all, and Screen no longer re-sets            // the horizontal arrows for us            getOwner().setHorizontalScroll(0, 100);        }        super.focusChanged();    }    /**     * Set the width for this Guage     *     * @param width The width to set this Gauge to     * @return int The height required to display this Gauge in the     *              given width     */    int setWidth(int width) {        height = GAUGE_HEIGHT + 5;        height += layouts[0].setWidth(width);        return height;    }    /**     * Get the height of this Gauge     *     * @return int The height of this Gauge     */    int getHeight() {        return height;    }    /**     * Handle a key press     *     * @param keyCode The key that was pressed     * @return boolean A flag indicating the key pressed was handled     *                  by this Gauge     */    boolean keyPressed(int keyCode) {        if (!interactive) {            return false;        }        if ((Display.getGameAction(keyCode) ==  Canvas.LEFT) ||            (Display.getGameAction(keyCode) ==  Canvas.RIGHT))        {            // There are two cases where we need to repaint a            // block when a user changes a Gauge's value:            // 1. If the user is increasing the Gauge's value            //    and the value increases such that a new bar            //    needs to be filled in. The easy test for this            //    is: value % valueOfEachBlock == 0, indicating            //    the value has increased precisely enough to            //    fill in an entire block.            //            // 2. If the user is decreasing the Gauge's value            //    and the value decreases such that a currently            //    filled in bar needs to be un-filled. The easy            //    test for this is:            //    (value + 1) % valueOfEachBlock == 0, indicating            //    we have just decreased 1 unit below a full            //    block.            int blockToRepaint = -1;            int oldValue = value;            if (Display.getGameAction(keyCode) == Canvas.LEFT) {                if (value % valueOfEachBlock == 0) {                    blockToRepaint = (value / valueOfEachBlock) - 1;                } else if (value == maxValue) {                    blockToRepaint = blockCount - 1;                }                value--;            } else {                value++;                if (value % valueOfEachBlock == 0) {                    blockToRepaint = (value / valueOfEachBlock) - 1;                } else if (value == maxValue) {                    blockToRepaint = blockCount - 1;                }            }            checkValue();            // There's no need to cause a repaint if none of the            // blocks either need to be filled in or need to be            // un-filled.            if (blockToRepaint < 0 || blockToRepaint >= blockCount) {                setHorizontalScroll();                return value != oldValue;            }            // We need to remember to offset by the height of our            // label if there is one.            int blockY = 0;            blockY = layouts[0].getHeight();            // Cause a repaint of only the bar which needs updating            repaint(blockToRepaint * BLOCK_SPACE + 6, blockY,                    BLOCK_SPACE - 2, GAUGE_HEIGHT + 2);            return value != oldValue;        }        return false;    }    // private implementation    /**     * Set the number of blocks rendered by this Gauge. This     * will use the width of the display and calculate the     * blockCount value.     */    private void setBlockCount() {        this.blockCount = (Display.WIDTH - 8) / BLOCK_SPACE;        if (blockCount > maxValue) {            blockCount = maxValue;        }    }    /**     * Set the value of each block. This will use the     * blockCount value and maxValue to assign a value     * to each block.     */    private void setBlockValue() {        valueOfEachBlock = 1;        if (maxValue <= blockCount) {            return;        }        valueOfEachBlock = maxValue / blockCount;        if (maxValue % blockCount != 0) {            valueOfEachBlock++;        }        // There's a case when our max is close to        // a multiple of our value per block (ie 50        // as a max value, 4 or 5 as a value per block).        // In this case, we decrease the number of blocks        // and make each block an even value        // (5, using the above example).        blockCount = maxValue / valueOfEachBlock;        if (maxValue % valueOfEachBlock != 0) {            blockCount++;        }        // If the max was a value like 52, then there        // would be the full number of blocks (11 with        // the RI screen width) and the last block        // would have 2 units of value. The last block        // in the gauge always as as many or less units        // than the other blocks in the gauge.    }    /**     * Set the horizontal "scroll" for this Gauge. Note that     * "scroll" is a bit of a misnomer, but we are turning on     * the left/right indicator arrows on the display to signal     * the user the Gauge can be incremented/decremented.     */    private void setHorizontalScroll() {            // If we have focus and are interactive, we check            // to see if we need to add the right or left arrow            if (hasFocus() && interactive) {                // NOTE: I couldn't think offhand how to do an                // accurate proportion value, so I just use 50                int scrollPosition = value * 100 / maxValue;                // Fix the rounding error                if (value > 0 && scrollPosition == 0) {                    scrollPosition = 1;            }                getOwner().setHorizontalScroll(scrollPosition, (50));            }    }    /**     * Utility method to ensure the value of the Gauge is always     * in a range of 0 to maxValue     *     * @return int The corrected version of the current value     */    private int checkValue() {        if (value < 0) {            value = 0;        } else if (value > maxValue) {            value = maxValue;        }        return value;    }    /**     * Set the max value of this Gauge     *     * @param maxValue The maximum value to set for this Gauge     */    private void setMaxValueImpl(int maxValue) {        if (maxValue <= 0) {            throw new IllegalArgumentException();        }        this.maxValue = maxValue;        checkValue();        // If the max value changes, the block count needs        // to be re-calculated        setBlockCount();        setBlockValue();        contentChanged(0, height - (GAUGE_HEIGHT + 5), 0);    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本不卡一二三区黄网| 国产一区二区不卡| 久久久久久久综合日本| 99re这里只有精品6| 日本不卡123| 国产精品大尺度| 欧美精品1区2区3区| 国产成a人亚洲精| 日韩电影免费在线观看网站| 国产精品久久久久久久久久免费看| 欧美精品久久一区二区三区| 99re在线精品| 国产成人精品亚洲日本在线桃色| 午夜视频久久久久久| 亚洲欧洲日韩在线| 精品91自产拍在线观看一区| 欧美三级韩国三级日本一级| av午夜一区麻豆| 国产成人在线色| 免费成人av在线播放| 亚洲国产精品人人做人人爽| 综合激情网...| 国产精品麻豆久久久| xf在线a精品一区二区视频网站| 欧美日韩亚洲综合在线 欧美亚洲特黄一级| 成人短视频下载| 国产精品99久久不卡二区| 蜜臂av日日欢夜夜爽一区| 亚洲一二三专区| 亚洲理论在线观看| 成人免费在线视频观看| 欧美激情在线一区二区三区| 精品捆绑美女sm三区| 日韩三级精品电影久久久| 日韩视频在线你懂得| 91麻豆精品久久久久蜜臀| 欧美高清性hdvideosex| 欧美探花视频资源| 91福利社在线观看| 在线免费观看一区| 欧美制服丝袜第一页| 91国内精品野花午夜精品| 91蝌蚪porny成人天涯| 97久久人人超碰| 91丨porny丨在线| 91视频.com| 色婷婷激情久久| 欧美日韩精品福利| 91精选在线观看| 日韩一区二区麻豆国产| 精品国产电影一区二区 | 欧美福利一区二区| 欧美日韩激情在线| 337p亚洲精品色噜噜狠狠| 日韩一级精品视频在线观看| 欧美大胆一级视频| 国产午夜亚洲精品理论片色戒| 中文字幕国产一区| 中文字幕亚洲不卡| 亚洲一区二区三区国产| 香蕉久久夜色精品国产使用方法| 日韩精品免费视频人成| 精一区二区三区| 成熟亚洲日本毛茸茸凸凹| 92精品国产成人观看免费| 在线视频一区二区三区| 日韩三级精品电影久久久| 国产喂奶挤奶一区二区三区 | 日韩高清电影一区| 久久av老司机精品网站导航| 国产九色精品成人porny| www.亚洲人| 911国产精品| 国产亚洲精品bt天堂精选| 综合精品久久久| 全国精品久久少妇| 国产高清无密码一区二区三区| 97超碰欧美中文字幕| 欧美顶级少妇做爰| 国产欧美一区二区三区在线老狼| 亚洲男人的天堂av| 捆绑调教美女网站视频一区| 波多野结衣欧美| 6080国产精品一区二区| 国产日产精品1区| 午夜久久久久久久久| 成人精品鲁一区一区二区| 91丨九色丨黑人外教| 欧美日韩亚洲综合一区| 久久综合九色综合97_久久久 | 美女视频黄 久久| 成人一级视频在线观看| 欧美日韩一区高清| 国产日韩欧美激情| 亚洲成人综合视频| 国产99精品国产| 91精品久久久久久久91蜜桃| 中文字幕一区二区三区不卡在线 | 欧美精品一区二区精品网| 亚洲欧洲av在线| 久久精品国产免费| 欧美影院精品一区| 国产欧美一区二区精品性色超碰| 亚洲一区二区三区四区不卡| 成人激情图片网| 欧美午夜片在线观看| 久久精品夜色噜噜亚洲a∨| 亚洲h在线观看| 91老司机福利 在线| 久久精品亚洲麻豆av一区二区| 午夜精品久久久久久久久久久| 国产精品不卡视频| 青青草原综合久久大伊人精品优势| 不卡免费追剧大全电视剧网站| 欧美成人综合网站| 亚洲自拍偷拍九九九| 成人av集中营| 国产视频亚洲色图| 青青青伊人色综合久久| 欧美吻胸吃奶大尺度电影| 国产精品全国免费观看高清| 国产在线播放一区| 欧美一区二区三区公司| 亚洲一级二级在线| 色综合天天综合网国产成人综合天| 国产日韩视频一区二区三区| 久久99精品视频| 欧美一区二区三区在线视频| 亚洲不卡一区二区三区| 欧美午夜电影网| 一级日本不卡的影视| 色婷婷精品久久二区二区蜜臂av | 一二三区精品视频| 99精品在线免费| 国产精品三级av| 国产另类ts人妖一区二区| 精品久久久久久最新网址| 青草av.久久免费一区| 91精品国产欧美日韩| 日韩激情视频网站| 欧美精品久久天天躁| 精品蜜桃在线看| 尤物av一区二区| 在线一区二区三区四区| 亚洲狠狠丁香婷婷综合久久久| 色av一区二区| 亚洲超碰精品一区二区| 4438成人网| 日本vs亚洲vs韩国一区三区二区| 911精品产国品一二三产区| 美女被吸乳得到大胸91| 精品国产乱码久久久久久图片| 国内成人免费视频| 久久精品综合网| 波多野结衣一区二区三区| 亚洲男同1069视频| 欧美精品777| 国产一区亚洲一区| 中文字幕在线一区免费| 日本丰满少妇一区二区三区| 亚洲丰满少妇videoshd| 日韩欧美美女一区二区三区| 国产呦精品一区二区三区网站| 国产精品天干天干在线综合| 色94色欧美sute亚洲线路一ni | 亚洲精品国产一区二区精华液 | 日韩和的一区二区| 欧美一级在线免费| 国产精品99久久久| 亚洲精品高清在线| 日韩午夜激情av| 成人美女视频在线观看18| 夜夜嗨av一区二区三区中文字幕 | 99re这里都是精品| 亚洲成人动漫在线免费观看| 精品日韩成人av| 成人永久aaa| 亚洲国产日韩a在线播放| 欧美一级国产精品| 99精品视频在线观看免费| 午夜a成v人精品| 国产无人区一区二区三区| 色8久久人人97超碰香蕉987| 麻豆免费精品视频| 国产精品久久久久久久久快鸭 | 久久九九久久九九| 一本大道久久a久久综合| 青娱乐精品视频| 亚洲丝袜另类动漫二区| 欧美一区二区久久| 大尺度一区二区| 石原莉奈在线亚洲三区| 中文字幕亚洲综合久久菠萝蜜| 欧美久久一二区| www.av精品| 久久福利资源站| 亚洲宅男天堂在线观看无病毒| 精品国产露脸精彩对白| 欧美精品久久天天躁| 一本大道久久a久久综合婷婷|