Search in sources :

Example 6 with ParameterBundle

use of gov.sandia.n2a.parms.ParameterBundle in project n2a by frothga.

the class FixedParameterSpacePanel method dropIntoGroup.

private void dropIntoGroup(List<ParameterBundle> bundles, RoundedSpecPanel pnlRounded) {
    ParameterSpecGroupPanel pnlDropGroup = (ParameterSpecGroupPanel) pnlRounded;
    ParameterSpecPanel pnlSpec = null;
    for (ParameterBundle bundle : bundles) {
        ParameterSpecGroupPanel pnlExistingGroup = pnlGroups.getGroupPanelForParam(bundle);
        if (pnlExistingGroup != null) {
            if (pnlExistingGroup == pnlDropGroup) {
                Dialogs.showWarning(FixedParameterSpacePanel.this, "The parameter already exists in the target group (" + pnlDropGroup.getGroupLabel() + ").");
            } else {
                Dialogs.showWarning(FixedParameterSpacePanel.this, "The parameter already exists in another group (" + pnlExistingGroup.getGroupLabel() + ").");
            }
            continue;
        }
        pnlSpec = pnlDropGroup.addParam(bundle);
    }
    popScrollPane(pnlSpec);
}
Also used : ParameterBundle(gov.sandia.n2a.parms.ParameterBundle)

Aggregations

ParameterBundle (gov.sandia.n2a.parms.ParameterBundle)6 ParameterDomain (gov.sandia.n2a.parms.ParameterDomain)3 ArrayList (java.util.ArrayList)3 TreePath (javax.swing.tree.TreePath)3 NodeParameter (gov.sandia.umf.platform.ui.ensemble.tree.NodeParameter)2 NodeSubdomain (gov.sandia.umf.platform.ui.ensemble.tree.NodeSubdomain)2 Cursor (java.awt.Cursor)2 NodeBase (replete.gui.controls.simpletree.NodeBase)2 SimpleTree (replete.gui.controls.simpletree.SimpleTree)2 TNode (replete.gui.controls.simpletree.TNode)2 Parameter (gov.sandia.n2a.parms.Parameter)1 ParameterSpecification (gov.sandia.n2a.parms.ParameterSpecification)1 ConstantParameterSpecification (gov.sandia.umf.platform.ensemble.params.specs.ConstantParameterSpecification)1 EvenSpacingParameterSpecification (gov.sandia.umf.platform.ensemble.params.specs.EvenSpacingParameterSpecification)1 UniformParameterSpecification (gov.sandia.umf.platform.ensemble.params.specs.UniformParameterSpecification)1 TransferableParameterBundles (gov.sandia.umf.platform.ui.ensemble.TransferableParameterBundles)1