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

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

?? sdatoolsbar.java

?? 很好的UI界面源碼..還有自己的輸入法,可以更換風(fēng)格.可以學(xué)習(xí)和使用
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package cn.sda.ui;import cn.sda.event.KeybordEvent;import cn.sda.event.PointerEvent;import cn.sda.event.ToolsBarClickEvent;import cn.sda.event.ToolsBarOnChangeEvent;import java.util.Vector;import javax.microedition.lcdui.Graphics;import javax.microedition.lcdui.Image;import javax.microedition.lcdui.Font;/** * * @author Administrator */public class SDAToolsBar extends SDABaseControl {    private byte buttonAlignType = SDAConsts.ktHorizontal;    private int borderColor = SDAConsts.clBlack;    //選中按鈕顏色    private int focusButtonBackColor = SDAConsts.clWhite;    private int focusButtonForeColor = SDAConsts.clBlack;    //是否顯示標(biāo)題    private boolean showCaption = false;    //是否顯示按鈕的邊框    private boolean showButtonRect = true;    //是否按照標(biāo)題自動伸縮按鈕    private boolean autoSizeButton = true;    //組件列表    private Vector controlList = null;    //當(dāng)前位置    private SDAToolButton curButton = null;    //事件    private ToolsBarClickEvent onClickEvent = null;    private ToolsBarOnChangeEvent onChangeEvent = null;    //背景圖    private Image backImage = null;    private boolean stretchImage = true;    //按鈕圖片排布方式    private int glyphAlignType = SDAConsts.blGlyphTop;    //按鈕的缺省尺寸    private int buttonSize = 40;    public SDAToolsBar() {        super();        setWidth(120);        setHeight(22);        setDock(SDAConsts.dsTop);        controlList = new Vector();        setOnKeyDown(new KeybordEvent() {            public void Event(SDABaseControl ctrl, int keyCode) {                //鍵盤                doKeydown(keyCode);            }        });        setOnPointerPressed(new PointerEvent() {            public void Event(SDABaseControl ctrl, int x, int y) {                //點                doPointerPress(x, y);            }        });    }    public void paint() {        if (!IsCanPaint()) {            return;        }        Graphics g = form.getGraphics();        SetClip(g);        g.setFont(getFont());        int thisWidth = getWidth();        int thisHeight = getHeight();        //框        if (!transparent) {            g.setColor(backColor);            fillRect(g, 0, 0, thisWidth, thisHeight);        }        g.setColor(borderColor);        drawRect(g, 0, 0, thisWidth, thisHeight);        //畫子組件        PaintChilds();        //畫按鈕和分割線        paintButton(g);        //焦點        if (isFoucsed()) {            g.setColor(SDAConsts.clFocusShadow);            drawRect(g, 1, 1, thisWidth - 2, thisHeight - 2);        }        PaintChilds();    }    //計算設(shè)置按鈕的寬度    private void setButtonSize() {        SDAToolButton button = null;        int buttonHeight = getHeight() - 4;        int buttonWidth = getWidth() - 4;        Font ft = getFont();        int fontheight = ft.getHeight();        int num = 0;        int buttonPos = 2;        for (int i = 0; i < controlList.size(); i++) {            if (controlList.elementAt(i) instanceof SDAToolButton) {                button = (SDAToolButton) controlList.elementAt(i);                if (autoSizeButton) {                    if (buttonAlignType == SDAConsts.ktHorizontal) {                        button.setHeight(buttonHeight);                        button.setTop(2);                        button.setLeft(buttonPos);                        if (button.getImage() != null && button.getCaption().length() > 0 &&                                (glyphAlignType == SDAConsts.blGlyphLeft || glyphAlignType == SDAConsts.blGlyphRight)) {                            button.setWidth(ft.stringWidth(button.getCaption() + "xx") + button.getImage().getWidth());                        } else {                            num = ft.stringWidth(button.getCaption() + "xx");                            if (button.getImage() != null) {                                if (num < button.getImage().getWidth()) {                                    num = button.getImage().getWidth();                                }                            }                            button.setWidth(num);                        }                        buttonPos += button.getWidth() + 2;                    } else {                        button.setLeft(2);                        button.setTop(buttonPos);                        button.setWidth(buttonWidth);                        if (button.getImage() != null && button.getCaption().length() > 0 &&                                (glyphAlignType == SDAConsts.blGlyphTop || glyphAlignType == SDAConsts.blGlyphBottom)) {                            button.setHeight(fontheight + 4 + button.getImage().getHeight());                        } else {                            num = fontheight + 2;                            if (button.getImage() != null) {                                if (num < button.getImage().getHeight() + 2) {                                    num = button.getImage().getHeight() + 2;                                }                            }                            button.setHeight(num);                        }                        buttonPos += button.getHeight() + 2;                    }                } else {                    if (buttonAlignType == SDAConsts.ktHorizontal) {                        button.setTop(2);                        button.setLeft(buttonPos);                        button.setHeight(buttonHeight);                        button.setWidth(buttonSize);                        buttonPos += button.getWidth() + 2;                    } else {                        button.setLeft(2);                        button.setTop(buttonPos);                        button.setWidth(buttonWidth);                        button.setHeight(buttonSize);                        buttonPos += button.getHeight() + 2;                    }                }            } else {                if (buttonAlignType == SDAConsts.ktHorizontal) {                    buttonPos += ((SDAToolSeperator) controlList.elementAt(i)).getWidth();                } else {                    buttonPos += ((SDAToolSeperator) controlList.elementAt(i)).getHeight();                }            }        }    }    //畫按鈕和分割    private void paintButton(Graphics g) {        int thisWidth = getWidth();        int thisHeight = getHeight();        Font ft = getFont();        int fontHeight = ft.getHeight();        //設(shè)置大小        setButtonSize();        //畫        int buttonPos = 2;        SDAToolButton button = null;        SDAToolSeperator sp = null;        Image image = null;        String caption = "";        //畫背景        if (backImage != null) {            if (stretchImage) {                image = SDAImageUtils.processImage(backImage, thisWidth, thisHeight, SDAImageUtils.MODE_STRETCH);            } else {                image = backImage;            }            drawImage(g, image, 0, 0, 0);        }        if (buttonAlignType == SDAConsts.ktHorizontal) {            for (int i = 0; i < controlList.size(); i++) {                if (controlList.elementAt(i) instanceof SDAToolButton) {                    button = (SDAToolButton) controlList.elementAt(i);                    caption = button.getCaption();                    if (showButtonRect) {                        g.setColor(borderColor);                        drawRect(g, buttonPos, 2, button.getWidth(), button.getHeight());                    }                    SetClip(g, buttonPos, 2, button.getWidth(), button.getHeight());                    image = button.getImage();                    //焦點按鈕                    if (button.equals(curButton)) {                        g.setColor(focusButtonBackColor);                        fillRect(g, buttonPos + 1, 3, button.getWidth() - 1, button.getHeight() - 1);                        g.setColor(focusButtonForeColor);                    }                    if (image != null) {                        if (showCaption && caption.length() > 0) {                            if (glyphAlignType == SDAConsts.blGlyphTop) {                                drawImage(g, image, buttonPos + (button.getWidth() - image.getWidth()) / 2 + 1,                                        (button.getHeight() - image.getHeight() - fontHeight) / 2 + 3, 0);                                drawString(g, caption, buttonPos + (button.getWidth() - ft.stringWidth(caption)) / 2 + 1,                                        (button.getHeight() - image.getHeight() - fontHeight) / 2 + image.getHeight() + 3);                            }                            if (glyphAlignType == SDAConsts.blGlyphBottom) {                                drawImage(g, image, buttonPos + (button.getWidth() - image.getWidth()) / 2 + 1,                                        (button.getHeight() - image.getHeight() - fontHeight) / 2 + fontHeight + 3, 0);                                drawString(g, caption, buttonPos + (button.getWidth() - ft.stringWidth(caption)) / 2 + 1,                                        (button.getHeight() - image.getHeight() - fontHeight) / 2 + 3);                            }                            if (glyphAlignType == SDAConsts.blGlyphLeft) {                                drawImage(g, image, buttonPos + (button.getWidth() - image.getWidth() - ft.stringWidth(caption) - 2) / 2 + 1,                                        (button.getHeight() - image.getHeight()) / 2 + 3, 0);                                drawString(g, caption, buttonPos + (button.getWidth() - ft.stringWidth(caption) - image.getWidth() - 2) / 2 + image.getWidth() + 3,                                        (button.getHeight() - fontHeight) / 2 + 3);                            }                            if (glyphAlignType == SDAConsts.blGlyphRight) {                                drawImage(g, image, buttonPos + (button.getWidth() - image.getWidth() - ft.stringWidth(caption) - 2) / 2 + ft.stringWidth(caption) + 3,                                        (button.getHeight() - image.getHeight()) / 2 + 3, 0);                                drawString(g, caption, buttonPos + (button.getWidth() - ft.stringWidth(caption) - image.getWidth() - 2) / 2 + 1,                                        (button.getHeight() - fontHeight) / 2 + 3);                            }                        } else {                            drawImage(g, image, buttonPos + (button.getWidth() - image.getWidth()) / 2 + 1,                                    (button.getHeight() - image.getHeight()) / 2 + 3, 0);                        }                    } else {                        if (showCaption) {                            g.setColor(foreColor);                            drawString(g, button.getCaption(), buttonPos + (button.getWidth() - ft.stringWidth(button.getCaption())) / 2 + 1,                                    (button.getHeight() - fontHeight) / 2 + 3);                        }                    }                    SetClip(g);                    buttonPos += button.getWidth() + 2;                } else {                    sp = (SDAToolSeperator) controlList.elementAt(i);                    if (!showButtonRect) {                        g.setColor(borderColor);                        drawLine(g, buttonPos + sp.getWidth() / 2 - 1, 4, buttonPos + sp.getWidth() / 2 - 1, thisHeight - 4);                        g.setColor(0x00ffffff);                        drawLine(g, buttonPos + sp.getWidth() / 2, 4, buttonPos + sp.getWidth() / 2, thisHeight - 4);                    }                    buttonPos += sp.getWidth();                }            }        }        if (buttonAlignType == SDAConsts.ktVertical) {            for (int i = 0; i <                    controlList.size(); i++) {                if (controlList.elementAt(i) instanceof SDAToolButton) {                    button = (SDAToolButton) controlList.elementAt(i);                    caption = button.getCaption();                    if (showButtonRect) {                        g.setColor(borderColor);                        drawRect(g, 2, buttonPos, button.getWidth(), button.getHeight());                    }                    SetClip(g, 2, buttonPos, button.getWidth(), button.getHeight());                    image = button.getImage();                    //焦點按鈕                    if (button.equals(curButton)) {                        g.setColor(focusButtonBackColor);                        fillRect(g, 3, buttonPos + 1, button.getWidth() - 1, button.getHeight() - 1);                        g.setColor(focusButtonForeColor);                    }                    if (image != null) {                        if (showCaption && caption.length() > 0) {                            if (glyphAlignType == SDAConsts.blGlyphTop) {                                drawImage(g, image, (button.getWidth() - image.getWidth()) / 2 + 3,                                        buttonPos + (button.getHeight() - image.getHeight() - fontHeight) / 2 + 1, 0);                                drawString(g, caption, (button.getWidth() - ft.stringWidth(caption)) / 2 + 3,                                        buttonPos + (button.getHeight() - image.getHeight() - fontHeight) / 2 + image.getHeight() + 1);                            }                            if (glyphAlignType == SDAConsts.blGlyphBottom) {                                drawImage(g, image, (button.getWidth() - image.getWidth()) / 2 + 3,                                        buttonPos + (button.getHeight() - image.getHeight() - fontHeight) / 2 + fontHeight + 1, 0);                                drawString(g, caption, (button.getWidth() - ft.stringWidth(caption)) / 2 + 3,                                        buttonPos + (button.getHeight() - image.getHeight() - fontHeight) / 2 + 1);                            }                            if (glyphAlignType == SDAConsts.blGlyphLeft) {                                drawImage(g, image, (button.getWidth() - image.getWidth() - ft.stringWidth(caption) - 2) / 2 + 3,                                        buttonPos + (button.getHeight() - image.getHeight()) / 2 + 1, 0);                                drawString(g, caption, (button.getWidth() - ft.stringWidth(caption) - image.getWidth() - 2) / 2 + image.getWidth() + 5,                                        buttonPos + (button.getHeight() - fontHeight) / 2 + 1);                            }                            if (glyphAlignType == SDAConsts.blGlyphRight) {                                drawImage(g, image, (button.getWidth() - image.getWidth() - ft.stringWidth(caption) - 2) / 2 + ft.stringWidth(caption) + 5,                                        buttonPos + (button.getHeight() - image.getHeight()) / 2 + 1, 0);                                drawString(g, caption, (button.getWidth() - ft.stringWidth(caption) - image.getWidth() - 2) / 2 + 3,                                        buttonPos + (button.getHeight() - fontHeight) / 2 + 1);                            }                        } else {                            drawImage(g, image, (button.getWidth() - image.getWidth()) / 2 + 3,                                    buttonPos + (button.getHeight() - image.getHeight()) / 2 + 1, 0);                        }                    } else {                        if (showCaption) {                            g.setColor(foreColor);                            //打字                            drawString(g, String.valueOf(caption), (button.getWidth() - ft.stringWidth(caption)) / 2 + 3,                                    buttonPos + 2);                        }                    }                    SetClip(g);                    buttonPos += button.getHeight() + 2;                } else {                    sp = (SDAToolSeperator) controlList.elementAt(i);                    if (!showButtonRect) {                        g.setColor(borderColor);                        drawLine(g, 4, buttonPos + sp.getHeight() / 2 - 1, thisWidth - 4, buttonPos + sp.getHeight() / 2 - 1);                        g.setColor(0x00ffffff);                        drawLine(g, 4, buttonPos + sp.getHeight() / 2, thisWidth - 4, buttonPos + sp.getHeight() / 2);                    }                    buttonPos += sp.getHeight();                }            }        }    }    //增加button    public void addButton(SDAToolButton button) {        if (!controlList.contains(button)) {            controlList.addElement(button);        }

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
激情六月婷婷久久| 久久久久高清精品| 亚洲一区在线观看视频| 色欧美88888久久久久久影院| 精品粉嫩超白一线天av| 国产麻豆精品久久一二三| 日本一区二区三区高清不卡| 成av人片一区二区| 亚洲免费在线看| 在线观看国产91| 日韩精品一级中文字幕精品视频免费观看 | 日韩欧美区一区二| 国产一区欧美一区| 国产精品欧美综合在线| 色婷婷亚洲婷婷| 日韩中文字幕区一区有砖一区 | 日韩精品电影在线| 欧美电影免费观看高清完整版在 | 欧美一区二区三区四区在线观看| 日本不卡1234视频| 国产喂奶挤奶一区二区三区| 91视频免费观看| 婷婷开心久久网| 国产三级精品在线| 在线影院国内精品| 久久99精品久久久久久动态图| 国产亚洲va综合人人澡精品| 色综合 综合色| 久久精品国产精品青草| 国产日产精品1区| 欧美三级日韩在线| 国产成人亚洲综合a∨婷婷| 一区二区三区中文在线| 日韩欧美精品在线| 色婷婷综合久久久中文一区二区| 婷婷六月综合亚洲| 国产精品久久久久桃色tv| 欧美日本一区二区在线观看| 国产精品综合二区| 午夜精品久久久久久久久| 国产亚洲精久久久久久| 欧美日韩国产一区| 成人动漫在线一区| 免费看精品久久片| 亚洲欧美日韩中文播放 | 国产大陆亚洲精品国产| 亚洲国产精品影院| 亚洲国产精品v| 欧美一激情一区二区三区| 99免费精品视频| 精品一区二区久久| 亚洲高清免费视频| 中文字幕亚洲精品在线观看| 精品理论电影在线观看 | 日韩欧美一区二区在线视频| 色综合激情久久| 波多野结衣精品在线| 国产精一区二区三区| 蜜桃av一区二区在线观看| 亚洲一区中文在线| 日韩一区欧美小说| 欧美国产1区2区| 精品av久久707| 欧美一区三区二区| 91激情五月电影| 91在线视频免费观看| 国产91精品久久久久久久网曝门| 免费欧美高清视频| 日韩精品成人一区二区三区| 亚洲综合偷拍欧美一区色| 亚洲丝袜自拍清纯另类| 欧美国产精品一区| 国产精品天美传媒| 久久久久久一二三区| 精品福利二区三区| 久久先锋影音av| 久久五月婷婷丁香社区| 精品999久久久| 国产午夜久久久久| 国产亚洲美州欧州综合国| 国产日韩综合av| 国产校园另类小说区| 国产日韩影视精品| 国产欧美一区二区精品忘忧草| 精品国产伦理网| 精品精品国产高清a毛片牛牛| 91精品午夜视频| 欧美一区二区三区精品| 欧美v亚洲v综合ⅴ国产v| 日韩精品综合一本久道在线视频| 日韩一区二区三区精品视频| 精品欧美乱码久久久久久1区2区| 日韩精品一区二区三区在线观看 | 亚洲美女区一区| 一区二区三区美女| 亚洲一区二三区| 五月天国产精品| 国内成人免费视频| 国产高清成人在线| 99麻豆久久久国产精品免费 | 99麻豆久久久国产精品免费 | 蜜乳av一区二区| 国产在线精品一区二区| 成人高清视频免费观看| 日本高清不卡一区| 51精品视频一区二区三区| 精品国产污污免费网站入口| 欧美—级在线免费片| 亚洲美女视频一区| 蜜臀91精品一区二区三区| 国产精品一区二区免费不卡| 97se亚洲国产综合自在线不卡| 欧美在线一区二区| 精品国产制服丝袜高跟| 中文字幕中文字幕在线一区 | 午夜亚洲福利老司机| 九九**精品视频免费播放| 波多野结衣欧美| 日韩一区二区电影| 亚洲国产精品高清| 日韩黄色免费电影| 国产69精品久久99不卡| 欧美日韩一区二区三区高清| 精品va天堂亚洲国产| 亚洲国产欧美在线| 成人免费毛片嘿嘿连载视频| 7777精品久久久大香线蕉| 国产偷国产偷精品高清尤物| 亚洲国产日韩a在线播放性色| 国产伦精品一区二区三区在线观看 | 亚洲综合清纯丝袜自拍| 精品一区二区三区影院在线午夜| 91在线视频免费91| 欧美成人欧美edvon| 亚洲综合区在线| 成人av免费在线播放| 精品免费国产一区二区三区四区| 国产精品久久久久久久久免费桃花| 日韩精品免费专区| 91蝌蚪porny成人天涯| 26uuu久久综合| 午夜不卡av免费| 日本高清免费不卡视频| 久久精品视频在线看| 麻豆视频一区二区| 欧美四级电影在线观看| 亚洲日本一区二区三区| 风间由美一区二区av101| 日韩美女视频一区二区在线观看| 亚洲国产一区视频| 91社区在线播放| 国产精品乱码一区二区三区软件| 狠狠狠色丁香婷婷综合久久五月| 3d动漫精品啪啪| 午夜精品一区二区三区电影天堂| 91色在线porny| 日韩毛片精品高清免费| 成人精品电影在线观看| 国产网红主播福利一区二区| 国产主播一区二区| 欧美精品一区二区三区很污很色的| 琪琪久久久久日韩精品| 欧美日韩精品福利| 亚洲一二三四久久| 欧美午夜免费电影| 亚洲18女电影在线观看| 欧美日韩在线三级| 亚洲第一激情av| 欧美日韩高清影院| 石原莉奈一区二区三区在线观看| 欧美三级韩国三级日本三斤| 亚洲五月六月丁香激情| 色欲综合视频天天天| 亚洲午夜电影网| 91精品国产一区二区三区蜜臀| 石原莉奈在线亚洲二区| 日韩免费一区二区| 国产乱对白刺激视频不卡| 国产亚洲1区2区3区| av一区二区久久| 一区二区三区av电影| 欧美日韩一区二区三区不卡| 五月婷婷另类国产| 欧美大片免费久久精品三p| 国产一区二区三区美女| 欧美极品aⅴ影院| 日本福利一区二区| 男男视频亚洲欧美| 久久精品一区二区三区四区| 粉嫩久久99精品久久久久久夜| 综合久久国产九一剧情麻豆| 欧洲av在线精品| 奇米影视7777精品一区二区| 欧美成人精品福利| 成人精品免费看| 亚洲一二三四区不卡| 久久久久国产一区二区三区四区| 成人va在线观看| 午夜精品久久久久久久久久| 久久久久成人黄色影片|