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

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

?? recordstoredemo.java

?? 手機的聯網應用
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/* * RecordStoreDemo.java * * Created on September 18, 2001, 9:05 PM */package cn.com.javachen;import java.util.*;import javax.microedition.midlet.*;import javax.microedition.lcdui.*;import javax.microedition.rms.*;/** * * @author  paul * @version  */public class RecordStoreDemo extends javax.microedition.midlet.MIDlet     implements CommandListener {  private Display display;  private Form mainMenuForm;  private Form dataForm;  private Form recordForm;  private Form statusForm;    private TextField recordStoreNameTextField;  private TextField filterCharacterTextField;  private TextField recordDataTextField;  private ChoiceGroup recordStoreChoice;  private Alert errorAlert;  private Alert infoAlert;  private Command cmdOK;  private Command cmdBack;  private Command cmdNext;  private Command cmdPrev;  private Command cmdDelete;  private Command cmdModify;  private Command cmdExit;  private Command cmdHelp;    private ChoiceGroup mainMenu;    private RecordStore currentRecordStore = null;  private RecordEnumeration enumeration;  private RecordFilter filter;  private int currentRecordID;  private byte[] recordData;  private boolean commandAvailable;  private Command currentCommand;  private Displayable currentDisplayable;  private int state;  private static final int ST_MAIN_MENU =                          100;  private static final int ST_GETTING_RECORD_STORE_NAME =          101;  private static final int ST_SELECTING_STORE_NAME =               102;  private static final int ST_SELECTING_STORE_NAMES_FOR_DELETION = 103;  private static final int ST_GETTING_RECORD_DATA =                104;  private static final int ST_BROWSING_STORE =                     105;  private static final int ST_MODIFYING_RECORD =                   106;  private static final int ST_AFTER_DELETION =                     107;  private static final int ST_GETTING_FILTER_CHARACTER =           108;  private static final int ST_DISPLAYING_STATUS_FORM =             109;  private String[] actions = {    "List Stores",       //  0    "Create Store",      //  1    "Select Store",      //  2    "Delete Store(s)",   //  3    "Add Record",        //  4    "Browse Records",    //  5    "Browse (filtered)", //  6    "Version",           //  7    "Last Modified",     //  8    "Get Next recID",    //  9    "Get # Recs",        // 10    "Get Size",          // 11    "Get Available",     // 12    "Close Store"        // 13  };  private static final int LIST_STORES =      0;  private static final int CREATE_STORE =     1;  private static final int SELECT_STORE =     2;  private static final int DELETE_STORE =     3;  private static final int ADD_RECORD =       4;  private static final int BROWSE_RECORDS =   5;  private static final int BROWSE_FILTERED =  6;  private static final int GET_VERSION =      7;  private static final int LAST_MODIFIED =    8;  private static final int GET_NEXT_REC_ID =  9;  private static final int GET_NUM_RECS =    10;  private static final int GET_SIZE =        11;  private static final int GET_AVAIL =       12;  private static final int CLOSE_STORE =     13;  private String[] recordSubCommands = {    "Back",    "Prev",    "Next",    "Delete",    "Modify"  };  private static final int SUB_BACK =   0;  private static final int SUB_PREV =   1;  private static final int SUB_NEXT =   2;  private static final int SUB_DELETE = 3;  private static final int SUB_MODIFY = 4;    private String msgNoRecordStores =    "MIDlet Suite contains no RecordStores";  private String msgNoCurrentRecordStore =    "You must first select a RecordStore";  private String msgRecordStoreException =    "RecordStoreException";  private String msgRecordStoreNotOpenException =    "RecordStoreNotOpenException";  private String[] helpText = {      "This command lists all of the record stores in this " +      "MIDlet suite. The RecordStore that has been designated as " +      "'active' will be indicated by '(*)'",      "This command is used to create a record store. " +      "You will be prompted for the name of the record store. " +      "After the store has been added, it will automatically " +      "be made the 'active' RecordStore and the RecordStore " +      "(if any) that had been the 'active' RecordStore is closed.",      "This command is used to designate the 'active' RecordStore " +      "(i.e. the one that is the target of subsequent commands " +      "that operate on records or request information about the " +      "RecordStore.",      "This command is used to delete the designated RecordStore. " +      "When a RecordStore is deleted, all of the records it " +      "contains are also deleted.",      "This command is used to add a record to the 'active' " +      "RecordStore. You will be presented with a screen " +      "containing a TextField into which you type the contents of " +      "the record. You can create records whose contents are " +      "identical.",      "This command is used to initiate the process of iterating " +      "over all of the records in the record store. For each " +      "record that is presented, you have the option of deleting " +      "or modifying the record or of navigating to the next or " +      "previous record if such a record exists.",      "This command is the same as the 'browse' command but it " +      "uses a filter. You will be presented with a screen " +      "containing a TextField into which you type a letter. Only " +      "those names beginning with that letter will be displayed " +      "during the browse operation.",      "This command displays the version of the 'active' " +      "RecordStore. The version number is incremented by 1 " +      "each time the RecordStore is modified (i.e. a record is " +      "added, modified or deleted).",       "This command displays the date/time the 'active' " +      "RecordStore was modified.",      "This command displays the recordID that will be assigned " +      "to the next record added to the 'active' RecordStore.",      "This command displays the total number of records in the " +      "'active' RecordStore.",      "This command displays the amount of space, in bytes, that " +      "the 'active' RecordStore occupies.",      "This command displays the additional room (in bytes) " +      "available for the 'active' RecordStore to grow. You should " +      "NOT make any decision related to storage based on this number.",      "This command is used to close the 'active' RecordStore."    };  public void startApp() {    display = Display.getDisplay(this);    cmdOK =     new Command("OK",Command.SCREEN,1);    cmdBack =   new Command("Back",Command.SCREEN,1);    cmdNext =   new Command("Next",Command.SCREEN,1);    cmdPrev =   new Command("Prev",Command.SCREEN,1);    cmdDelete = new Command("Delete",Command.SCREEN,1);    cmdModify = new Command("Modify",Command.SCREEN,1);    cmdHelp =   new Command("Help",Command.SCREEN,1);    cmdExit =   new Command("Exit",Command.SCREEN,1);    mainMenuForm = new Form("Menu");    mainMenu = new ChoiceGroup("Action",Choice.EXCLUSIVE,       actions, null);    mainMenuForm.append(mainMenu);    recordForm = new Form("RECORD DATA");    recordForm.addCommand(cmdBack);    recordForm.addCommand(cmdDelete);    recordForm.addCommand(cmdModify);    recordForm.setCommandListener(this);    dataForm = new Form(null);    dataForm.setCommandListener(this);    dataForm.addCommand(cmdOK);    recordStoreNameTextField =       new TextField("Store Name",null,32,TextField.ANY);    recordDataTextField =       new TextField("Record Data",null,80,TextField.ANY);    filterCharacterTextField =       new TextField("Filter Character",null,1,TextField.ANY);    statusForm = new Form(null);    statusForm.setCommandListener(this);    statusForm.addCommand(cmdOK);    mainMenuForm.addCommand(cmdOK);    mainMenuForm.addCommand(cmdHelp);     mainMenuForm.addCommand(cmdExit);     commandAvailable = false;    new CommandThread(this).start();        infoAlert = new Alert("Help");    infoAlert.setType(AlertType.INFO);    infoAlert.setTimeout(Alert.FOREVER);    errorAlert = new Alert("Error");    errorAlert.setType(AlertType.ERROR);    errorAlert.setTimeout(Alert.FOREVER);            mainMenuForm.setCommandListener(this);    display.setCurrent(mainMenuForm);  }  public void pauseApp() {  }  public void destroyApp(boolean unconditional) {  }  public void commandAction(Command cmd, Displayable d) {    if (cmd == cmdExit) {      destroyApp(true);      notifyDestroyed();    }    else if (cmd == cmdHelp) {      int index = mainMenu.getSelectedIndex();      infoAlert.setTitle(mainMenu.getString(index));      infoAlert.setString(helpText[mainMenu.getSelectedIndex()]);      display.setCurrent(infoAlert, mainMenuForm);    }    else {      synchronized (this) {        currentCommand = cmd;        currentDisplayable = d;        commandAvailable = true;        notify();      }    }  }  class CommandThread extends Thread {    MIDlet parent;    public CommandThread(MIDlet parent) {      this.parent = parent;    }    public void run() {      while (true) {        synchronized(parent) {          while(!commandAvailable) {            try {              parent.wait();            }            catch (InterruptedException e) {            }          }        }        commandAvailable = false;              if (currentDisplayable == mainMenuForm) {          processMainMenuItem();        }        else if (currentDisplayable == dataForm) {          processDataForm();        }        else if (currentDisplayable == recordForm) {          processRecordForm();        }        else if (currentDisplayable == statusForm) {          if (state == ST_AFTER_DELETION) {            state = ST_BROWSING_STORE;            displayRecordData();          }          else {            displayMainMenu();          }        }      }    }    private void displayDataForm(int st) {      state = st;      display.setCurrent(dataForm);    }    private void displayStatusForm(int st) {      state = st;      display.setCurrent(statusForm);    }    private void displayMainMenu() {      mainMenu.setSelectedIndex(0,true);      state = ST_MAIN_MENU;      display.setCurrent(mainMenuForm);    }    private void processMainMenuItem() {      int commandIndex = mainMenu.getSelectedIndex();      if (commandRequiresOpenStore(commandIndex))        if (!storeOpen()) {          displayAlert(errorAlert, msgNoCurrentRecordStore);          return;        }      switch (commandIndex) {        case LIST_STORES:          displayRecordStoreList();          break;        case CREATE_STORE:          requestRecordStoreName();          break;        case SELECT_STORE:          requestRecordStoreFromList("SELECT", ChoiceGroup.EXCLUSIVE);          break;        case DELETE_STORE:          requestRecordStoreFromList("DELETE", ChoiceGroup.MULTIPLE);          break;        case ADD_RECORD:          requestRecordData();          break;        case BROWSE_RECORDS:          filter = null;          startIteration();          break;        case BROWSE_FILTERED:          requestFilterCharacter();          break;        case GET_VERSION:          displayVersion();          break;        case LAST_MODIFIED:          displayLastModified();          break;        case GET_NEXT_REC_ID:          displayNextRecID();          break;        case GET_NUM_RECS:          displayRecordCount();          break;        case GET_SIZE:          displaySize();          break;       case GET_AVAIL:          displayAvailable();          break;         case CLOSE_STORE:          closeRecordStore();          break;        default:          break;       }    }    private boolean commandRequiresOpenStore(int index) {      if ((index == ADD_RECORD) ||          (index == BROWSE_RECORDS) ||          (index == BROWSE_FILTERED) ||          (index == GET_VERSION) ||          (index == LAST_MODIFIED) ||          (index == GET_NEXT_REC_ID) ||          (index == GET_NUM_RECS) ||          (index == GET_SIZE) ||          (index == GET_AVAIL) ||          (index == CLOSE_STORE)) {        return true;      }      else {       return false;      }    }    private boolean storeOpen() {      boolean open = true;      try {        getCurrentStoreName();      }      catch (RecordStoreNotOpenException e) {        open = false;      }    return open;    }    private void displayAlert(Alert alert, String message) {      alert.setString(message);      mainMenu.setSelectedIndex(0,true);      state = ST_MAIN_MENU;      display.setCurrent(alert,mainMenuForm);    }    private void displayNextRecord() {      try {        currentRecordID = enumeration.nextRecordId();        recordData = currentRecordStore.getRecord(currentRecordID);        displayRecordData();      }      catch (InvalidRecordIDException e) {        displayAlert(errorAlert,"Invalid RecordID");      }      catch (RecordStoreNotOpenException e) {        displayAlert(errorAlert,"RecordStore not open");      }      catch (RecordStoreException e) {        displayAlert(errorAlert,"RecordStoreException");      }    }    private void displayPreviousRecord() {      try {        currentRecordID = enumeration.previousRecordId();        recordData = currentRecordStore.getRecord(currentRecordID);        displayRecordData();      }      catch (InvalidRecordIDException e) {        displayAlert(errorAlert,"Invalid RecordID");      }      catch (RecordStoreNotOpenException e) {        displayAlert(errorAlert,"RecordStore not open");      }      catch (RecordStoreException e) {        displayAlert(errorAlert,"RecordStoreException");      }    }    private void displayRecordData() {      clearForm(recordForm);      recordForm.removeCommand(cmdPrev);      recordForm.removeCommand(cmdNext);      if (enumeration.hasNextElement()) {        recordForm.addCommand(cmdNext);      }      if (enumeration.hasPreviousElement()) {        recordForm.addCommand(cmdPrev);      }      recordForm.setTitle("Record #: " +         Integer.toString(currentRecordID));      recordForm.append(new StringItem(null,new String(recordData)));      state = ST_BROWSING_STORE;      display.setCurrent(recordForm);   }    private void processRecordForm() {      int subCommandIndex = 0;      String label = currentCommand.getLabel();      for (int i = 0; i < recordSubCommands.length; ++i) {        if (recordSubCommands[i].equals(label)) {          subCommandIndex = i;          break;        }      }      switch (subCommandIndex) {        case SUB_BACK:          displayMainMenu();          break;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩国产一级| 成人性生交大片免费看视频在线| 国产精品久久久久aaaa樱花| 国产日韩精品一区| 国产欧美一区二区精品性| 国产人妖乱国产精品人妖| 国产亚洲一区二区在线观看| 中文字幕不卡在线观看| 国产精品国产精品国产专区不片| 国产日韩欧美精品一区| 亚洲欧美一区二区三区极速播放| 中文字幕一区二区三区四区不卡 | 91黄色激情网站| 中文字幕av在线一区二区三区| 欧美一区二区在线免费播放| 日韩免费高清电影| 中文久久乱码一区二区| 亚洲图片一区二区| 国产盗摄女厕一区二区三区 | 欧美日韩高清一区二区| 欧美电影精品一区二区| 欧美日韩卡一卡二| 欧美日韩免费观看一区二区三区 | 911精品国产一区二区在线| 欧美一区二区成人6969| 国产精品免费av| 蜜臀av性久久久久蜜臀aⅴ流畅| 成人自拍视频在线观看| 777精品伊人久久久久大香线蕉| 国产视频一区在线观看| 日本不卡免费在线视频| 欧美日韩色一区| 成人欧美一区二区三区白人| 老司机午夜精品| 欧美视频中文一区二区三区在线观看 | 国产成人av一区| 日韩视频一区二区三区| 日韩成人午夜精品| 欧洲激情一区二区| 一区二区三区美女| 色综合色综合色综合色综合色综合 | 欧美日韩国产系列| 亚洲成人综合网站| 欧美日韩精品一区二区在线播放| 一区免费观看视频| 91片黄在线观看| 一区二区三区在线免费视频| 91美女在线观看| 亚洲一区在线看| 日韩精品在线网站| 懂色av一区二区夜夜嗨| 国产精品高潮呻吟久久| 色诱视频网站一区| 五月天激情小说综合| 欧美刺激脚交jootjob| 国产精品综合网| 亚洲美女在线国产| 欧美日韩国产系列| 久99久精品视频免费观看| 国产精品久久一级| 5858s免费视频成人| 久久99热99| 亚洲一区二区视频在线观看| 日韩亚洲欧美高清| 91免费观看国产| 免费在线看成人av| 亚洲欧美色一区| 日本成人中文字幕| 久久这里只精品最新地址| 欧美色综合天天久久综合精品| 久久99精品久久久久婷婷| 亚洲柠檬福利资源导航| 国产午夜一区二区三区| 精品裸体舞一区二区三区| 91黄色小视频| 在线观看亚洲专区| 色偷偷久久一区二区三区| 国产91精品一区二区麻豆网站| 奇米精品一区二区三区四区| 一区二区三区日韩欧美精品| 亚洲精品视频在线| 亚洲视频免费在线观看| 国产精品午夜在线| 日韩美女啊v在线免费观看| 久久精品欧美一区二区三区不卡| 国产日韩欧美亚洲| 在线免费不卡电影| 久久99精品一区二区三区三区| 国产精品美女久久久久av爽李琼| 在线观看亚洲精品视频| 日韩精品久久久久久| 欧美伊人久久久久久午夜久久久久| 一区二区三区欧美| 久久久久国产免费免费 | 欧美日韩国产精品成人| 91精品欧美一区二区三区综合在| 欧美日本视频在线| 91精品欧美久久久久久动漫 | 久久久电影一区二区三区| 国产精品久久久久影院老司| 国产精品福利一区二区三区| 亚洲欧洲av色图| 亚洲综合丝袜美腿| 日韩国产精品久久久久久亚洲| 奇米一区二区三区| 色美美综合视频| 欧美一区二区视频在线观看2020| 欧美裸体bbwbbwbbw| 久久美女艺术照精彩视频福利播放 | 欧美一卡二卡三卡四卡| 中文一区在线播放| 亚洲制服欧美中文字幕中文字幕| 日韩精品乱码免费| 色呦呦一区二区三区| 欧美精品一区二区精品网| 亚洲制服丝袜一区| 91视频观看免费| 久久久美女毛片| 性做久久久久久免费观看| 国产精品12区| 日韩欧美视频一区| 国产精品美女视频| 国产在线精品一区二区| 日韩视频在线永久播放| 亚洲 欧美综合在线网络| 欧美在线观看禁18| 国产精品国产自产拍高清av王其| 国产曰批免费观看久久久| 欧美日韩国产a| 夜夜揉揉日日人人青青一国产精品 | 久久精品国产一区二区三区免费看| 欧美亚洲日本国产| 自拍偷拍国产精品| 成人午夜碰碰视频| 久久久三级国产网站| 国产aⅴ精品一区二区三区色成熟| 国产日本欧洲亚洲| 成人av在线资源| 亚洲欧洲成人自拍| 色哟哟一区二区在线观看| 一区二区在线观看免费视频播放| 一本久久综合亚洲鲁鲁五月天| 亚洲摸摸操操av| 91精选在线观看| hitomi一区二区三区精品| 国产精品日韩成人| 欧美在线free| 狠狠色综合日日| 午夜影院久久久| 久久久久久久久久久黄色| 91福利国产精品| 久久精品国产澳门| 中文字幕一区二区三区在线播放 | 欧美成人aa大片| 色婷婷综合久久久中文一区二区| 天天色天天爱天天射综合| 日韩视频免费观看高清完整版 | 成熟亚洲日本毛茸茸凸凹| 视频一区视频二区在线观看| 久久久亚洲午夜电影| 一本到不卡免费一区二区| 久久激情综合网| 亚洲一区二区三区四区五区中文| 国产精品美女久久久久久久久| 欧美日韩黄色一区二区| 91在线免费看| 国产一区二区三区精品欧美日韩一区二区三区 | 成人午夜激情影院| 视频一区二区中文字幕| 中文字幕一区二区在线播放| 91精品国产色综合久久久蜜香臀| 国产99久久久国产精品潘金| 国产真实乱偷精品视频免| 日本不卡视频在线| 日韩av一区二| 亚洲一区二区四区蜜桃| 一区二区三区丝袜| 亚洲色图一区二区| 亚洲裸体xxx| 夜夜精品视频一区二区| 亚洲一区二区高清| 亚瑟在线精品视频| 亚洲一区二区三区四区在线观看 | av电影在线观看不卡| 色悠久久久久综合欧美99| 一本久久a久久免费精品不卡| 色综合久久久网| 88在线观看91蜜桃国自产| 精品少妇一区二区三区日产乱码| 欧美日韩精品一区二区在线播放| 欧美日韩国产小视频在线观看| 欧美一级一区二区| 久久亚洲综合色一区二区三区| 日本一区二区免费在线观看视频| 亚洲国产高清在线| 亚洲永久精品大片| 视频一区中文字幕| 成人激情黄色小说| 日韩欧美一级片| 亚洲一区二区三区国产|