// Set up the substance selector box
 private void setUpList() {
   List s = system.getSubstances();
   for (Object o : s) {
     Substance sub = (Substance) o;
     substanceBoxModel.addElement(sub.getName());
   }
 }
 public void setUpList() {
   List substances = system.getSubstances();
   int nSubs = substances.size(); // substances.length;
   Substance s;
   for (int i = 0; i < nSubs; i++) {
     s = (Substance) (substances.get(i));
     substanceNames.addElement(s.getName());
   }
 }
 public DoseObjectiveEditor(
     JFrame jf, ParameterSearchDoseResponseEditor e, TargetDoseObjective tdo) {
   this(jf, e);
   metric = tdo.getMetric();
   substance = metric.getSubstance();
   substanceSelector.setSelectedItem(substance.getName());
   objective = tdo.getObjective();
   weightField.setText((new Double(tdo.getWeight())).toString());
   updateTarget();
 }
 public String toString() {
   return "Correlation coefficient of " + substance.getName() + " and " + target.getName();
 }
 public double getValue() {
   double[] subVals = substance.getValues();
   double[] tarVals = target.getValues();
   return Statistics.rSquared(subVals, tarVals);
 }
 public void addSubstance(Substance s, Double d) {
   super.addSubstance(s, d);
   if (s.getName().compareTo("AminoAcid") == 0) aminoAcid = s;
 }