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

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

?? component.java

?? 開發(fā)j2me 手機程序必須的用到的。文件較小
?? JAVA
字號:
package com.jmobilecore.ui.core;

import javax.microedition.lcdui.Graphics;
import javax.microedition.lcdui.Font;

/**
 * A <em>component</em> is an object having a graphical representation
 * that can be displayed on the screen and that can interact with the
 * user. Examples of components are the buttons, checkboxes, and scrollbars
 * of a typical graphical user interface. <p>
 * The <code>Component</code> class is the abstract superclass of
 * the User Interface components. Class <code>Component</code> can also
 * be extended directly to create a custom component.
 *
 * @author Greg Gridin
 */
abstract public class Component {

    /**
     * Indicates that the component should be left justified.
     */
    public static final int LEFT = 0;

    /**
     * Indicates that the component should be centered.
     */
    public static final int CENTER = 1;

    /**
     * Indicates that the component should be right justified.
     */
    public static final int RIGHT = 2;

    /**
     * The label's alignment.  The default alignment is set
     * to be left justified.
     */
    public int alignment = LEFT;

    /**
     * The height of the component.
     */
    protected int height = 0;

    public boolean focusable = false;

    /**
     * The width of the component.
     */
    public int width = ScreenCanvas.WIDTH;

    /**
     * The foreground color for this component.
     */
    public int foreground = Style.TEXT_COLOR;

    /**
     * The background color for this component.
     */
    public int background = Style.BACKGROUND_COLOR;

    /**
     * The foreground color for this component when it focused.
     */
    public int focusedForeground = Style.FOCUSED_TEXT_COLOR;

    /**
     * The background color for this component when it focused.
     */
    public int focusedBackground = Style.FOCUSED_BACKGROUND_COLOR;

    /**
     * The font used by this component.
     * The <code>font</code> can be <code>null</code>.
     *
     * @see #setFont
     */
    protected Font font = Style.TEXT_FONT;

    /**
     * Indicated if component should be repainted
     *
     * @see #invalidate
     */
    protected boolean valid = false;

    /**
     * Vertical offset in pixels of current component from top of the window
     */
    protected int screenY = 0;

    /**
     * Indicated if component is completely or partially visible on the screen
     */
    protected boolean isVisible = false;

    /**
     * Indicated if component is completely visible on the screen
     */
    protected boolean isCompletelyVisible = false;

    /**
     * Indicated if component is focusable
     *
     * @see #isFocusOwner
     * @see #requestFocus
     * @see #releaseFocus
     */
    protected boolean isFocused = false;

    /**
     * The parent screen of the object.
     */
    protected ScreenCanvas parentScreen = null;

    /**
     * Returns the current height of this component.
     *
     * @return the current height of this component
     */
    public int getHeight() {
        return height;
    }

    /**
     * Returns the current width of this component.
     *
     * @return the current width of this component
     */
    public int getWidth() {
        return width;
    }

    /**
     * Returns <code>true</code> if this <code>Component</code> is the
     * focus owner.
     *
     * @return <code>true</code> if this <code>Component</code> is the
     *         focus owner; <code>false</code> otherwise
     */
    public boolean isFocusOwner() {
        return isFocused;
    }

    /**
     * Processes a press of a key.
     */
    protected boolean keyPressed(int keyCode) {
        return false;
    }

    /**
     * Processes a release of a key.
     */
    protected boolean keyReleased(int keyCode) {
        return false;
    }

    /**
     * Processes when a key is repeated (held down).
     */
    protected boolean keyRepeated(int keyCode) {
        return false;
    }

    /**
     * Processes when a pointer is dragged (held down).
     */
    protected boolean pointerDragged(int x, int y) {
        return false;
    }

    /**
     * Processes a press of a pointer.
     */
    protected boolean pointerPressed(int x, int y) {
        return false;
    }

    /**
     * Processes a release of a pointer.
     */
    protected boolean pointerReleased(int x, int y) {
        return false;
    }

    /**
     * Paints this component.
     *
     * @param g the graphics context to use for painting
     */
    public void paint(Graphics g) {

        valid = true;
    }

    /**
     * Sets the focusable state of this Component to the specified value.
     * If component is not focusable then focusable state won't be changed
     *
     * @see #isFocusOwner
     * @see #releaseFocus
     */
    public void requestFocus() {
        if (focusable) isFocused = true;
    }

    public void releaseFocus() {
        if (focusable) isFocused = false;
    }

    /**
     * Sets the font of this component.
     *
     * @param font the font to become this component's font;
     *             if this parameter is <code>null</code> then this
     *             component font won't be changed
     */
    public void setFont(Font font) {
        this.font = font;
        if (font != null) {
            setHeight();
        } else {
            height = 0;
        }
    }

    /**
     * Get the component's font
     *
     * @return the current font
     */
    public Font getFont() {
        return font;
    }

    /**
     * Get foreground
     */
    public int getForeground() {
        return isFocusOwner() ? focusedForeground : foreground;
    }

    /**
     * Get background
     */
    public int getBackground() {
        return isFocusOwner() ? focusedBackground : background;
    }

    /**
     * Paints background for the component
     *
     * @param g the Graphics context
     */
    protected void paintBackground(Graphics g) {
        if (getBackground() != Color.TRANSPARENT) {
            g.setColor(getBackground());
            g.fillRect(0, screenY, getWidth(), getHeight());
        }
    }

    /**
     * Prepares foreground for painting
     *
     * @param g the Graphics context
     */
    protected void prepareForeground(Graphics g) {
        if (getForeground() != Color.TRANSPARENT) g.setColor(getForeground());
        if (getFont() != null) g.setFont(font);

    }

    /**
     * Calculates the component height
     */
    protected void setHeight() {
        height = font.getHeight() + 2 * Style.V_GAP;
    }

    /**
     * Invalidates this component.
     */
    public void invalidate() {
        valid = false;
    }

    /**
     * Default destructor. Helps VM to perform garbage collection
     */
    public void destructor() {
    };

}  // class Component

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩欧美高清在线| 天天综合网天天综合色| 一区二区三区在线观看国产| 亚洲18女电影在线观看| 大胆亚洲人体视频| 欧美一区二区三区在线视频| 国产精品灌醉下药二区| 国内精品免费**视频| 欧美制服丝袜第一页| 亚洲国产高清在线| 久久精品国产99国产| 欧美日韩一区高清| 亚洲精品综合在线| av电影在线观看一区| 久久久久97国产精华液好用吗| 午夜成人免费视频| 欧美最猛性xxxxx直播| 136国产福利精品导航| 国产jizzjizz一区二区| 精品国产乱码久久久久久老虎| 天涯成人国产亚洲精品一区av| 91麻豆国产福利精品| 国产精品国产三级国产aⅴ入口| 久久99热狠狠色一区二区| 欧美日韩精品电影| 午夜精品久久久久| 在线视频综合导航| 亚洲亚洲人成综合网络| 欧美亚洲国产一区二区三区| 亚洲人成在线播放网站岛国| 北岛玲一区二区三区四区| 国产精品青草综合久久久久99| 国产精品亚洲一区二区三区在线| 精品国产麻豆免费人成网站| 精久久久久久久久久久| 日韩女优制服丝袜电影| 韩国精品一区二区| 国产日产欧美精品一区二区三区| 精品一区二区影视| 久久久久久一二三区| 黄一区二区三区| 亚洲国产成人自拍| 一本一道波多野结衣一区二区| 亚洲免费观看视频| 欧美视频一区二区三区四区 | 国产一区欧美二区| 久久婷婷久久一区二区三区| 国产黄色精品网站| 国产精品麻豆视频| 欧洲精品一区二区| 日韩国产欧美视频| 久久久国产一区二区三区四区小说| 国产精品一区在线| 亚洲欧美欧美一区二区三区| 在线观看一区日韩| 裸体一区二区三区| 欧美国产乱子伦| 欧美亚洲另类激情小说| 日本一道高清亚洲日美韩| 久久在线免费观看| 色综合天天视频在线观看| 日韩在线一区二区三区| 国产日韩欧美精品综合| 色久优优欧美色久优优| 蜜桃av噜噜一区| 国产精品高潮呻吟久久| 欧美一区午夜精品| 成人av综合在线| 日韩精彩视频在线观看| 中文字幕乱码久久午夜不卡| 欧美日韩一区高清| 成人免费毛片app| 日日噜噜夜夜狠狠视频欧美人| 国产喂奶挤奶一区二区三区| 欧美亚洲国产一区在线观看网站 | 1024精品合集| 555夜色666亚洲国产免| 成人亚洲一区二区一| 亚洲成av人片一区二区三区| 国产日韩欧美高清在线| 欧美精选一区二区| 99久久久国产精品免费蜜臀| 免费成人av资源网| 一区二区三区四区亚洲| 久久精品免视看| 91精品国产色综合久久不卡蜜臀| 成人h动漫精品| 国产真实乱子伦精品视频| 亚洲成人激情社区| 亚洲视频一区二区在线观看| 久久欧美中文字幕| 91精品国产色综合久久| 在线中文字幕一区二区| 成人免费不卡视频| 国产精品一二一区| 久久精品免费看| 日韩av一二三| 婷婷开心激情综合| 一区二区在线观看视频在线观看| 国产欧美精品一区二区色综合 | 99精品国产99久久久久久白柏| 久久99精品国产| 欧美a级理论片| 日日夜夜免费精品视频| 亚洲国产sm捆绑调教视频| 亚洲日本青草视频在线怡红院 | 亚洲男人天堂av网| 亚洲欧洲www| 国产精品久久久久四虎| 国产欧美va欧美不卡在线| 久久久久久久久久久久久女国产乱| 欧美一级生活片| 欧美一级欧美三级在线观看| 欧美一区二区成人6969| 欧美成人综合网站| 精品国产自在久精品国产| 欧美电影免费观看高清完整版在 | 日本麻豆一区二区三区视频| 另类欧美日韩国产在线| 日韩高清电影一区| 美女尤物国产一区| 韩国三级在线一区| 国产成人精品1024| 91色综合久久久久婷婷| 色婷婷综合五月| 欧美日韩精品一区二区三区 | 国产ts人妖一区二区| 国产99一区视频免费| 成人app在线| 91精品1区2区| 欧美一区二区三区四区视频| 日韩三级在线免费观看| 精品国产一区二区国模嫣然| 久久久久久亚洲综合影院红桃| 中文字幕成人在线观看| 亚洲蜜桃精久久久久久久| 天天色图综合网| 韩国三级电影一区二区| 成人动漫视频在线| 欧美女孩性生活视频| 精品国产91久久久久久久妲己| 国产视频一区二区在线| 亚洲精品乱码久久久久久黑人| 日日摸夜夜添夜夜添精品视频 | 99视频热这里只有精品免费| 色综合激情五月| 日韩一区二区在线观看视频播放| 精品少妇一区二区三区免费观看| 国产欧美一二三区| 亚洲一区中文在线| 国产精品中文有码| 欧美三级午夜理伦三级中视频| 精品国产免费视频| 亚洲美女偷拍久久| 国产在线不卡一区| 欧美伊人精品成人久久综合97| 欧美电视剧在线看免费| 亚洲男人的天堂在线观看| 蜜臀精品一区二区三区在线观看 | 久久国产精品第一页| 成人av网址在线| 日韩一级大片在线观看| 中文字幕日韩一区| 国内精品嫩模私拍在线| 欧美日韩国产综合一区二区三区| 久久精品这里都是精品| 日韩黄色小视频| 一本久久a久久精品亚洲| 久久在线观看免费| 日韩vs国产vs欧美| 色狠狠桃花综合| 国产精品久久久久一区 | 国内精品久久久久影院一蜜桃| 色94色欧美sute亚洲13| 久久免费精品国产久精品久久久久| 亚洲自拍偷拍九九九| 99视频热这里只有精品免费| 久久美女高清视频| 青草国产精品久久久久久| 日本福利一区二区| 中文字幕在线观看不卡| 国产精品系列在线观看| 精品va天堂亚洲国产| 日本不卡一二三区黄网| 欧美日韩mp4| 亚洲福利视频三区| 欧美性三三影院| 一区二区三区在线视频免费 | 日韩美女视频19| 国产毛片精品视频| 精品国产伦一区二区三区观看体验 | 日韩视频一区二区三区| 午夜一区二区三区视频| 欧美午夜精品电影| 一二三四区精品视频| 在线看一区二区| 亚洲国产wwwccc36天堂| 欧美日韩国产成人在线91| 亚洲成人激情社区| 欧美日韩国产a|