コード例 #1
0
 /**
  * * Validate the input got by this dialog and store it in * inputValue. Return true if all is OK.
  */
 public boolean validateInput() {
   if (textInput.getText().trim().equals("")) {
     oncotcap.util.OncMessageBox.showWarning(
         "Please enter a value for " + parameter.getName(), "Invalid Input");
     return (false);
   }
   return (true);
 }
コード例 #2
0
 public void save() {
   if (parameter != null) {
     SingleParameterList pList = parameter.getSingleParameterList();
     if (pList.getSize() != 1) {
       oncotcap.util.OncMessageBox.showWarning(
           "Warning: Unable to save parameter, incorrect number of primitives. [SingleValueInputDialog]",
           "Internal Error");
     } else {
       pList.getFirst().setDisplayValue(textInput.getText());
     }
   }
 }