final TextField absMagEqn = new TextField(
"Absolute Mag Relationship",
initialType != null ? absMagEqns.get(initialType) : "",
true, false, Kind.LINE);
final SelectableTextField typesField = new SelectableTextField(
"Variable Type", types, initialType);
typesField.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
// Update the abs mag equation when the variable type
// selection changes.
absMagEqns.get(typesField.getValue());
}
});
fields.add(typesField);
fields.add(absMagEqn);
DoubleField periodField = new DoubleField("Period", null, null,
period);
fields.add(periodField);
DoubleField magField = new DoubleField("Mean Apparent Mag", null,
null, magnitude);
fields.add(magField);
MultiEntryComponentDialog inputDlg = new MultiEntryComponentDialog(
"Inputs", fields);
if (!inputDlg.isCancelled()) {
period = periodField.getValue();
magnitude = magField.getValue();
String varType = typesField.getValue();
Double absMagnitude = null;
Double distance = null;
if (varType == DCEP) {