public List getL_vars() { if (l_vars == null) { l_vars = new List("\u041F\u0435\u0440\u0435\u043C\u0435\u043D\u043D\u044B\u0435", Choice.IMPLICIT); l_vars.addCommand(getC_canvas()); l_vars.addCommand(getC_insert()); l_vars.addCommand(getC_delvar()); l_vars.setCommandListener(this); } return l_vars; }
private void LiveCameras() { LiveCameras = new List("Live Cameras", Choice.IMPLICIT); viewImage = new Command("view", Command.OK, 1); camList = new Command("back", Command.BACK, 2); refreshList = new Command("refresh List", Command.OK, 0); LiveCameras.addCommand(viewImage); LiveCameras.addCommand(camList); LiveCameras.addCommand(refreshList); LiveCameras.setCommandListener(this); new Thread() { public void run() { controller.showProgressBar(); } }.start(); refreshCamList(); }
public void initialize() { Stages = new List("Stages ", List.IMPLICIT); // Stages.append(arg0, append());append() backToNo = new Command("back", Command.BACK, 1); MapStages = new Command("view in Map", Command.OK, 3); showBuses = new Command("Buses through this stage", Command.OK, 2); Stages.addCommand(backToNo); Stages.setCommandListener(this); busesNearMe = new List("Buses ", List.IMPLICIT); backToPlaces = new Command("back", Command.BACK, 1); showStages = new Command("view stages ", Command.BACK, 1); busesNearMe.addCommand(showStages); busesNearMe.addCommand(viewBusPosition); busesNearMe.addCommand(backToPlaces); busesNearMe.setCommandListener(this); }
public void commandAction(Command command, Item item) { if (recentList.isEmpty()) return; parentView = display.getCurrent(); cmdBack = new Command(SR.MS_BACK, Command.BACK, 99); cmdSelect = new Command(SR.MS_SELECT, Command.OK, 1); cmdClear = new Command(SR.MS_CLEAR, command.SCREEN, 2); list = new List(label, List.IMPLICIT); list.addCommand(cmdBack); list.addCommand(cmdClear); list.setSelectCommand(cmdSelect); for (Enumeration e = recentList.elements(); e.hasMoreElements(); ) list.append((String) e.nextElement(), null); list.setCommandListener(this); display.setCurrent(list); }
public void startApp() { // Create Record Store try { rs = RecordStore.openRecordStore("myrs", true); } catch (RecordStoreException e) { } dsp = Display.getDisplay(this); listMenu.setCommandListener(this); listMenu.addCommand(cmdExit); dsp.setCurrent(listMenu); }
public List getL_history() { if (l_history == null) { l_history = new List( "\u0418\u0441\u0442\u043E\u0440\u0438\u044F \u0432\u044B\u0447\u0438\u0441\u043B\u0435\u043D\u0438\u0439", Choice.IMPLICIT); l_history.addCommand(getC_canvas()); l_history.addCommand(getC_insert()); l_history.setCommandListener(this); } return l_history; }
public void startApp() { if (mDisplay == null) { mDisplay = Display.getDisplay(this); } if (mMenu == null) { mMenu = new List("MohairMIDlet", List.IMPLICIT); mMenu.append(kQuerySlots, null); mMenu.append(kSignTest, null); mBackCommand = new Command("Back", Command.BACK, 0); mExitCommand = new Command("Exit", Command.EXIT, 0); mMenu.addCommand(mExitCommand); mMenu.setCommandListener(this); } mDisplay.setCurrent(mMenu); }
/** * @param userManager * @param backScreen * @param midlet */ public Lists(UserAccountManager userManager, Displayable backScreen, MIDlet midlet) { this.userManager = userManager; this.midlet = midlet; this.backScreen = backScreen; // listUI = new List("Lists", List.IMPLICIT); // select = new Command("Select", Command.OK, 0); back = new Command("Back", Command.BACK, 0); // listUI.addCommand(select); listUI.addCommand(back); listUI.setCommandListener(this); }
protected void startApp() throws MIDletStateChangeException { // TODO Auto-generated method stub // mDisplay.setCurrent(mForm); CCL.mDisplay.setCurrent(new HomeScreenCanvas()); mCanvas = new HomeScreenCanvas(); mCanvas.setTitle("Celebrity Cricket League"); mCanvas.addCommand(home); mCanvas.addCommand(videos); mCanvas.addCommand(team); mCanvas.addCommand(photos); mCanvas.addCommand(schedule); mCanvas.addCommand(ownerlounge); mCanvas.setCommandListener(this); hideOpenKeypadCommand(); mDisplay.setCurrent(mCanvas); // mDisplay.setCurrent(new HomeScreenCanvas()); Pform = new Form("Photo Albums"); Pform.addCommand(backCommand); Pform.setCommandListener(this); Vform = new Form("Video Albums"); Vform.addCommand(backCommand); Vform.setCommandListener(this); mList.addCommand(backCommand); mList.setCommandListener(this); }
private static void List(final String str, final Displayable retd) { final List l = new List(str, List.IMPLICIT); for (int i = 1; i < st.size(); i += 2) l.append((String) st.elementAt(i), null); l.addCommand(Interface.exit); // l.addCommand(MyI.ok); l.setSelectCommand(Interface.ok); l.setCommandListener( new CommandListener() { public void commandAction(Command c, Displayable s) { if (c == Interface.ok) { if (st.size() == 1) MobNav1.display.setCurrent(retd); else { int i = l.getSelectedIndex(); list( l, (String) st.elementAt((i << 1) + 1), ((Location) (st.elementAt((i << 1)))).GetPoint()); // MyCanvas.SetGP(((Location)(st.elementAt((i<<1)+1))).GetPoint()); // MobNav1.display.setCurrent(MobNav1.gCanvas); } } else { MobNav1.display.setCurrent(retd); } } }); MobNav1.display.setCurrent(l); }
private void enterGoto() { gotoList = new List("GoTo", List.IMPLICIT); int n = tocSection.length; for (int i = 0; i < n; i++) gotoList.append(tocLabel[i], null); gotoList.addCommand(cancelCmd); gotoList.setCommandListener(this); display.setCurrent(gotoList); }
private void enterBooks() { booksList = new List("Books", List.IMPLICIT); int n = books.length; for (int i = 0; i < n; i++) booksList.append(books[i], null); booksList.addCommand(cancelCmd); booksList.setCommandListener(this); display.setCurrent(booksList); }
/** Creates a new instance of DiscoFeatures */ public DiscoFeatures(Display display, String entity, Vector features) { if (features.isEmpty()) return; list = new List(entity, List.IMPLICIT); for (Enumeration i = features.elements(); i.hasMoreElements(); ) { String feature = (String) (i.nextElement()); list.append(feature, null); } list.addCommand(cmdBack); list.addCommand(cmdOk); parentView = display.getCurrent(); this.display = display; list.setCommandListener(this); display.setCurrent(list); }
public ContactsScreen(String id, Resoursable resoursable) { super(id, resoursable); contacts = new List(getLocalizedText(LocaleUI.CONTACTS_COMMAND_TITLE), List.IMPLICIT); selectCommand = new Command(getLocalizedText(LocaleUI.CONTACTS_COMMAND_SELECT), Command.SCREEN, 0); updateCommand = new Command(getLocalizedText(LocaleUI.CONTACTS_COMMAND_UPDATE), Command.SCREEN, 1); backCommand = new Command(getLocalizedText(LocaleUI.CONTACTS_COMMAND_BACK), Command.BACK, 0); ContactsBean bean = (ContactsBean) Engine.getEngine().getBean(getId()); if (bean == null) { Engine.getEngine().putBean(id, new ContactsBean()); } contacts.addCommand(updateCommand); contacts.addCommand(backCommand); contacts.setCommandListener(this); contacts.setTicker(new Ticker(getLocalizedText(LocaleUI.CONTACTS_TICKER_TEXT))); // addConsole(this.form); }
private List createEmptyList() { String title = orgTitle; // don't show "file:///" if (url.toLowerCase().startsWith("file:///")) { // if in root dir show original list title if (url.length() == 8) { title = orgTitle; } else { title = url.substring(8); } } List list = new List(title, Choice.IMPLICIT); list.addCommand(BACK_CMD); list.addCommand(OK_CMD); list.addCommand(UP_CMD); list.addCommand(ROOT_CMD); list.setCommandListener(this); list.setSelectCommand(DOWN_CMD); return list; }
/** Constructs client GUI. */ GUIImageClient(DemoMIDlet parent) { this.parent = parent; bt_client = new BTImageClient(this); mainScreen.addCommand(SCR_MAIN_BACK_CMD); mainScreen.addCommand(SCR_MAIN_SEARCH_CMD); mainScreen.setCommandListener(this); listScreen.addCommand(SCR_IMAGES_BACK_CMD); listScreen.addCommand(SCR_IMAGES_LOAD_CMD); listScreen.setCommandListener(this); imageScreen.addCommand(SCR_SHOW_BACK_CMD); imageScreen.setCommandListener(this); }
public List showList(String title, String[] sArray) { if (list == null) { list = new List(title, Choice.IMPLICIT, sArray, null); list.addCommand(backCommand); list.setCommandListener(this); } else { list.setTitle(title); int listSize = list.size(); for (int i = 0; i < listSize; i++) { list.delete(0); } for (int i = 0; i < sArray.length; i++) { list.append(sArray[i], null); } } return list; }
public void commandAction(Command c, Displayable d) { if (c == EXIT_CMD) { if (d == this) { parent.show(); } else { show(); } } if (c == ADD_CMD) { this.addTag = true; TextField tf = new TextField("key", "", 100, TextField.ANY); tf.addCommand(OK_CMD); tf.setItemCommandListener(this); this.append(tf); Display.getDisplay(GpsMid.getInstance()).setCurrentItem(tf); tf = new TextField("value", "", 100, TextField.ANY); tf.addCommand(OK_CMD); tf.setItemCommandListener(this); this.append(tf); } if (c == UPLOAD_CMD) { parent.show(); eway.uploadXML(this); } if (c == REVERSE_CMD) { osmway.reverseWay(); } if (c == PRESET_CMD) { presets = new List("Tagging Presets", List.IMPLICIT); presets.append("maxspeed=20 mph", null); presets.append("maxspeed=30 mph", null); presets.append("oneway=yes", null); presets.append("name=", null); presets.append("ref=", null); presets.append("lcn_ref=", null); presets.append("foot=yes", null); presets.append("bicycle=yes", null); presets.append("motorcar=yes", null); presets.append("access=private", null); presets.append("maxweight=7.5", null); presets.append("maxlength=18", null); presets.append("maxwidth=3", null); presets.append("maxheigt=4", null); presets.addCommand(OK_CMD); presets.addCommand(EXIT_CMD); presets.setCommandListener(this); presets.setSelectCommand(OK_CMD); GpsMid.getInstance().show(presets); } if (c == OK_CMD) { String addPreset = presets.getString(presets.getSelectedIndex()); int split = addPreset.indexOf("="); osmway .getTags() .put(addPreset.substring(0, split), addPreset.substring(split + 1, addPreset.length())); presets = null; setupScreen(); show(); } }