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

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

?? screen.java

?? 有關j2me的很好的例子可以研究一下
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
/* * @(#)Screen.java	1.124 01/08/21  * 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;import java.util.TimerTask;import java.util.Timer;/** * <P>The common superclass of all high-level user interface classes.  Adds * optional title and ticker-tape output to the Displayable class.  The * contents displayed and their interaction with the user are defined by  * subclasses.</P> * * <P>Using subclass-defined methods, the application may change the contents * of a Screen object while it is shown to the user.  If this occurs, and the * Screen object is visible, the display will be updated automatically.  That * is, the implementation will refresh the display in a timely fashion without * waiting for any further action by the application.  For example, suppose a * List object is currently displayed, and every element of the List is * visible.  If the application inserts a new element at the beginning of the * List, it is displayed immediately, and the other elements will be * rearranged appropriately.  There is no need for the application to call * another method to refresh the display.</P> * * <P>It is recommended that applications change the contents of a Screen only * while it is not visible (that is, while another Displayable is current). * Changing the contents of a Screen while it is visible may result in * performance problems on some devices, and it may also be confusing if the * Screen's contents changes while the user is interacting with it.</P> */public abstract class Screen extends Displayable  {    /** The Ticker which may be set on this Screen */    private Ticker ticker;    /** A Timer which will handle firing repaints of the TickerPainter */    private final static Timer  tickerTimer;    /** A TimerTask which will repaint the Ticker on a repeated basis */    private TickerPainter       tickerPainter;    /** Renders the title for this Screen */    private Layout screenTitle;    /**     * Whether or not this Screen is currently displayed on the physical     * device     */    private boolean visible;         // = false;    /**     * Whether or not the Ticker (if there is one) is part of the display     * of this Screen (ie, not being optimized out of the layout for space)     */    private boolean tickerIsVisible; // = false;    /** this variable is set to true once layout was done */    private boolean layoutDoneOnce;  // = false;    /** Special title font */    private final static  Font TITLE_FONT =        Font.getFont(Font.FACE_SYSTEM, Font.STYLE_BOLD, Font.SIZE_MEDIUM);    /** Special title height */    private final static int TITLE_HEIGHT = TITLE_FONT.getHeight();    /** Special content font, shared amongst the LCDUI package */    final static Font CONTENT_FONT  = Font.getDefaultFont();    /** Special content height, shared amongst the LCDUI package */    final static int CONTENT_HEIGHT = CONTENT_FONT.getHeight();    /** height of the child that is shown in the viewport */    private int childHeight;        // = 0;    /**     * When hasBorder is true there is a pixel border painted around     * content and viewPort is reduced by 4 pixels. This is used by     * subclasses such as TextBox which need a pixel border around them.     */    boolean hasBorder;             // = false;    /** view port X position (in Sreen coordinates) */    private int globalViewPortX;    /** view port Y position (in Sreen coordinates) */    private int globalViewPortY;    /** view port position (in child coordinates) */    private int viewPortY;    /** view port width */    int viewPortWidth;    /** view port height */    int viewPortHeight;    /**     * Creates a new Screen object with no title and no ticker.     */    Screen() {        this(null);    }    /**     * Creates a new Screen object with the given title and with no ticker.     *     * @param title the Screen's title, or null for no title     */    Screen(String title) {        // SYNC NOTE: since subclasses can't protect their call to super()        // we'll sync it here        synchronized (Display.LCDUILock) {            if (title != null) {                screenTitle = new StringLayout(title, TITLE_FONT);            }        }    }    /**     * Gets the title of the Screen.      *      * @return a String representing the title value, or null if there      *         is no title     *      * @see #setTitle          */    public String getTitle() {        synchronized (Display.LCDUILock) {            return getTitleImpl();        }    }    /**     * Sets the title of the Screen. If null is given, removes the title. <p>     *     * If the Screen is physically visible, the visible effect     * should take place no later than immediately     * after the callback or     * {@link javax.microedition.midlet.MIDlet#startApp startApp}     * returns back to the implementation.     *     * @param s the new title, or null for no title     *     * @see #getTitle     */    public void setTitle(String s) {        synchronized (Display.LCDUILock) {            String oldTitle = getTitleImpl();            if ((oldTitle == null && s == null) ||                    (oldTitle != null && s != null && oldTitle.equals(s))) {                return;            }	    int deltaHeight = 0;            if (screenTitle != null) {                deltaHeight = ((StringLayout)screenTitle).setString(s);            } else if (s != null) {                screenTitle = new StringLayout(s, TITLE_FONT);                if (layoutDoneOnce) {                    deltaHeight = screenTitle.setWidth(Display.WIDTH);                }            }	    // if layout was done yet there is no need to repaint	    // nor to re-layout	    if (!layoutDoneOnce) {		return;	    }	    // repaint only the title area if title height did not change            if (deltaHeight == 0) {                if (visible) {                    int y = 0;                    if (tickerIsVisible) {                        y = ticker.PREFERRED_HEIGHT;                    }                    repaint(0, y, Display.WIDTH, screenTitle.getHeight());                }                return;            }            // layoutChanged will take care of layout            // then do repaint if this screen is visible            layoutChanged();        } // sychronized    }    /**     * Set a ticker for use with this Screen, replacing any previous ticker.     * If null, removes the ticker object     * from this screen. The same ticker is may be shared by several Screen     * objects within an application. This is done by calling setTicker() on     * different screens with the same Ticker object.     * If the Screen is physically visible, the visible effect     * should take place no later than immediately     * after the callback or     * {@link javax.microedition.midlet.MIDlet#startApp startApp}     * returns back to the implementation.     * @param ticker the ticker object used on this screen     *      * @see #getTicker     */    public void setTicker(Ticker ticker) {        synchronized (Display.LCDUILock) {            // Return early if there's nothing to do            if (this.ticker == ticker) {                return;            }            // Stop any currently running Ticker.            stopTicker();            // We initialize the new ticker to start its message display            // from the right side of the screen. This is important for new            // tickers as well as tickers which may have already been running            // and are making a subsequent appearance to the screen.            // (Easier to add this here than attempt to fold into the            // if-else below)            if (ticker != null) {                ticker.reset();            }            // CASES:            // 1. Had an invisible non-null ticker, setting a null ticker            //    - We need to set the new ticker. There's no need to re-layout            //      or start the new ticker            // 2. Had an invisible non-null ticker, setting a non-null ticker            //    - We need to set the new ticker. There's no need to re-layout            //      or start the new ticker            // 3. Had a visible non-null ticker, setting a null ticker            //    - We need to set the new ticker and re-layout. There's no            //      need to start the new ticker.            // 4. Had a null ticker, setting a non-null ticker            //    - We need to set the new ticker, re-layout, and possibly            //      start up the new ticker            // 5. Had a visible non-null ticker, setting a non-null ticker            //    - We need to set the new ticker. There's no need to re-layout            //      but we do have to start the new ticker            Ticker oldTicker = this.ticker;            this.ticker = ticker;            // This 'if' test covers conditions 3 & 4. Note we don't need the            // test for case 4 to be 'this.ticker == null && ticker != null'	    // because            // we're guaranteed that 'ticker != null' above where we test for            // 'this.ticker == ticker'; so 'this.ticker == null' is enough to            // satisfy case 4.            if ((tickerIsVisible && ticker == null) ||                oldTicker == null)            {                layoutChanged(); // takes care of setting tickerIsVisible            }            // We know from cases 4 & 5 that we may need to start the new            // ticker, we do the 'if' test to avoid a blanket call to            // startTicker(), ie in cases 1 & 3. The added test for            // tickerIsVisible shortcircuits the method call to startTicker()            // which will simply return anyway (case 2).            if (ticker != null && tickerIsVisible) {                startTicker();            }        } // synchronized    }    /**     * Gets the ticker used by this Screen.     * @return ticker object used, or null if no ticker is present     *     * @see #setTicker          */    public Ticker getTicker() {        // SYNC NOTE: return of atomic value, no locking necessary        return ticker;    }    // package private ********************************************    /**     * Paint the content of this Screen     *     * @param g The Graphics to paint to     */    abstract void paintContent(Graphics g);    /**     * Layout the content of this Screen     *     * @param w The width of the layout     * @param h The height of the Layout     * @return int The new height of the Screen     */    abstract int layoutContent(int w, int h);    /**     * Get the minimum height for this Screen     *     * @param width The maximum width     * @param height The maximum height     * @return int The minimum content height to display this Screen

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91精品国产全国免费观看| 欧美日韩午夜在线视频| 日本欧美韩国一区三区| 亚洲永久免费av| 亚洲男人电影天堂| 亚洲天堂成人网| 亚洲男人的天堂在线aⅴ视频| 国产丝袜美腿一区二区三区| 久久久久高清精品| 国产欧美日韩视频在线观看| 久久久av毛片精品| 国产精品久久久久aaaa| 国产精品久久久久久久久久免费看 | 91精品国产欧美日韩| 欧美日本国产视频| 精品噜噜噜噜久久久久久久久试看 | 亚洲精品日韩综合观看成人91| 中文字幕在线观看一区二区| 一区二区在线免费| 亚洲成人中文在线| 理论片日本一区| 国产suv精品一区二区6| aaa欧美大片| 在线影视一区二区三区| 欧美日韩亚洲综合在线 欧美亚洲特黄一级| 日本精品视频一区二区三区| 欧美日本一道本| 久久综合色婷婷| 国产精品天天看| 午夜电影网一区| 国产美女主播视频一区| av电影天堂一区二区在线| 色婷婷av一区二区三区大白胸| 欧美私模裸体表演在线观看| 精品美女一区二区| 国产精品成人网| 亚洲成人免费电影| 国产一区二区三区精品欧美日韩一区二区三区 | 国产日韩亚洲欧美综合| 一区二区在线观看视频| 久久99国内精品| 欧美最猛性xxxxx直播| 日韩女优av电影在线观看| 亚洲天堂中文字幕| 久久se精品一区二区| 色网综合在线观看| 久久亚洲春色中文字幕久久久| 成人免费一区二区三区在线观看| 欧美aⅴ一区二区三区视频| 99国内精品久久| 日韩三级高清在线| 一区二区三区高清| 成人精品国产免费网站| 日韩欧美国产高清| 亚洲国产精品一区二区尤物区| 国产精品羞羞答答xxdd| 欧美日韩成人一区| 亚洲精品欧美激情| 国产成人aaa| 精品国产一区二区三区久久影院| 亚洲一区中文在线| 99久久久久久99| 日本一区二区电影| 国产精品一区二区x88av| 欧美老年两性高潮| 亚洲资源在线观看| 日本高清不卡在线观看| 日韩毛片精品高清免费| av在线这里只有精品| 欧美激情一区二区三区在线| eeuss国产一区二区三区| 久久亚洲春色中文字幕久久久| 蜜臀久久99精品久久久久久9| 欧美日韩精品久久久| 亚洲福利视频三区| 欧美体内she精视频| 亚洲永久免费av| 欧美视频中文字幕| 亚洲电影你懂得| 欧美日韩一区二区电影| 日日摸夜夜添夜夜添亚洲女人| 日本高清免费不卡视频| 亚洲精品视频一区二区| 色天使久久综合网天天| 亚洲精品水蜜桃| 色综合久久88色综合天天| 亚洲国产精品99久久久久久久久| 风间由美一区二区av101| 中文字幕+乱码+中文字幕一区| 国产大片一区二区| 亚洲欧洲www| 91精品办公室少妇高潮对白| 亚洲精品精品亚洲| 91精品国产福利| 美腿丝袜亚洲综合| 国产视频在线观看一区二区三区 | 久久久电影一区二区三区| 日韩国产欧美一区二区三区| 91超碰这里只有精品国产| 免费高清不卡av| wwwwww.欧美系列| 午夜精品久久久久久久久久久| 91精品在线免费| 国产一区 二区 三区一级| 自拍偷自拍亚洲精品播放| 在线观看www91| 蜜臀av性久久久久蜜臀aⅴ四虎 | 国产亚洲精品资源在线26u| 国产.精品.日韩.另类.中文.在线.播放| 国产精品久久网站| 欧美日韩国产精选| 九九精品一区二区| 亚洲欧美国产三级| 精品久久久久一区| 色8久久精品久久久久久蜜| 久久国产免费看| 亚洲精品乱码久久久久| 欧美mv日韩mv| 欧美日韩久久久一区| 久久99国产精品久久99| 亚洲欧美日韩在线不卡| 久久亚洲精品国产精品紫薇| 91久久精品日日躁夜夜躁欧美| 国产精品亚洲一区二区三区在线 | 91精品一区二区三区在线观看| k8久久久一区二区三区| 毛片不卡一区二区| 亚洲大片在线观看| 国产精品超碰97尤物18| 精品少妇一区二区三区日产乱码| 一本大道久久a久久综合| 国产精品资源网| 美女免费视频一区二区| 亚洲国产精品久久久久婷婷884| 久久精品亚洲国产奇米99| 日韩亚洲欧美成人一区| 欧美影院午夜播放| av成人老司机| av在线一区二区三区| 大胆欧美人体老妇| 韩国女主播成人在线观看| 日本视频一区二区| 性做久久久久久免费观看| 中文字幕一区二区三区av| 国产婷婷精品av在线| 久久久久久毛片| 精品电影一区二区| 欧美精品一区二区久久久| 欧美成人三级电影在线| 欧美一区二区观看视频| 91精品国产综合久久久久| 欧美剧情电影在线观看完整版免费励志电影| 成人av中文字幕| 成人午夜免费av| 99re成人精品视频| 91亚洲男人天堂| www.日本不卡| 色婷婷精品大在线视频| 日本福利一区二区| 欧美日本免费一区二区三区| 在线不卡中文字幕| 在线播放/欧美激情| 精品日产卡一卡二卡麻豆| 精品久久久久久久久久久久久久久| 欧美一区二区免费| 久久综合国产精品| 中文字幕免费不卡| 亚洲欧美一区二区在线观看| 亚洲美女屁股眼交3| 亚洲国产美女搞黄色| 久久国产精品免费| 懂色一区二区三区免费观看| 91亚洲精品久久久蜜桃| 欧美日韩在线观看一区二区 | 久久精品这里都是精品| 中文字幕免费在线观看视频一区| 国产精品白丝在线| 五月天久久比比资源色| 国产一区二区在线电影| 99国产精品久久久久久久久久 | 亚洲免费观看高清完整版在线| 亚洲一二三区不卡| 激情文学综合网| 97精品国产97久久久久久久久久久久 | 国产精品99久久久久久宅男| 国产69精品久久久久毛片| 欧美偷拍一区二区| 久久综合九色欧美综合狠狠| 国产精品国产精品国产专区不片| 亚洲va欧美va天堂v国产综合| 蜜桃av一区二区三区电影| 成人黄页在线观看| 91精品国产麻豆国产自产在线| 国产午夜精品理论片a级大结局| 亚洲综合久久av| 国产成人免费在线视频| 91精品国产综合久久久久久| 亚洲欧洲日韩av| 国产精品资源网站| 欧美精品国产精品|