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

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

?? sdabaseedit.java

?? 很好的UI界面源碼..還有自己的輸入法,可以更換風格.可以學習和使用
?? JAVA
?? 第 1 頁 / 共 4 頁
字號:
package cn.sda.ui;import cn.sda.event.BaseEditTextChangeEvent;import cn.sda.event.KeybordEvent;import cn.sda.event.NotifyEvent;import cn.sda.event.PointerEvent;import cn.sda.pinyin.InputInterface;import java.io.ByteArrayOutputStream;import java.io.DataOutputStream;import javax.microedition.lcdui.Graphics;import javax.microedition.lcdui.Font;/** * @author not attributable * @version 1.0 */public class SDABaseEdit extends SDABaseControl implements InputInterface {    //邊框    private int borderStyle = SDAConsts.bsNone;    //是不是顯示焦點框    private boolean showFocusRect = false;    //隱藏選定內容    private boolean hideSelection = true;    //最大長度    private int maxLength = 32767;    //是否顯示多行    private boolean multiLine = false;    //密碼    private char passwordChar = 0;    //只讀    protected boolean readOnly = false;    //滾動邊框(多行)    private int scrollBars = SDAConsts.srNone;    //文字對齊方式    private int textAlign = SDAConsts.alignLeft;    //是否自動換行(多行)    private boolean wordWrap = true;    private int barwidth = 10;    //邊框線顏色    private int borderColor = SDAConsts.clBlack;    //滾動條顏色    private int scrollBarColor = SDAConsts.clBtnFace;    //內部變量    //行數,行最大長度    private int lineNum = 0;    private int maxLineLenght = 0;    //垂直開始顯示行    private int startLine = 0;    //水平開始顯示位置    private int startLeft = 0;    //變動前位置    private int oldStartLine = 0;    private int oldStartLeft = 0;    //行數    private int lineNo = 0;    //水平滾條位置    private int HSLeft = 0;    private int HSTop = 0;    private int HSWidth = 0;    private int HSHeight = 0;    //垂直滾動條位置    private int VSLeft = 0;    private int VSTop = 0;    private int VSWidth = 0;    private int VSHeight = 0;    //點擊的滾動條的位置    private int oldScrollPointx = 0;    private int oldScrollPointy = 0;    //按下滾動條    private boolean isscrollbarpointdown = false;    //記錄按下的滾動條0:水平,1:垂直的    private byte scrollbardownHV = 0;    //當前光標位置    private int cursorPos = 0;    //光標行列    private int cursorRow = 0;    protected int cursorCol = 0;    //光標絕對位置    private int cursorX = 0;    private int cursorY = 0;    //選擇行的起始位置和內容    private int cursorLineStartPos = 0;    private String cursorLineText = "";    //前一行長度    private int priorLineLen = 0;    //臨時buffer    StringBuffer strBuffer = new StringBuffer();    //對齊方式    private int oldAlignType = SDAConsts.alignLeft;    //輸入法    private int imeType = SDAInputPanel.imNone;    //文字變動    private BaseEditTextChangeEvent onTextChange = null;    //    Graphics gg = null;    protected SDABaseEdit() {        super();        internalSDAEdit();    }    private void internalSDAEdit() {        setVisible(true);        setLeft(0);        setTop(0);        setBorderStyle(SDAConsts.bsFixedSingle);        super.setWidth(60);        //高度根據字體高度來        setHeight(getFont().getHeight() + 4);        super.setBackColor(SDAConsts.clWhite);        onPointerPressed = new PointerEvent() {            public void Event(SDABaseControl ctrl, int x, int y) {                doPointerPressed(x, y);            }        };        onPointerReleased = new PointerEvent() {            public void Event(SDABaseControl ctrl, int x, int y) {                doPointerReleased(x, y);            }        };        onKeyUp = new KeybordEvent() {            public void Event(SDABaseControl ctrl, int keyCode) {                doKeyUp(keyCode);            }        };        onInternalLostFocused = new NotifyEvent() {            public void Event(SDABaseControl ctrl) {                doLostFocus();            }        };        onInternalFocused = new NotifyEvent() {            public void Event(SDABaseControl ctrl) {                doGetFocus();            }        };    //設置系統菜單        /*    systemMenu=new SDAPopMenu();    systemMenu.AddItem("back", "退格");    systemMenu.AddItem("delete", "刪除");    systemMenu.AddItem("enter", "插入回車");    systemMenu.AddItem("", "-");    systemMenu.AddItem("ABC", "大寫字母").setRadioItem(true);    systemMenu.AddItem("abc", "小寫字母").setRadioItem(true);    systemMenu.AddItem("123", "數字").setRadioItem(true);    systemMenu.AddItem("拼音", "中文拼音").setRadioItem(true);    systemMenu.AddItem("標點", "插入標點").setRadioItem(true);    systemMenu.AddItem("符號", "插入符號").setRadioItem(true);    systemMenu.AddItem("", "-");    systemMenu.AddItem("全", "全角");    systemMenu.setOnClick(new PopMenuOnClickEvent() {    public void Event(SDAMenuItem item, String itemName, String itemCaption) {    //處理    if(itemName.equals("back")){    char ch=8;    inputFuncChar(ch, false);    }    if(itemName.equals("delete")){    char ch=46;    inputFuncChar(ch, false);    }    if(itemName.equals("enter")){    char ch=13;    inputFuncChar(ch, false);    }    if (itemName.equals("ABC")) {    form.Application.inputPanel.setImeType(SDAInputPanel.imUpperCase);    }    if (itemName.equals("abc")) {    form.Application.inputPanel.setImeType(SDAInputPanel.imLowerCase);    }    if (itemName.equals("123")) {    form.Application.inputPanel.setImeType(SDAInputPanel.imDigit);    }    if (itemName.equals("拼音")) {    form.Application.inputPanel.setImeType(SDAInputPanel.imPinYin);    }    if (itemName.equals("標點")) {    form.Application.inputPanel.setImeType(SDAInputPanel.imPoint);    SDASelectPointForm.getInstance().open(getSelf());    }    if (itemName.equals("符號")) {    form.Application.inputPanel.setImeType(SDAInputPanel.imSymbol);    SDASelectSymbolForm.getInstance().open(getSelf());    }    if (itemName.equals("全")) {    form.Application.inputPanel.setSBCCase(!form.Application.inputPanel.isSBCCase());    item.setChecked(form.Application.inputPanel.isSBCCase());    } else {    item.setChecked(true);    }    }    });     */    }    public void paint() {        internalPaint();    }    private void internalPaint() {        if (!IsCanPaint()) {            return;        }        Graphics g = form.getGraphics();        gg = g;        //設置字體        g.setFont(getFont());        gg.setFont(getFont());        //可視下才畫        if (isVisible()) {            //初始化引用變量            int thisWidth = width;            int thisHeight = height;            int HBarWidth = getHBarWidth();            int VBarHeight = getVBarHeight();            int fontHeight = getFont().getHeight();            //對齊方式處理后,畫組件            //外框            SetClip(g);            //透明            if (!isTransparent()) {                g.setColor(backColor);                fillRect(g, 0, 0, thisWidth, thisHeight);            }            if (borderStyle == SDAConsts.bsFixed3D) {                g.setColor(SDAConsts.clGray);                drawLine(g, 0, 0, thisWidth, 0);                drawLine(g, 0, 0, 0, thisHeight);                g.setColor(SDAConsts.clBlack);                drawLine(g, 1, 1, thisWidth - 1, 1);                drawLine(g, 1, 1, 1, thisHeight - 1);                g.setColor(SDAConsts.clBtnFace);                drawLine(g, 2, thisHeight - 1, thisWidth - 2, thisHeight - 1);                drawLine(g, thisWidth - 1, 2, thisWidth - 1, thisHeight - 1);                g.setColor(SDAConsts.clWhite);                drawLine(g, 1, thisHeight, thisWidth, thisHeight);                drawLine(g, thisWidth, 1, thisWidth, thisHeight);                if (isFoucsed() && showFocusRect) {                    g.setColor(SDAConsts.clFocusShadow);                    drawRect(g, 1, 1, thisWidth - 2, thisHeight - 2);                }            }            if (borderStyle == SDAConsts.bsFixedSingle) {                //邊框                g.setColor(getBorderColor());                drawRect(g, 0, 0, thisWidth, thisHeight);                if (isFoucsed() && showFocusRect) {                    g.setColor(SDAConsts.clFocusShadow);                    drawRect(g, 1, 1, thisWidth - 2, thisHeight - 2);                }            }            //打字            g.setColor(getForeColor());            //文字對齊方式            if (!isMultiLine()) {                if (textAlign == SDAConsts.alignLeft) {                    paintString(g, getText(), 2, (height - fontHeight) / 2);                }                if (textAlign == SDAConsts.alignCenter) {                    //文字長度                    int Len = getFont().stringWidth(getText());                    int sleft = (thisWidth - Len) / 2;                    paintString(g, getText(), sleft, (height - fontHeight) / 2);                }                if (textAlign == SDAConsts.alignRight) {                    //文字長度                    int Len = getFont().stringWidth(getText());                    int sleft = (thisWidth - Len) - 1;                    paintString(g, getText(), sleft, (height - fontHeight) / 2);                }            } else {                paintString(g, getText(), 2, (height - fontHeight) / 2);            }            //多行滾動條            if (borderStyle == SDAConsts.bsFixed3D) {                SetClip(g, 2, 2, thisWidth - 2, height - 2);            } else {                SetClip(g, 1, 1, thisWidth - 1, height - 1);            }            if (isMultiLine()) {                if ((scrollBars == SDAConsts.srHorizontal) || (scrollBars == SDAConsts.srBoth)) {                    //水平                    g.setColor(getScrollBarColor());                    fillRect(g, 0, height - barwidth, barwidth, barwidth);                    fillRect(g, HBarWidth - barwidth, height - barwidth, barwidth, barwidth);                    g.setColor(getBorderColor());                    drawRect(g, 0, thisHeight - barwidth, barwidth, barwidth);                    drawRect(g, HBarWidth - barwidth, height - barwidth, barwidth, barwidth);                    //滾動塊                    g.setColor(backColor);                    fillRect(g, barwidth, height - barwidth, HBarWidth - 2 * barwidth, barwidth);                    g.setColor(getBorderColor());                    drawRect(g, barwidth, thisHeight - barwidth, HBarWidth - 2 * barwidth, barwidth);                    //塊大小                    int pwidth = HBarWidth - 2 * barwidth;                    if (!isWordWrap()) {                        if (maxLineLenght > HBarWidth) {                            pwidth = (HBarWidth * (HBarWidth - 2 * barwidth)) / maxLineLenght;                        }                    }                    //計算塊位置                    int ppos = (startLeft * (HBarWidth - 2 * barwidth)) / maxLineLenght;                    //修正位置                    if (ppos + pwidth > HBarWidth - 2 * barwidth) {                        ppos = HBarWidth - 2 * barwidth - pwidth;                    }                    //畫塊                    g.setColor(getScrollBarColor());                    fillRect(g, barwidth + ppos, thisHeight - barwidth, pwidth, barwidth);                    g.setColor(getBorderColor());                    drawRect(g, barwidth + ppos, thisHeight - barwidth, pwidth, barwidth);                    //記錄大小                    HSLeft = barwidth + ppos;                    HSTop = thisHeight - barwidth;                    HSWidth = pwidth;                    HSHeight = barwidth;                    //畫塊上的線                    int tpos = HSWidth / 2 + HSLeft;                    drawRect(g, tpos, HSTop + 2, 0, HSHeight - 4);                    if (tpos - 2 > HSLeft) {                        drawRect(g, tpos - 2, HSTop + 2, 0, HSHeight - 4);                    }                    if (tpos + 2 < HSLeft + HSWidth) {                        drawRect(g, tpos + 2, HSTop + 2, 0, HSHeight - 4);                    }                    //三角                    g.setColor(getBorderColor());                    fillTriangle(g, barwidth / 2 - 2, thisHeight - barwidth / 2,                            barwidth / 2 + 2, thisHeight - barwidth / 2 - 4,                            barwidth / 2 + 2, thisHeight - barwidth / 2 + 4);                    fillTriangle(g, HBarWidth - barwidth + barwidth / 2 + 2, thisHeight - barwidth / 2,                            HBarWidth - barwidth + barwidth / 2 - 2, thisHeight - barwidth / 2 - 4,                            HBarWidth - barwidth + barwidth / 2 - 2, thisHeight - barwidth / 2 + 4);                }                if ((scrollBars == SDAConsts.srVertical) || (scrollBars == SDAConsts.srBoth)) {                    //垂直                    g.setColor(getScrollBarColor());                    fillRect(g, thisWidth - barwidth, 0, barwidth, barwidth);                    fillRect(g, thisWidth - barwidth, VBarHeight - barwidth, barwidth, barwidth);                    g.setColor(getBorderColor());                    drawRect(g, thisWidth - barwidth, 0, barwidth, barwidth);                    drawRect(g, thisWidth - barwidth, VBarHeight - barwidth, barwidth, barwidth);                    //滾動塊                    g.setColor(backColor);                    fillRect(g, thisWidth - barwidth, barwidth, barwidth, VBarHeight - 2 * barwidth);                    g.setColor(borderColor);                    drawRect(g, thisWidth - barwidth, barwidth, barwidth, VBarHeight - 2 * barwidth);                    //塊大小                    int pheight = VBarHeight - 2 * barwidth;                    if (lineNum * getFont().getHeight() > VBarHeight) {                        pheight = (VBarHeight * (VBarHeight - 2 * barwidth) / (lineNum * getFont().getHeight()));                    }                    //計算塊位置                    int ppos = barwidth;                    if (lineNum > 0) {                        ppos = (startLine * getFont().getHeight() * (VBarHeight - 2 * barwidth)) / (lineNum * getFont().getHeight());                    }                    //修正位置                    if (ppos + pheight > VBarHeight - 2 * barwidth) {                        ppos = VBarHeight - 2 * barwidth - pheight;                    }                    //畫塊                    g.setColor(getScrollBarColor());

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品捆绑美女sm三区| 欧美久久一二区| 国产精品久久久久桃色tv| 成人免费观看男女羞羞视频| 久久精品免费在线观看| 国产福利不卡视频| 中文字幕视频一区二区三区久| 处破女av一区二区| 一区二区三区久久| 欧美一区二区三区性视频| 精品亚洲成a人在线观看 | 欧美日韩免费一区二区三区| 五月激情综合网| 久久一日本道色综合| 成年人国产精品| 亚洲愉拍自拍另类高清精品| 91精品国产综合久久香蕉麻豆| 久久不见久久见免费视频1| 国产视频一区二区在线| 91视频在线观看| 亚洲成a人片在线不卡一二三区 | 欧美成人伊人久久综合网| 国产一区激情在线| 亚洲黄网站在线观看| 日韩欧美国产一区二区三区| 成人中文字幕电影| 日韩制服丝袜av| 欧美国产乱子伦| 欧美日韩一区二区在线观看视频 | 国产精品久久毛片| 91麻豆精品国产无毒不卡在线观看| 国内精品久久久久影院薰衣草| 亚洲视频一二三区| 欧美大片一区二区三区| 色综合一区二区三区| 青青草91视频| 亚洲综合在线电影| 久久综合色8888| 欧美日韩精品一二三区| 风间由美一区二区av101 | 精品国产a毛片| 欧美日韩亚洲国产综合| 不卡影院免费观看| 国产中文一区二区三区| 亚洲一卡二卡三卡四卡无卡久久| 久久蜜桃一区二区| 欧美人与性动xxxx| 99久久婷婷国产综合精品| 久久91精品国产91久久小草| 亚洲午夜成aⅴ人片| 国产精品亲子乱子伦xxxx裸| 欧美成人一区二区三区| 7777精品伊人久久久大香线蕉超级流畅 | 美女www一区二区| 亚洲制服丝袜av| 综合久久久久综合| 国产欧美日产一区| 日韩精品一区二区三区四区| 欧美午夜电影一区| 91蜜桃视频在线| 成人动漫在线一区| 国产a久久麻豆| 国产一区久久久| 韩国女主播成人在线观看| 日韩av网站免费在线| 亚洲综合区在线| 亚洲男女毛片无遮挡| 国产精品久久久久久久久晋中| 久久亚洲春色中文字幕久久久| 91精品久久久久久久99蜜桃| 欧美日韩不卡视频| 欧美放荡的少妇| 欧美日韩国产高清一区| 欧美日韩精品欧美日韩精品一| 欧美在线视频不卡| 欧美三级日韩三级| 678五月天丁香亚洲综合网| 欧美日韩中文国产| 欧美日韩黄色影视| 在线播放日韩导航| 欧美一二三区在线| 精品国产污网站| 久久精品一区二区三区av| 国产亚洲福利社区一区| 国产欧美日韩激情| 亚洲女同女同女同女同女同69| 国产精品超碰97尤物18| 亚洲免费观看高清完整版在线观看 | 91美女片黄在线观看| 一本色道久久加勒比精品| 欧美在线观看禁18| 日韩午夜在线观看视频| 精品国精品自拍自在线| 久久日一线二线三线suv| 国产精品青草综合久久久久99| 18欧美亚洲精品| 午夜国产不卡在线观看视频| 美女性感视频久久| 懂色av噜噜一区二区三区av| 99精品一区二区| 777午夜精品免费视频| 久久影院视频免费| 中文字幕日韩一区| 午夜精品一区在线观看| 精品一区二区三区免费播放| 国产a久久麻豆| 欧美日韩国产精品自在自线| 久久综合久久久久88| 亚洲少妇最新在线视频| 日韩精品三区四区| 国产91丝袜在线播放九色| 色国产综合视频| 久久综合狠狠综合久久激情| 亚洲欧洲制服丝袜| 久久99精品视频| 日本高清不卡视频| 久久这里都是精品| 亚洲国产欧美日韩另类综合 | 8x8x8国产精品| 中文天堂在线一区| 免费成人av在线| 色综合一个色综合| 久久精品人人做人人爽97| 午夜激情久久久| 99国产精品99久久久久久| 欧美va亚洲va在线观看蝴蝶网| 亚洲欧美电影一区二区| 国产综合色精品一区二区三区| 在线免费精品视频| 亚洲国产成人一区二区三区| 日本美女一区二区三区视频| 99久久精品免费| wwww国产精品欧美| 舔着乳尖日韩一区| 色噜噜狠狠一区二区三区果冻| 国产三区在线成人av| 日韩在线一区二区| 欧美午夜一区二区三区| 国产精品毛片无遮挡高清| 精品亚洲aⅴ乱码一区二区三区| 在线观看网站黄不卡| 国产精品传媒视频| 国产美女视频91| 日韩一级大片在线观看| 亚洲一区二区五区| 91视频在线观看| 国产精品的网站| 成人av午夜电影| 国产日韩欧美精品一区| 精品一区二区三区免费| 日韩一区二区三区高清免费看看| 一区二区三区欧美日韩| 91浏览器在线视频| 亚洲青青青在线视频| 97se亚洲国产综合在线| 国产精品对白交换视频| eeuss鲁片一区二区三区 | 精品少妇一区二区三区日产乱码| 亚洲国产精品久久艾草纯爱| 色先锋aa成人| 亚洲欧美一区二区不卡| 99精品视频在线观看| 中文字幕永久在线不卡| av日韩在线网站| 最新国产の精品合集bt伙计| 成人精品gif动图一区| 亚洲国产成人私人影院tom | 精品在线观看免费| 2欧美一区二区三区在线观看视频 337p粉嫩大胆噜噜噜噜噜91av | 99国产欧美另类久久久精品 | 国产三级一区二区三区| 国产精品亚洲专一区二区三区| 久久这里都是精品| 成人免费视频播放| 中文字幕综合网| 欧美又粗又大又爽| 天天色综合天天| 精品国产免费人成电影在线观看四季 | 亚洲超碰97人人做人人爱| 欧美精品一二三| 久久91精品久久久久久秒播| 久久九九全国免费| 成人av在线资源网| 洋洋av久久久久久久一区| 91精品国产aⅴ一区二区| 精品一区二区三区欧美| 国产精品久久久久aaaa| 日本高清成人免费播放| 日本成人超碰在线观看| 26uuu欧美日本| 99久久久精品免费观看国产蜜| 亚洲高清中文字幕| 精品国产污污免费网站入口| 成人精品小蝌蚪| 亚洲成人免费在线| 久久久精品免费网站| 欧洲激情一区二区| 国内外精品视频| 亚洲精品福利视频网站| 欧美r级在线观看|