Search in sources :

Example 1 with SystemSettingsView

use of gui.views.SystemSettingsView in project project1-ICS372 by sandip-rai.

the class ButtonResetAllSettingsListener method actionPerformed.

/* (non-Javadoc)
	 * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
	 */
@Override
public void actionPerformed(ActionEvent e) {
    SystemSettings settings = guiController.getClinicalTrial().getSettings();
    settings.setDateFormat("ddMMMyyyy HH:mm");
    settings.setAddUnknownClinics(true);
    settings.setJsonAddUnknownPatients(false);
    settings.setJsonAddUnknownReadings(false);
    settings.setXmlAddUnknownPatients(true);
    settings.setXmlAddUnknownReadings(true);
    SystemSettingsView view = guiController.getSystemSettingView();
    view.getDateFormat().setText("ddMMMyyyy HH:mm");
    view.getCheckBoxAddClinics().setSelected(true);
    view.getCheckBoxJsonPatients().setSelected(false);
    view.getCheckBoxJsonReadings().setSelected(false);
    view.getCheckBoxXmlPatients().setSelected(true);
    view.getCheckBoxXmlReadings().setSelected(true);
}
Also used : SystemSettings(trial.SystemSettings) SystemSettingsView(gui.views.SystemSettingsView)

Example 2 with SystemSettingsView

use of gui.views.SystemSettingsView 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());
}
Also used : FileAdapter(file.FileAdapter) GuiController(gui.GuiController) ClinicView(gui.views.ClinicView) MainMenuView(gui.views.MainMenuView) ClinicalTrial(trial.ClinicalTrial) DisplayPatientListView(gui.views.DisplayPatientListView) AddPatientView(gui.views.AddPatientView) SystemSettingsView(gui.views.SystemSettingsView) Test(org.junit.Test)

Aggregations

SystemSettingsView (gui.views.SystemSettingsView)2 FileAdapter (file.FileAdapter)1 GuiController (gui.GuiController)1 AddPatientView (gui.views.AddPatientView)1 ClinicView (gui.views.ClinicView)1 DisplayPatientListView (gui.views.DisplayPatientListView)1 MainMenuView (gui.views.MainMenuView)1 Test (org.junit.Test)1 ClinicalTrial (trial.ClinicalTrial)1 SystemSettings (trial.SystemSettings)1