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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? policy.java

?? 有關(guān)j2me的很好的例子可以研究一下
?? JAVA
字號(hào):
/* * @(#)Policy.java	1.43 01/07/17 * 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;/** * abstract superclass for all policies. * It is expected that each constraint type will have an * associated policy.  For example, PASSWORD | NUMBER and * PASSWORD | ANY might have their own policies, rather than * overloading the ones that are is used for general wrapping * of text and editing of numbers.  This especially makes sense * since PASSWORD | NUMBER probably should not support sign * changes. */abstract class Policy {    /** The Font for rendering */    Font f;    /** The line height (in pixels) */    int lineHeight;    /** The width of the layout */    int width = -1; // this is used to determine if layout was done    /** The height to display this policy */    int height;    /** The y coordinate of the cursor */    int cursorY;    /** The x coordinate of the cursor */    int cursorX;    /**     * Construct a new Policy with the given Font     *     * @param f The Font to use for rendering     */    Policy(Font f) {        this.f = f;        lineHeight  = f.getHeight();    }    /**     * This routine makes sure chars are valid     *     * @param buffer The buffer containing the characters     * @param offset The start of the characters in the buffer     * @param length The length of the characters in the buffer     * @return boolean True if all the characters in the buffer are     *                  valid for this policy     */    boolean validateContent(char[] buffer, int offset, int length) {        return true;    }    /**     * Return the constrained size of the buffer     *     * @param size The constrained size of the buffer     * @param buffer The char array buffer     * @return int By default, just returns 'size'     */    int constrainedSize(int size, char buffer[]) {        return size;    }    /**     * Signal this policy the content has changed     *     * @param buf The character array buffer     * @param numChars The number of characters effected     * @param fromPos The start position of the change in the buffer     * @param curPos The current position of the cursor in the buffer     * @return delta height by which Policy height has changed     */    int contentChanged(char[] buf, int numChars, int fromPos, int curPos) {        return 0;    }    /**     * Set the width for this policy     *     * @param width The new width     * @param buf The character array buffer     * @param numChars The number of chars in the buffer     * @param curPos The current cursor position in the buffer     * @return new height after width was set     */    int setWidth(int width, char[] buf, int numChars, int curPos) {        this.width = width;        contentChanged(buf, numChars, 0, curPos);        return height;    }    /**     * Paint this Policy     *     * @param g The Graphics object to paint to     * @param buf The character array     * @param numChars The number of characters in the buffer     * @param cursorEnabled A flag indicating the cursor is enabled     * @param cursorPos The index of the cursor location in the buffer     * @param noCharShow A flag indicating characters should not be shown     *                  in plaintext.     */    abstract void paint(Graphics g, char[] buf, int numChars, 			boolean cursorEnabled, int cursorPos, 			boolean noCharShow);    /**     * Move the cursor     *     * @param dir The direction to move     * @param cursorPos The position of the cursor     * @param buf The character buffer to traverse     * @param numChars The number of characters in the buffer     * @return int The new location of the cursor     */    int moveCursor(int dir, int cursorPos, char[] buf, int numChars) {        return cursorPos;    }    /**     * Get a new policy based on the constraint     *     * @param constraint The type of policy constraint to get a Policy for     * @return Policy The Policy representing the given constraing     */    static Policy getPolicy(int constraint) {        Policy newPolicy;        boolean passEnabled = false;        Font defaultFont = Font.getDefaultFont();        if ((constraint & TextField.PASSWORD) != 0) {            passEnabled = true;        }        switch (constraint & TextField.CONSTRAINT_MASK) {            case TextField.ANY:            case TextField.URL:            case TextField.EMAILADDR:                if (passEnabled) {                    newPolicy = new PassTextPolicy(defaultFont);                } else {                    newPolicy = new TextPolicy(defaultFont);                }                break;            case TextField.NUMERIC:                if (passEnabled) {                    newPolicy = new PassNumericPolicy(defaultFont);                } else {                    newPolicy = new NumericPolicy(defaultFont);                }                break;            case TextField.PHONENUMBER:                if (passEnabled) {                    newPolicy = new PassNumericPolicy(defaultFont) {                        /**                         * Validate the content of this policy                         *                         * @param buffer The char buffer                         * @param offset The start of the data in the buffer                         * @param length The length of the data in the buffer                         * @return boolean True if the buffer contains only                         *                  valid characters for this Policy                         */                        boolean validateContent(char[] buffer, int offset,                                                int length) {                            for (int i = offset; i < (offset + length); i++) {                                char c = buffer[i];                                if (((c < '0') || (c > '9')) &&                                    (!(c == '#' || c == '*' || c == '+'))) {                                    return false;                                }                            }                            return true;                        }                    };                } else {                    newPolicy = new PhonePolicy(defaultFont);                }                break;            default:                throw new IllegalArgumentException();        }        return newPolicy;    }    /**     * Get the maximum width for this policy     *     * @param allowedWidth The maximum allowed width (in pixels)     * @param maxSize The maximum allowed size (in chars)     * @return int The maximum width of this policy     */    int getMaxWidth(int allowedWidth, int maxSize) {        int w = f.charWidth('W') * maxSize;        if (w < allowedWidth) {            return w;        }        return allowedWidth;    }    /**     * Get the minimum height required to display this policy     *     * @param height     * @return int The minimum height required to display this policy     */    int getMinimumHeight(int height) {        return 2 * lineHeight;    }}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产91在线|亚洲| 九一九一国产精品| 国产不卡在线视频| 一本一本大道香蕉久在线精品| 国产一本一道久久香蕉| 亚洲欧美另类久久久精品2019| 在线看一区二区| 久久精品国产一区二区三| 香蕉成人伊视频在线观看| 亚洲精品欧美综合四区| 免播放器亚洲一区| 91视频你懂的| av亚洲精华国产精华精华| 成人a级免费电影| 高清国产午夜精品久久久久久| 国产一区美女在线| 国产精品一区二区三区乱码| 国产精品一区二区91| jlzzjlzz欧美大全| 91在线免费视频观看| 欧美性生交片4| 国产原创一区二区三区| 日韩av二区在线播放| 奇米影视一区二区三区| 亚洲国产一区二区三区青草影视| 国产精品福利一区二区三区| 亚洲激情成人在线| 99精品欧美一区二区三区小说 | 午夜天堂影视香蕉久久| 日韩精品一二三四| 轻轻草成人在线| 国产毛片精品国产一区二区三区| 成人免费av在线| 在线观看一区不卡| 日韩精品一区二区在线| 国产精品水嫩水嫩| 亚洲影院理伦片| 久久国产麻豆精品| 岛国av在线一区| 欧美无乱码久久久免费午夜一区 | 欧美激情一区二区三区| 国产精品成人一区二区艾草| 天天影视网天天综合色在线播放| 精品亚洲国产成人av制服丝袜 | 欧美剧情片在线观看| 久久亚洲精精品中文字幕早川悠里 | 成人av在线资源| 欧美性生活大片视频| 久久久国产精品麻豆| 一区二区三区久久| 国产一区二区剧情av在线| 精品久久久久一区二区国产| 亚洲欧美在线观看| 蜜桃一区二区三区在线观看| 95精品视频在线| 日韩欧美www| 一区二区三区国产豹纹内裤在线| 久草热8精品视频在线观看| 色噜噜狠狠成人网p站| 精品国产一二三| 亚洲图片欧美色图| 国产成人自拍在线| 7777精品伊人久久久大香线蕉完整版| 国产欧美va欧美不卡在线| 五月婷婷综合网| 91日韩在线专区| 久久久久久毛片| 日韩国产精品久久| 在线观看成人小视频| 国产日产精品一区| 九一九一国产精品| 日韩午夜精品视频| 亚洲一区二区在线视频| 成人免费视频caoporn| 日韩欧美一卡二卡| 亚洲成a天堂v人片| 色天天综合色天天久久| 国产欧美日韩在线观看| 美日韩一区二区三区| 欧美四级电影网| 日韩久久一区二区| 国产成人aaa| 久久女同互慰一区二区三区| 视频一区国产视频| 欧美日韩一区二区三区四区五区 | 亚洲国产成人精品视频| 97精品久久久久中文字幕 | 亚洲一区二区中文在线| 91丨porny丨最新| 国产精品日韩成人| 狠狠网亚洲精品| 精品成人一区二区三区四区| 美女网站在线免费欧美精品| 9191国产精品| 日韩精品一卡二卡三卡四卡无卡| 色久优优欧美色久优优| 亚洲欧美日韩系列| 91久久线看在观草草青青| 国产精品久久久久久久蜜臀| 成人免费av网站| 国产精品久久久久婷婷二区次 | 中文字幕不卡在线观看| 国产成人精品aa毛片| 国产三级精品视频| 国产a级毛片一区| 国产亚洲自拍一区| 粉嫩嫩av羞羞动漫久久久| 国产精品伦理在线| 99久久er热在这里只有精品15| 日本在线不卡视频一二三区| 51午夜精品国产| 日韩影院免费视频| 精品蜜桃在线看| 国产成人精品一区二| 国产精品视频看| 色综合欧美在线视频区| 亚洲自拍偷拍图区| 日韩一区二区在线看| 久久av老司机精品网站导航| 久久综合狠狠综合久久激情| 国产精品66部| 日韩码欧中文字| 在线免费不卡视频| 男女性色大片免费观看一区二区| 精品久久久久99| www..com久久爱| 亚洲h动漫在线| 久久综合九色综合97婷婷女人| 国产成人av在线影院| 伊人婷婷欧美激情| 91精品国产综合久久久蜜臀图片| 蜜桃一区二区三区在线观看| 欧美韩国日本不卡| 欧美丝袜自拍制服另类| 老鸭窝一区二区久久精品| 中日韩免费视频中文字幕| 在线欧美一区二区| 久久国产精品99久久人人澡| 国产精品污www在线观看| 欧美综合欧美视频| 韩国av一区二区三区| 中文字幕人成不卡一区| 51久久夜色精品国产麻豆| 国产夫妻精品视频| 偷拍一区二区三区| 欧美激情一区二区三区四区| 欧美日韩国产乱码电影| 国产成人精品在线看| 亚洲chinese男男1069| 国产欧美视频一区二区三区| 欧美天天综合网| 国产传媒久久文化传媒| 亚洲一二三四区| 国产日产欧美一区二区视频| 欧美图片一区二区三区| 播五月开心婷婷综合| 日韩av一区二区在线影视| 亚洲视频1区2区| 久久久99免费| 在线不卡的av| 一本久久a久久免费精品不卡| 久久99这里只有精品| 一级精品视频在线观看宜春院| 久久女同性恋中文字幕| 欧美日韩1区2区| 99re8在线精品视频免费播放| 国内欧美视频一区二区| 亚洲一二三四在线观看| 国产精品久久国产精麻豆99网站| 欧美一区二区在线免费观看| 91亚洲精品久久久蜜桃| 国产91精品一区二区麻豆亚洲| 天堂成人免费av电影一区| ...xxx性欧美| 国产清纯美女被跳蛋高潮一区二区久久w| 在线视频欧美精品| 99国产精品视频免费观看| 国产一区999| 老司机精品视频线观看86| 亚洲福利电影网| 一区二区三区.www| 精品一区二区av| 日韩精品免费视频人成| 亚洲一卡二卡三卡四卡五卡| 国产精品福利一区二区| 中文文精品字幕一区二区| 精品久久久久香蕉网| 日韩欧美国产麻豆| 91精品久久久久久久99蜜桃| 欧美亚洲尤物久久| 欧美怡红院视频| 在线观看日韩毛片| 日本丰满少妇一区二区三区| www.av精品| 91丨九色丨尤物| 日本高清不卡一区| 91成人免费在线视频| 色综合久久中文综合久久牛| 99久久精品免费看| av日韩在线网站|