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

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

?? rmsmidlet.java

?? 7個J2ME例子
?? JAVA
字號:
/* * Copyright (c) 2000-2001 Sun Microsystems, Inc. All Rights Reserved. */package examples.addressbook;import java.lang.*;import java.io.*;import java.util.*;import javax.microedition.lcdui.*;import javax.microedition.rms.*;import javax.microedition.midlet.*;/** * A simple class that shows various functionality of RMS. * The general flow of this MIDlet is: *       *      In the constructor (See RMSMIDlet), *      create and populate two record stores, one of personal *      contacts, the other with business contacts. *      Display the first screen. This screen shows a list *      of all RMS stores found in the MIDlet suite's name *      space. This screen allows the user to select a *      record store and either display pertinent information *      about the record store such as size, etc., or to view *      the contents of the selected store. When the contents *      of a record store are viewed, they are sorted by last *      name, though this can be changed by instantiate a *      SimpleComparator object with the appropriate *      sort order parameter. * *      Traversal from screen to screen is handled *      by RMSMIDlet, commandAction. *       */public class RMSMIDlet extends MIDlet implements CommandListener {    private Display myDisplay;  // handle to the display    private Alert alert;        // used to display errors    // Our commands to display on every screen.    private Command CMD_EXIT;    private Command CMD_DETAILS;    private Command CMD_OK;    // Our screens    private List mainScr;    private List detailScr;    private List dataScr;    // An array of all RMS stores found in this    // MIDlets name space.    private String[] recordStoreNames;    /**     * Seed data for creating personal contacts RMS store     */    private final String personalContacts[] = {        "John", "Zach", "2225556669",        "Mark", "Lynn", "5125551212",        "Joy", "Beth", "2705551234",        "Abby", "Lynn", "4085558566",    };    /**     * Seed data for creating business contacts RMS store     */    private final String businessContacts[] = {        "Ted", "Alan", "4125552235",        "Sterling", "Wincle", "9995559111",        "Deborah", "Elaine", "4445552323",        "Suzanne", "Melissa"," 5125556064",        "Frank", "Kenneth", "7775551212",        "Dwight", "Poe", "1115557234",        "Laura", "Beth", "2055558888",        "Lisa", "Dawn", "2705551267",        "Betty", "June", "5555551556",        "Yvonne", "Poe", "6665558888",        "Lizzy", "Loo", "5025557971",        "John", "Gerald", "3335551256",    };    /**     * Display a warning on the screen and revert     * to the main screen.     *     * s  A warning string to display     */    private void doAlert(String s) {        alert.setString(s);        myDisplay.setCurrent(alert, mainScr);    }    /**     * Notify the system we are exiting.     */    private void doExit() {        destroyApp(false);        notifyDestroyed();    }    /**     * In our simple MIDlet, all screens have the same commands,     * with the possible exception of the detailScr.     *      * Also set up the command listener to call commandAction.     * See RMSMIDlet#commandAction     */    private void addCommonCommands(Screen s,                                   boolean doDetails) {        s.addCommand(CMD_OK);        s.addCommand(CMD_EXIT);        if (doDetails) {            s.addCommand(CMD_DETAILS);        }        s.setCommandListener(this);    }    /**     * The public constructor. In our constructor, we get     * a handle to our display and create two record stores.     * In the event of an error, we display an alert.     */    public RMSMIDlet() {        CMD_EXIT = new Command("Exit", Command.EXIT, 3);        CMD_DETAILS = new Command("Details", Command.SCREEN, 2);        CMD_OK = new Command("OK", Command.OK, 1);        myDisplay = Display.getDisplay(this);        alert = new Alert("Warning");        alert.setTimeout(2000);        CreateAddressBook.createRecordStore("Personal",                                            personalContacts);        CreateAddressBook.createRecordStore("Business",                                            businessContacts);        // Now, get a list of RMS stores and add their        // names to the mainScr.        recordStoreNames = RecordStore.listRecordStores();        mainScr = new List("Select RMS Store", List.IMPLICIT,                           recordStoreNames, null);        addCommonCommands(mainScr, true);    }    /**     * Called by the system to start our MIDlet.     */    protected void startApp() {        myDisplay.setCurrent(mainScr);    }    /**     * Called by the system to pause our MIDlet.     * No actions required by our MIDLet.     */    protected void pauseApp() {}    /**     * Called by the system to end our MIDlet.     * No actions required by our MIDLet.     */    protected void destroyApp(boolean unconditional) {}    /**     * Generate a screen with a sorted list of the contents     * of the selected RMS store identified by index     * If any errors encountered, display an alert and     * redisplay the mainScr.     *     * index  an index into recordStoreNames     */    public void genDataScr(int index) {        SimpleComparator rc;        RecordEnumeration re;        RecordStore rs;        dataScr = null;        byte record[];        try {            rs = RecordStore.openRecordStore(                                recordStoreNames[index], false);        } catch (RecordStoreException e) {            doAlert("Could not open " + recordStoreNames[index]);            return;        }        // Create an enumeration that sorts by last name        rc = new SimpleComparator(                     SimpleComparator.SORT_BY_LAST_NAME);        try {            re = rs.enumerateRecords(null, rc, false);        } catch (RecordStoreNotOpenException e) {            doAlert("Could not create enumeration: " + e);            return;        }        // Create a screen and append the contents of the        // selected RMS store.        dataScr = new List(recordStoreNames[index] + " Data",                           List.IMPLICIT);        addCommonCommands(dataScr, false);        try {            while (re.hasNextElement()) {                byte[] b = re.nextRecord();                dataScr.append(SimpleRecord.getFirstName(b) +                               " " + SimpleRecord.getLastName(b),                               null);            }        } catch (Exception e) {            doAlert("Could not build list: " + e);            dataScr = null;        } finally {            try {                rs.closeRecordStore();            } catch (RecordStoreException e) {}        }    }    /**     * Generate a screen that shows some of the details     * of the selected RMS store.     *     * RMS store information displayed:     * - name     * - number of records     * - size, in bytes     * - available size, in bytes     * - version number     *     * index  an index into recordStoreNames     */    public void genDetailScr(int index) {        RecordStore rs;        detailScr = null;        try {            rs = RecordStore.openRecordStore(                                        recordStoreNames[index],                                        false);        } catch (Exception e) {            doAlert("Could not open " + recordStoreNames[index]);            return;        }        detailScr = new List(recordStoreNames[index] + " Details",                             List.IMPLICIT);        addCommonCommands(detailScr, false);        try {            detailScr.append("Name: "  + rs.getName(), null);            detailScr.append("# recs: " +                             rs.getNumRecords(), null);            detailScr.append("Size: " + rs.getSize(), null);            detailScr.append("Avail: " +                              rs.getSizeAvailable(),null);            detailScr.append("Version: " +                             rs.getVersion(), null);        } catch (Exception e) {            detailScr = null;            doAlert("Failed to retrieve data");            return;        } finally {            try {                rs.closeRecordStore();            } catch (RecordStoreException e) {}        }    }    /***     * Respond to command selections.     * Commands are:     * EXIT: if selected, then exit             (see RMSMIDlet, doExit)     * OK:   if selected, interpreted in the context of     *       the current screen.     *     * This method implements a state machine that drives     * the MIDlet from one state (screen) to the next.     */    public void commandAction(Command c,                              Displayable d) {        // Every screen has an EXIT command.        // Handle this consistently for all screens.        if (c == CMD_EXIT) {            doExit();            return;        }        // switch based on screen.        if (d == mainScr) {            // main screen: two commands to handle. If            // OK was selected, then generate the dataScr            // and make it active. If DETAILS was selected,            // generate the detailScr and make it active.            if ((c == List.SELECT_COMMAND) || (c == CMD_OK)) {                genDataScr(mainScr.getSelectedIndex());                myDisplay.setCurrent(dataScr);            } else if (c == CMD_DETAILS) {                genDetailScr(mainScr.getSelectedIndex());                myDisplay.setCurrent(detailScr);            }        } else if (d == detailScr) {            // If OK selected, go back to mainScr            if (c == CMD_OK) {                myDisplay.setCurrent(mainScr);            }        } else if (d == dataScr) {            // If OK selected, go back to mainScr            if (c == CMD_OK) {                myDisplay.setCurrent(mainScr);            }        }    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品狼人久久影院观看方式| 国产河南妇女毛片精品久久久 | 欧美一区二区三区在线电影| 欧美专区日韩专区| 色综合久久中文字幕综合网 | 欧美日韩精品三区| 欧美色图片你懂的| 欧美日韩国产不卡| 91精品啪在线观看国产60岁| 91精品国产一区二区三区香蕉| 在线综合+亚洲+欧美中文字幕| 欧美另类一区二区三区| 91麻豆精品国产91久久久资源速度 | 日本丰满少妇一区二区三区| 色婷婷国产精品久久包臀| 色婷婷综合久色| 欧美日韩国产区一| 69堂国产成人免费视频| 欧美成人性战久久| 久久天堂av综合合色蜜桃网| 久久蜜桃av一区二区天堂 | 亚洲免费看黄网站| 偷窥国产亚洲免费视频| 美女视频黄a大片欧美| 国产一区二区三区av电影| 国产成人鲁色资源国产91色综 | 欧美色网一区二区| 日韩午夜精品电影| 亚洲国产精品成人综合色在线婷婷| 中文字幕精品一区二区精品绿巨人 | 欧美精品精品一区| 久久久久青草大香线综合精品| 国产精品久久久久久久久动漫| 一区二区三区四区不卡在线 | 亚洲美女精品一区| 无吗不卡中文字幕| 激情综合五月天| 92精品国产成人观看免费| 欧美人牲a欧美精品| 久久久99精品免费观看| 亚洲摸摸操操av| 蜜臀91精品一区二区三区| 在线不卡免费av| 精品国产免费一区二区三区香蕉| 中文字幕第一区二区| 亚洲成人av资源| 国产69精品久久99不卡| 欧美日韩免费电影| 国产日韩欧美精品一区| 亚洲国产一二三| 国产激情一区二区三区| 欧美亚洲日本一区| 国产日韩在线不卡| 亚洲韩国一区二区三区| 国产91丝袜在线播放| 欧美日韩视频在线第一区| 久久噜噜亚洲综合| 亚洲国产一区视频| 成人免费va视频| 日韩美一区二区三区| 99久久久精品免费观看国产蜜| 欧美久久一二区| 中文字幕一区二区三区在线观看| 奇米精品一区二区三区在线观看| 99精品欧美一区二区三区综合在线| 91精品国产aⅴ一区二区| 亚洲美女区一区| 懂色一区二区三区免费观看| 日韩一区二区视频| 亚洲欧美日韩小说| 国产v日产∨综合v精品视频| 欧美一区二区三区在线电影| 亚洲特级片在线| 岛国精品一区二区| 精品国产伦一区二区三区免费| 午夜久久久影院| 日本精品一区二区三区四区的功能| 国产欧美精品一区| 久久国产精品99精品国产| 欧美老肥妇做.爰bbww视频| 亚洲人成亚洲人成在线观看图片| 国产一区二区不卡老阿姨| 日韩视频在线你懂得| 午夜精品一区二区三区三上悠亚| 91色九色蝌蚪| 综合色天天鬼久久鬼色| 国产成人av福利| 久久女同精品一区二区| 免费看黄色91| 欧美一二三区在线| 奇米777欧美一区二区| 欧美日韩精品一区二区天天拍小说 | 91精品一区二区三区久久久久久 | 日韩精品欧美精品| 欧美性videosxxxxx| 亚洲精品国产精华液| 91碰在线视频| 亚洲视频电影在线| 91蜜桃网址入口| 亚洲美女少妇撒尿| 在线免费视频一区二区| 一区二区三区不卡视频| 欧亚洲嫩模精品一区三区| 综合电影一区二区三区 | 色婷婷久久久综合中文字幕| 亚洲视频1区2区| 在线免费观看日韩欧美| 一区二区三区在线观看国产| 在线免费观看成人短视频| 一区二区三区久久久| 欧美午夜电影网| 日韩影院免费视频| 欧美一级理论片| 国模冰冰炮一区二区| 久久久久青草大香线综合精品| 粉嫩一区二区三区在线看| 中文字幕一区二区三区蜜月| 91老师国产黑色丝袜在线| 亚洲高清免费在线| 欧美一区二区三区免费| 精品一区二区三区在线观看国产 | 极品少妇一区二区| 国产精品欧美极品| 色婷婷国产精品| 日韩电影在线一区二区三区| 精品久久久久久综合日本欧美| 国产精品乡下勾搭老头1| 中文字幕日韩一区二区| 欧美网站大全在线观看| 久久99国产精品免费| 国产欧美精品在线观看| 色悠久久久久综合欧美99| 午夜久久久影院| 久久久亚洲精品石原莉奈| 99久久精品国产网站| 无码av中文一区二区三区桃花岛| 精品国产第一区二区三区观看体验| 丁香激情综合国产| 亚洲一区二区精品视频| 精品福利一区二区三区免费视频| 成人av午夜影院| 视频一区在线视频| 国产欧美日韩中文久久| 欧美在线免费观看亚洲| 国产曰批免费观看久久久| 亚洲免费观看高清完整版在线观看熊 | 国产大陆a不卡| 亚洲福利视频一区二区| 久久精品男人天堂av| 色老综合老女人久久久| 激情综合色综合久久综合| 亚洲色欲色欲www在线观看| 亚洲高清一区二区三区| 欧美精品一区二区蜜臀亚洲| 一本大道av一区二区在线播放| 日本不卡视频在线观看| 国产精品久久久久久久久快鸭| 欧美精品欧美精品系列| youjizz久久| 久热成人在线视频| 中文字幕一区视频| 精品国产乱码久久| 在线观看亚洲一区| 国产成人一级电影| 日本系列欧美系列| 亚洲最大成人综合| 亚洲国产电影在线观看| 日韩一区二区在线看| 欧美亚一区二区| 99综合电影在线视频| 另类小说色综合网站| 一二三四区精品视频| 中文字幕免费不卡在线| 日韩欧美国产1| 欧美日韩一区三区四区| 99国产欧美另类久久久精品| 国产在线精品一区二区不卡了 | 自拍偷拍亚洲综合| 久久一区二区视频| 欧美一区中文字幕| 欧美在线免费播放| eeuss鲁片一区二区三区| 狠狠色综合日日| 蜜臀久久99精品久久久久久9 | 亚洲图片一区二区| 成人免费视频在线观看| 国产视频不卡一区| 精品国产乱码久久久久久图片| 51午夜精品国产| 欧美日韩亚洲综合一区 | 亚洲欧美视频在线观看视频| 国产日韩欧美综合一区| 精品国产1区二区| 日韩免费电影一区| 欧美一区二区三区婷婷月色| 欧美日韩免费电影| 欧美日韩免费观看一区三区| 91老司机福利 在线| 色一区在线观看| 91福利小视频|