public void commandAction(Command c, Displayable d) { if (menuList == null) { lateInit(); } MIDletBridge.getMIDletAccess().getDisplayAccess().setCurrent(previous); if ((c == CMD_SELECT) || c == List.SELECT_COMMAND) { MIDletBridge.getMIDletAccess().getDisplayAccess().commandAction( (Command) menuCommands.elementAt(menuList.getSelectedIndex()), previous); } } };
/** * DOCUMENT ME! * * @param cmd DOCUMENT ME! * @param dsp DOCUMENT ME! */ public void commandAction(Command cmd, Displayable dsp) { if (cmd == this.cmdBack) { MainForm mainForm = new MainForm(); HospitalMIDlet.setCurrent(mainForm); } else if (cmd == this.cmdLeave) { if (this.getSelectedIndex() != -1) { try { Internment internment = (Internment) internments.get(this.getSelectedIndex()); internment.setExitDate(new Date()); PersistableManager.getInstance().save(internment); this.startData(); } catch (FloggyException e) { HospitalMIDlet.showException(e); } } } }
HospitalMIDlet.setCurrent(new FormationForm(formation)); } else if (cmd == this.cmdEdit) { if (this.getSelectedIndex() != -1) { Formation formation = null; formation = (Formation) formations.get(this.getSelectedIndex()); HospitalMIDlet.setCurrent(new FormationForm(formation)); } catch (FloggyException e) { if (this.getSelectedIndex() != -1) { try { Formation formation = (Formation) formations.get(this.getSelectedIndex()); PersistableManager.getInstance().delete(formation); this.startData();
HospitalMIDlet.setCurrent(new DoctorForm(doctor)); } else if (cmd == this.cmdEdit) { if (this.getSelectedIndex() != -1) { Doctor doctor = null; doctor = (Doctor) doctors.get(this.getSelectedIndex()); HospitalMIDlet.setCurrent(new DoctorForm(doctor)); } catch (FloggyException e) { if (this.getSelectedIndex() != -1) { try { Doctor doctor = (Doctor) doctors.get(this.getSelectedIndex()); PersistableManager.getInstance().delete(doctor); this.startData();
HospitalMIDlet.setCurrent(new BedForm(bed)); } else if (cmd == this.cmdEdit) { if (this.getSelectedIndex() != -1) { Bed bed = null; bed = (Bed) beds.get(this.getSelectedIndex()); HospitalMIDlet.setCurrent(new BedForm(bed)); } catch (FloggyException e) { if (this.getSelectedIndex() != -1) { try { Bed bed = (Bed) beds.get(this.getSelectedIndex()); PersistableManager.getInstance().delete(bed); this.startData();
HospitalMIDlet.setCurrent(new PatientForm(patient)); } else if (cmd == this.cmdEdit) { if (this.getSelectedIndex() != -1) { Patient patient = null; patient = (Patient) patients.get(this.getSelectedIndex()); HospitalMIDlet.setCurrent(new PatientForm(patient)); } catch (FloggyException e) { if (this.getSelectedIndex() != -1) { try { Patient patient = (Patient) patients.get(this.getSelectedIndex()); PersistableManager.getInstance().delete(patient); this.startData(null);
try { FlowManager.getInstance() .exibirChurrasSalvo(((List) displayable).getSelectedIndex()); } catch (FlowManagerNotStartedException e) { try { FlowManager.getInstance() .apagarChurrasSalvo(((List) displayable).getSelectedIndex()); } catch (FlowManagerNotStartedException e) {
HospitalMIDlet.exit(); } else if (cmd == List.SELECT_COMMAND) { switch (this.getSelectedIndex()) { case 0: HospitalMIDlet.setCurrent(new FormationList());