// Sets the substance field to whatever substance is selected by the combo // box private void setSubstance() { String name = (String) substanceSelector.getSelectedItem(); substance = (Substance) system.getEntity(name); if (metric != null) { metric.setSubstance(substance); } updateTarget(); }
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(); }