Ejemplo n.º 1
0
 public void selectionChanged() {
   if ((paramSelector.getSelection() != null) && (resultSelector.getSelection() != null)) {
     result =
         new Type.Function(
             paramSelector.getSelection(),
             resultSelector.getSelection(),
             checkParamName.isSelected(),
             checkResultName.isSelected());
     okListener.okEvent(true);
   } else {
     result = null;
     okListener.okEvent(false);
   }
 }
 private void checkBoundsFields() {
   if (specifyUPB.isSelected() || specifyLWB.isSelected()) {
     try {
       upb = Double.parseDouble(UPBLabel.getText());
       lwb = Double.parseDouble(LWBLabel.getText());
       if (specifyUPB.isSelected() && specifyLWB.isSelected()) {
         okListener.okEvent(upb > lwb);
       } else {
         okListener.okEvent(true);
       }
     } catch (Exception e) {
       okListener.okEvent(false);
     }
   } else {
     okListener.okEvent(true);
   }
 }
  public Object getResult() {
    double rlwb;
    if (yesLWB.isSelected()) {
      if (specifyLWB.isSelected()) {
        if (excLWBButton.isSelected()) rlwb = lwb + Double.MIN_VALUE;
        else rlwb = lwb;
      } else rlwb = -Double.MAX_VALUE + Double.MIN_VALUE;
    } else rlwb = -Double.MAX_VALUE;

    double rupb;
    if (yesUPB.isSelected()) {
      if (specifyUPB.isSelected()) {
        if (excUPBButton.isSelected()) rupb = upb - Double.MIN_VALUE;
        else rupb = upb;
      } else rupb = Double.MAX_VALUE - Double.MIN_VALUE;
    } else rupb = Double.MAX_VALUE;

    return new Type.Continuous(rlwb, rupb, !unspecifiedCyclic.isSelected(), yesCyclic.isSelected());
  }