Esempio n. 1
0
  @Override
  public void handleNotification(Notification notification, Object handback) {

    TestingForm fm = testingForm;
    if (fm != null) {
      fm.sendNotif(notification);
    }
  }
Esempio n. 2
0
  private void openTest() {
    // Starting tests
    saveData();

    TestingForm dlg = null;
    switch (((Instance_TestTask) cbTestTask.getSelectedItem()).intValue()) {
      case Instance_TestTask.VAL_USSD_TEST_CLIENT:
        {
          TestUssdClientForm testUssdClientForm = new TestUssdClientForm(getJFrame());
          testUssdClientForm.setData(ussdClient);
          dlg = testUssdClientForm;
        }
        break;
      case Instance_TestTask.VAL_USSD_TEST_SERVER:
        {
          TestUssdServerForm testUssdServerForm = new TestUssdServerForm(getJFrame());
          testUssdServerForm.setData(ussdServer);
          dlg = testUssdServerForm;
        }
        break;
      case Instance_TestTask.VAL_SMS_TEST_CLIENT:
        {
          TestSmsClientForm testSmsClientForm = new TestSmsClientForm(getJFrame());
          testSmsClientForm.setData(smsClient);
          dlg = testSmsClientForm;
        }
        break;
      case Instance_TestTask.VAL_SMS_TEST_SERVER:
        {
          TestSmsServerForm testSmsServerForm = new TestSmsServerForm(getJFrame());
          testSmsServerForm.setData(smsServer);
          dlg = testSmsServerForm;
        }
        break;
      case Instance_TestTask.VAL_CAP_TEST_SCF:
        {
          TestCapScfForm testCapScfForm = new TestCapScfForm(getJFrame());
          testCapScfForm.setData(capScf);
          dlg = testCapScfForm;
        }
        break;
      case Instance_TestTask.VAL_CAP_TEST_SSF:
        {
          TestCapSsfForm testCapSsfForm = new TestCapSsfForm(getJFrame());
          testCapSsfForm.setData(capSsf);
          dlg = testCapSsfForm;
        }
        break;
      case Instance_TestTask.VAL_ATI_TEST_CLIENT:
        {
          TestAtiClientForm testAtiClientForm = new TestAtiClientForm(getJFrame());
          testAtiClientForm.setData(atiClient);
          dlg = testAtiClientForm;
        }
        break;
      case Instance_TestTask.VAL_ATI_TEST_SERVER:
        {
          TestAtiServerForm testAtiServerForm = new TestAtiServerForm(getJFrame());
          testAtiServerForm.setData(atiServer);
          dlg = testAtiServerForm;
        }
        break;

        // TODO: other tests form options editing
    }
    if (dlg == null) {
      JOptionPane.showMessageDialog(getJFrame(), "No proper test task defined");
      return;
    }

    this.enableButtons(false);
    setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);
    testingForm = dlg;
    dlg.setData(this, host);
    dlg.setVisible(true);
  }