Package javax.microedition.lcdui

Examples of javax.microedition.lcdui.List


          display.quit();
        } else {
          display.setCurrent(menu);
        }
      } else if (d == menu) {
        List list = (List) display.getCurrent();
        if (list.getSelectedIndex() == 0) {
          display.setCurrent(input);
        } else if (list.getSelectedIndex() == 1) {
          display.setCurrent(choose);
        } else if (list.getSelectedIndex() == 2) {
          display.setCurrent(soundAlert);
          alertGauge.setValue(0);
          gaugeTimer.start();
        } else if (list.getSelectedIndex() == 3) {
          display.setCurrent(form1);
        } else if (list.getSelectedIndex() == 4) {
          display.setCurrent(form2);
        }
      }
    }
  }
View Full Code Here


    public RMSDemo() {
        try {
            // Initialize members
            _db = new CDdb("My Music");
            _enum = _db.enumerate();
            _list = new List("My CD Collection", Choice.IMPLICIT);

            _mainAdd = new Command("Add CD", Command.ITEM, 1);
            _mainEdit = new Command("Edit CD", Command.ITEM, 2);
            _mainDelete = new Command("Delete CD", Command.ITEM, 3);
            _mainExit = new Command("Close", Command.EXIT, 4);
View Full Code Here

      first.addCommand(exitCommand);
      currentPath = null;
      break;

    case 1:
      List p = (List) Display.getDisplay(m).getCurrent();
      int i = p.getSelectedIndex();
      String path = p.getString(i);
      if (!(path.endsWith(".mp3") || path.endsWith(".txt"))) {
        DirectoryList fileList;
        if (q != 0) {
          String title = p.getTitle();
          fileList = new DirectoryList(title + path);
          currentPath = title + path;
        } else {
          fileList = new DirectoryList("file:///" + path);
          currentPath = "file:///" + path;
        }
        Display.getDisplay(m).setCurrent(fileList);
        fileList.setCommandListener(this);
        fileList.addCommand(backCommand);
        fileList.addCommand(editTagCommand);
        break;
      }

    case 2:
      List l = (List) Display.getDisplay(m).getCurrent();
      int j = l.getSelectedIndex();
      String file_or_path = l.getTitle() + l.getString(j);
      Displayable f = null;
      currentPath = file_or_path;
      if (file_or_path.endsWith("/")) {
        f = new DirectoryEditor(file_or_path);
        f.addCommand(saveCommand);
View Full Code Here

TOP

Related Classes of javax.microedition.lcdui.List

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.