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); } }
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.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); } }
private void startComponents() { this.txtName = new TextField("Name", patient.getName(), 30, TextField.ANY); this.append(this.txtName); this.txtPassport = new TextField("Passport", patient.getPassport(), 30, TextField.ANY); this.append(this.txtPassport); this.append(this.dtBornDate); this.txtAddress = new TextField("Address", patient.getAddress(), 100, TextField.ANY); this.append(txtAddress); this.txtHomePhone = new TextField("Home", patient.getHomePhone(), 20, TextField.PHONENUMBER); this.append(this.txtHomePhone); this.txtCellPhone = new TextField("Cell", patient.getCellPhone(), 20, TextField.PHONENUMBER); this.append(this.txtCellPhone); this.txtWorkPhone = new TextField("Work", patient.getCellPhone(), 20, TextField.PHONENUMBER); this.append(this.txtWorkPhone);
/** * 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) { } }
/** * 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.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); } }
/** * 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); }