use of edu.cmu.tetradapp.util.SortingComboBox in project tetrad by cmu-phil.
the class DirichletBayesImProbsWizard method createVarNamesComboBox.
private JComboBox createVarNamesComboBox(DirichletBayesIm bayesIm) {
JComboBox varNamesComboBox = new SortingComboBox() {
public Dimension getMaximumSize() {
return getPreferredSize();
}
};
varNamesComboBox.setBackground(Color.WHITE);
Graph graph = bayesIm.getBayesPm().getDag();
for (Node node : graph.getNodes()) {
varNamesComboBox.addItem(node);
}
varNamesComboBox.setSelectedIndex(0);
return varNamesComboBox;
}
use of edu.cmu.tetradapp.util.SortingComboBox in project tetrad by cmu-phil.
the class EMBayesEstimatorEditorWizard method createVarNamesComboBox.
private JComboBox createVarNamesComboBox(BayesPm bayesPm) {
JComboBox varNamesComboBox = new SortingComboBox() {
public Dimension getMaximumSize() {
return getPreferredSize();
}
};
varNamesComboBox.setBackground(Color.white);
Graph graph = bayesPm.getDag();
for (Node node : graph.getNodes()) {
varNamesComboBox.addItem(node);
}
varNamesComboBox.setSelectedIndex(0);
return varNamesComboBox;
}
use of edu.cmu.tetradapp.util.SortingComboBox in project tetrad by cmu-phil.
the class DirichletBayesImCountsWizard method createVarNamesComboBox.
private JComboBox createVarNamesComboBox(DirichletBayesIm bayesIm) {
JComboBox varNamesComboBox = new SortingComboBox() {
public Dimension getMaximumSize() {
return getPreferredSize();
}
};
varNamesComboBox.setBackground(Color.white);
Graph graph = bayesIm.getBayesPm().getDag();
for (Object o : graph.getNodes()) {
varNamesComboBox.addItem(o);
}
varNamesComboBox.setSelectedIndex(0);
return varNamesComboBox;
}
use of edu.cmu.tetradapp.util.SortingComboBox in project tetrad by cmu-phil.
the class StructEMBayesSearchEditorWizard method createVarNamesComboBox.
private JComboBox createVarNamesComboBox(BayesIm bayesIm) {
JComboBox varNamesComboBox = new SortingComboBox() {
public Dimension getMaximumSize() {
return getPreferredSize();
}
};
varNamesComboBox.setBackground(Color.white);
Graph graph = bayesIm.getBayesPm().getDag();
for (Node node : graph.getNodes()) {
varNamesComboBox.addItem(node);
}
varNamesComboBox.setSelectedIndex(0);
return varNamesComboBox;
}
use of edu.cmu.tetradapp.util.SortingComboBox in project tetrad by cmu-phil.
the class UpdaterEditingTableModelObs method makeVarNamesDropdown.
private JComboBox makeVarNamesDropdown() {
JComboBox varNamesComboBox = new SortingComboBox() {
public Dimension getMaximumSize() {
return getPreferredSize();
}
};
varNamesComboBox.setBackground(Color.white);
Graph graph = updaterWrapper.getBayesUpdater().getManipulatedGraph();
for (Object o : graph.getNodes()) {
// skip latent variables in Identifiability Wrapper
Node nodeO = (Node) o;
if (nodeO.getNodeType() == NodeType.MEASURED) {
varNamesComboBox.addItem(o);
}
}
if (selectedNode != null) {
varNamesComboBox.setSelectedItem(selectedNode);
} else {
varNamesComboBox.setSelectedIndex(0);
this.selectedNode = (Node) varNamesComboBox.getSelectedItem();
}
return varNamesComboBox;
}
Aggregations