use of gui.views.DisplayPatientListView in project project1-ICS372 by sandip-rai.
the class GuiControllerTest method testAll.
/**
* Test all.
*/
@Test
public void testAll() {
mainMenuView = new MainMenuView();
addPatientView = new AddPatientView();
systemSettingsView = new SystemSettingsView();
fileAdapter = new FileAdapter();
clinicalTrial = new ClinicalTrial();
displayPatientListView = new DisplayPatientListView(clinicalTrial);
clinicView = new ClinicView(clinicalTrial);
Assert.assertNotNull(mainMenuView);
Assert.assertNotNull(addPatientView);
Assert.assertNotNull(systemSettingsView);
Assert.assertNotNull(fileAdapter);
Assert.assertNotNull(clinicalTrial);
Assert.assertNotNull(displayPatientListView);
Assert.assertNotNull(clinicView);
GuiController gc = new GuiController(mainMenuView, addPatientView, systemSettingsView, fileAdapter, clinicalTrial, displayPatientListView, clinicView);
Assert.assertNotNull(gc);
Assert.assertNotNull(gc.getSystemSettingView());
Assert.assertNotNull(gc.getAddPatientView());
Assert.assertNotNull(gc.getMainMenuView());
Assert.assertNotNull(gc.getFileAdapter());
Assert.assertNotNull(gc.getClinicalTrial());
Assert.assertNotNull(gc.getDisplayPatientListView());
Assert.assertNotNull(gc.getClinicView());
}
use of gui.views.DisplayPatientListView in project project1-ICS372 by sandip-rai.
the class ComboBoxPatientsListener method actionPerformed.
/* (non-Javadoc)
* @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
*/
@Override
public void actionPerformed(ActionEvent e) {
String format = guiController.getClinicalTrial().getSettings().getDateFormat();
DisplayPatientListView view = guiController.getDisplayPatientListView();
if ((Patient) guiController.getDisplayPatientListView().getComboBoxPatients().getSelectedItem() != null) {
Patient patient = (Patient) guiController.getDisplayPatientListView().getComboBoxPatients().getSelectedItem();
boolean active = patient.isActive();
String text = patient.toString(format);
view.setActive(active);
view.setPatientInfo(text);
} else {
}
view.getFrame().pack();
}
Aggregations