private void startComponents() { this.cmdBack = new Command("Back", Command.BACK, 0); this.addCommand(this.cmdBack); this.setCommandListener(this); }
/*************************************************************************** * Returns the javax.microedition.lcdui.List instance to append the result * data to. Will be created if it doesn't exist. * * @return A javax.microedition.lcdui.List object */ protected List getResultsList() { if (aResultsList == null) { aResultsList = new List("J2ME Unit", List.IMPLICIT); // v.s. aResultsList.addCommand(cmd_exit); aResultsList.setCommandListener(this); } return aResultsList; }
private void startComponents() { this.cmdBack = new Command("Back", Command.BACK, 0); this.addCommand(this.cmdBack); this.cmdLeave = new Command("Leave", Command.ITEM, 1); this.addCommand(this.cmdLeave); this.setCommandListener(this); }
private void startComponents() { this.txtBedNumber = new TextField("Bed number", String.valueOf(bed.getNumber()), 3, TextField.NUMERIC); this.append(this.txtBedNumber); this.txtBedFloor = new TextField("Bed floor", String.valueOf(bed.getFloor()), 15, TextField.NUMERIC); this.append(this.txtBedFloor); this.cmdOk = new Command("Ok", Command.OK, 0); this.addCommand(this.cmdOk); this.cmdCancel = new Command("Cancel", Command.CANCEL, 1); this.addCommand(this.cmdCancel); this.setCommandListener(this); } }
listaChurras.addCommand(CommandHandler.BACK_CMD); listaChurras.addCommand(CommandHandler.EXIT_CMD); listaChurras.setCommandListener(CommandHandler.getInstance());
private void startComponents() { this.txtSearch = new TextField("Name", null, 20, TextField.ANY); this.append(this.txtSearch); this.cmdOk = new Command("Ok", Command.OK, 0); this.addCommand(this.cmdOk); this.cmdCancel = new Command("Cancel", Command.CANCEL, 1); this.addCommand(this.cmdCancel); this.setCommandListener(this); } }
private void startComponents() { this.txtFormation = new TextField("Formation", formation.getFormation(), 30, TextField.ANY); this.append(this.txtFormation); this.cmdOk = new Command("Ok", Command.OK, 0); this.addCommand(this.cmdOk); this.cmdCancel = new Command("Cancel", Command.CANCEL, 1); this.addCommand(this.cmdCancel); this.setCommandListener(this); } }
private void startComponents() { this.cmdBack = new Command("Back", Command.BACK, 0); this.addCommand(this.cmdBack); this.cmdCreate = new Command("Create", Command.ITEM, 1); this.addCommand(this.cmdCreate); this.cmdEdit = new Command("Edit", Command.ITEM, 2); this.addCommand(this.cmdEdit); this.cmdDelete = new Command("Delete", Command.ITEM, 3); this.addCommand(this.cmdDelete); this.setCommandListener(this); }
private void startComponents() { this.cmdBack = new Command("Back", Command.BACK, 0); this.addCommand(this.cmdBack); this.cmdCreate = new Command("Create", Command.ITEM, 1); this.addCommand(this.cmdCreate); this.cmdEdit = new Command("Edit", Command.ITEM, 2); this.addCommand(this.cmdEdit); this.cmdDelete = new Command("Delete", Command.ITEM, 3); this.addCommand(this.cmdDelete); this.setCommandListener(this); }
private void startComponents() { this.cmdBack = new Command("Back", Command.BACK, 0); this.addCommand(this.cmdBack); this.cmdCreate = new Command("Create", Command.ITEM, 1); this.addCommand(this.cmdCreate); this.cmdEdit = new Command("Edit", Command.ITEM, 2); this.addCommand(this.cmdEdit); this.cmdDelete = new Command("Delete", Command.ITEM, 3); this.addCommand(this.cmdDelete); this.setCommandListener(this); }
/** * Create a RecordStoreLogViewer. */ public RecordStoreLogViewer() { super(); display = Display.getDisplay(this); logScreen = new Form("Log content"); logScreen.addCommand(loadLogCommand); logScreen.addCommand(clearLogCommand); logScreen.addCommand(preferenceCommand); logScreen.addCommand(exitCommand); logScreen.addCommand(switchComparatorCommand); logScreen.setCommandListener(this); preferenceScreen = new Form("Preferences"); nameField = new TextField("RecordStore name ", null, MAX_NAME_LENGTH, TextField.ANY); preferenceScreen.append(nameField); preferenceScreen.addCommand(preferenceOkCommand); preferenceScreen.addCommand(preferenceCancelCommand); preferenceScreen.addCommand(exitCommand); preferenceScreen.setCommandListener(this); }
/** * DOCUMENT ME! */ public void salvarChurrasco() { Form salvarChurrasForm = new Form("Save barbecue"); salvarChurrasForm.append(new TextField( "Give a name to the barbecue to save: ", "", 30, TextField.ANY)); salvarChurrasForm.addCommand(CommandHandler.SAVE_BARBECUE_CMD); salvarChurrasForm.addCommand(CommandHandler.BACK_CMD); salvarChurrasForm.setCommandListener(CommandHandler.getInstance()); try { DisplayManager.getInstance().show(salvarChurrasForm, true); } catch (DisplayManagerNotStartedException e) { } }
private void startComponents() { this.cmdBack = new Command("Back", Command.BACK, 0); this.addCommand(this.cmdBack); this.cmdCreate = new Command("Create", Command.ITEM, 1); this.addCommand(this.cmdCreate); this.cmdEdit = new Command("Edit", Command.ITEM, 2); this.addCommand(this.cmdEdit); this.cmdDelete = new Command("Delete", Command.ITEM, 3); this.addCommand(this.cmdDelete); this.cmdSearch = new Command("Search", Command.ITEM, 4); this.addCommand(this.cmdSearch); this.setCommandListener(this); }
/** * Creates a new BarbecueCalculatorMIDlet object. */ public BarbecueCalculatorMIDlet() { try { DisplayManager.startDisplayManager(this); FlowManager.startFlowManager(this); this.initialScreen = new InitialScreenCanvas(); this.initialScreen.addCommand(CommandHandler.CALCULATE_CMD); this.initialScreen.addCommand(CommandHandler.SAVED_CMD); this.initialScreen.addCommand(CommandHandler.ABOUT_CMD); this.initialScreen.addCommand(CommandHandler.EXIT_CMD); this.initialScreen.setCommandListener(CommandHandler.getInstance()); DisplayManager.getInstance().pushToShowStack(this.initialScreen); } catch (Exception e) { } }
/** * DOCUMENT ME! */ protected void startComponents() { this.append("Formations", null); this.append("Beds", null); this.append("Doctors", null); this.append("Patients", null); this.append("-----", null); this.append("Add internment", null); this.append("Leave patient", null); this.append("-----", null); this.append("Free beds report", null); this.cmdExit = new Command("Exit", Command.ITEM, 3); this.addCommand(this.cmdExit); this.setCommandListener(this); } }
private void startComponents() { this.dtEnter = new DateField("Enter date", DateField.DATE); this.dtEnter.setDate(new Date()); this.append(this.dtEnter); this.txtReason = new TextField("Reason", internment.getReason(), 100, TextField.ANY); this.append(this.txtReason); this.cgPatients = new ChoiceGroup("Patient", ChoiceGroup.EXCLUSIVE); this.append(cgPatients); this.cgDoctors = new ChoiceGroup("Doctor", ChoiceGroup.EXCLUSIVE); this.append(cgDoctors); this.cgBeds = new ChoiceGroup("Beds", ChoiceGroup.EXCLUSIVE); this.append(cgBeds); this.cmdOk = new Command("Ok", Command.OK, 0); this.addCommand(this.cmdOk); this.cmdCancel = new Command("Cancel", Command.CANCEL, 1); this.addCommand(this.cmdCancel); this.setCommandListener(this); } }
/** * DOCUMENT ME! */ public void showAboutForm() { Form aboutForm = new Form("About"); aboutForm.append(new StringItem("Barbecue Calculator Floggynized", "Calculator of itens to do a barbecue.")); aboutForm.append(new StringItem("Author: ", "Neto Marin")); aboutForm.append(new StringItem("Contatc: ", "netomarin@gmail.com")); aboutForm.append(new StringItem("Floggynizer: ", "Thiago Moreira")); aboutForm.append(new StringItem("Contatc: ", "thiago.moreira@floggy.org")); aboutForm.addCommand(CommandHandler.BACK_CMD); aboutForm.setCommandListener(CommandHandler.getInstance()); try { DisplayManager.getInstance().show(aboutForm, true); } catch (DisplayManagerNotStartedException e) { } }
/** * DOCUMENT ME! */ public void exibirDadosChurrasForm() { Form barbecueForm = new Form("Churras Calculator"); barbecueForm.append(new TextField("# men", "", 3, TextField.NUMERIC)); barbecueForm.append(new TextField("# woman", "", 3, TextField.NUMERIC)); barbecueForm.append(new ChoiceGroup("", Choice.MULTIPLE, new String[] { " With Caipirinha" }, new Image[] { null })); barbecueForm.append(new Gauge("Alchool level", true, 5, 3)); barbecueForm.append(new Gauge("Food level", true, 5, 3)); barbecueForm.addCommand(CommandHandler.CALCULATE_CMD); barbecueForm.addCommand(CommandHandler.BACK_CMD); barbecueForm.setCommandListener(CommandHandler.getInstance()); try { DisplayManager.getInstance().show(barbecueForm, true); } catch (DisplayManagerNotStartedException e) { } }
aForm.setCommandListener(this);
private void startComponents() { this.txtName = new TextField("Name", doctor.getName(), 30, TextField.ANY); this.append(this.txtName); this.txtPassport = new TextField("Passport", doctor.getPassport(), 30, TextField.ANY); this.append(this.txtPassport); this.dtBornDate = new DateField("Born date", DateField.DATE); this.dtBornDate.setDate(doctor.getBornDate()); this.append(this.dtBornDate); this.txtCRM = new TextField("CRM", doctor.getCrm(), 30, TextField.ANY); this.append(this.txtCRM); this.cgFormation = new ChoiceGroup("Formation", ChoiceGroup.MULTIPLE); this.append(cgFormation); this.cmdOk = new Command("Ok", Command.OK, 0); this.addCommand(this.cmdOk); this.cmdCancel = new Command("Cancel", Command.CANCEL, 1); this.addCommand(this.cmdCancel); this.setCommandListener(this); } }