private TrialEqualsByProperties() {
    createLoaderForThread(true);
    sbI1 = (SdzBagI) Utils.loadXMLFromResource(filename1, this, false);
    sbI2 = (SdzBagI) Utils.loadXMLFromResource(filename2, this, false);
    Err.pr("sbI1: " + sbI1);
    Err.pr("sbI2: " + sbI2);

    JComponent[] panels1 = sbI1.getPanes();
    JComponent[] panels2 = sbI2.getPanes();
    if (panels1.length != panels2.length) {
      Err.error("Expected the size of the panels to be the same");
    }

    WidgetClassifier wc = new WidgetClassifier();
    ReasonNotEquals.turnOn(true);
    for (int i = 0; i < panels1.length; i++) {
      JComponent component1 = panels1[i];
      JComponent component2 = panels2[i];
      if (ComponentUtils.equalsByProperties(component1, component2, wc)) {
        Err.pr("Found to be equal");
      } else {
        Err.pr("Found to be NOT equal: " + ReasonNotEquals.formatReasons());
        break;
      }
    }
    ReasonNotEquals.turnOn(false);
  }
 public void sdzSetup() {
   sbI = (SdzBagI) Utils.loadXMLFromResource(filename, this, false);
   if (sbI == null) {
     Err.error("Reading in not successful, from " + filename);
   }
   dt = new MaintainContactDT(sbI);
   triggers = new MaintainContactTriggers(getDataStore(), queries, dt, sbI);
   if (getApplication() != null) {
     initSdzBag((SdzBag) sbI);
     setPanelNodeTitle(dt.ui0, dt.contactNode, "contactNode");
   } else {
     Err.error(NEED_APPLICATION_MSG);
   }
 }
 public void actionPerformed(ActionEvent evt) {
   if (evt.getID() == ActionEvent.ACTION_PERFORMED && evt.getModifiers() != 0) {
     /*
     Err.pr( "actionCommand: " + evt.getActionCommand());
     Err.pr( "ID: " + evt.getID());
     Err.pr( "when: " + evt.getWhen());
     Err.pr( "modifiers: " + evt.getModifiers());
     Err.alarm( "SELECTED: " + cbDOField.getSelectedItem());
     */
     if (Utils.isBlank(tfName.getText())) {
       tfName.setText((String) cbDOField.getSelectedItem());
     }
     cbDOField.removeActionListener(cbListener);
   }
 }
Example #4
0
  public boolean equals(Object o) {
    Utils.chkType(o, this.getClass());

    boolean result = false;
    if (o == this) {
      result = true;
    } else if (!(o instanceof Person)) { // nufin
    } else {
      Person test = (Person) o;
      if ((name == null ? test.name == null : name.equals(test.name))) {
        result = true;
      }
    }
    return result;
  }
Example #5
0
  public boolean equals(Object o) {
    Utils.chkType(o, this.getClass());

    boolean result = false;
    if (o == this) {
      result = true;
    } else if (!(o instanceof Fault)) { // nufin
    } else {
      Fault test = (Fault) o;
      if ((product == null ? test.product == null : product.equals(test.product))) {
        if ((name == null ? test.name == null : name.equals(test.name))) {
          result = true;
        }
      }
    }
    return result;
  }