Package unbbayes.gui.continuous

Examples of unbbayes.gui.continuous.ContinuousNormalDistributionPane


        continuousNodeNameList.add(n.getName());
      }
    }
   
    // Create the distribution pane
    final ContinuousNormalDistributionPane distributionPane = new ContinuousNormalDistributionPane(discreteNodeNameList, continuousNodeNameList);
    screen.setDistributionPane(distributionPane);
    screen.setTableOwner(node);
   
    // Fill discrete parent node states
    for (Node n : discreteNodeList) {
      List<String> stateList = new ArrayList<String>(n.getStatesSize());
      for (int i = 0; i < n.getStatesSize(); i++) {
        stateList.add(n.getStateAt(i));
      }
      distributionPane.fillDiscreteParentStateSelection(n.getName(), stateList);
    }
   
    loadContinuousDistributionPaneValues(distributionPane, node.getCnNormalDistribution());
   
    // Create the confirm action listener. Responsible for setting the distribution values.
    ActionListener confirmAL = new ActionListener() {
      public void actionPerformed(ActionEvent ae) {
        setContinuousDistributionValues(distributionPane, node.getCnNormalDistribution());
      }
    };
   
    // Responsible for loading the values from the normal distribution into the distribution pane.
    // Used in cancel and in parent state change listeners.
    ActionListener restoreValuesFromDistributionAL = new ActionListener() {
      public void actionPerformed(ActionEvent ae) {
        loadContinuousDistributionPaneValues(distributionPane, node.getCnNormalDistribution());
      }
    };
   
    distributionPane.addConfirmButtonActionListener(confirmAL);
    distributionPane.addCancelButtonActionListener(restoreValuesFromDistributionAL);
    distributionPane.addParentStateChangeActionListener(restoreValuesFromDistributionAL);
   
   
    // moved into #setDistributionPane(JPanel)
//    screen.setAddRemoveStateButtonVisible(false);
  }
View Full Code Here

TOP

Related Classes of unbbayes.gui.continuous.ContinuousNormalDistributionPane

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.