Search in sources :

Example 1 with ParameterScanPanel

use of cbit.vcell.client.desktop.simulation.ParameterScanPanel in project vcell by virtualcell.

the class MathOverridesTableModel method editScanValues.

/**
 * Insert the method's description here.
 * Creation date: (9/23/2005 5:06:23 PM)
 */
private void editScanValues(String name, int r) throws DivideByZeroException, ExpressionException {
    ParameterScanPanel panel = new ParameterScanPanel();
    ConstantArraySpec spec = null;
    if (getMathOverrides().isScan(name)) {
        spec = getMathOverrides().getConstantArraySpec(name);
    } else {
        spec = ConstantArraySpec.createIntervalSpec(name, 0, getMathOverrides().getDefaultExpression(name).evaluateConstant(), 2, false);
    }
    panel.setConstantArraySpec(spec);
    int confirm = DialogUtils.showComponentOKCancelDialog(ownerTable, panel, "Scan values for parameter '" + fieldKeys[r]);
    if (confirm == javax.swing.JOptionPane.OK_OPTION) {
        panel.applyValues();
        getMathOverrides().putConstantArraySpec(panel.getConstantArraySpec());
    }
}
Also used : ParameterScanPanel(cbit.vcell.client.desktop.simulation.ParameterScanPanel) ConstantArraySpec(cbit.vcell.solver.ConstantArraySpec)

Aggregations

ParameterScanPanel (cbit.vcell.client.desktop.simulation.ParameterScanPanel)1 ConstantArraySpec (cbit.vcell.solver.ConstantArraySpec)1