use of edu.cmu.tetradapp.util.SortingComboBox in project tetrad by cmu-phil.
the class UpdaterEditingTableModel 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()) {
varNamesComboBox.addItem(o);
}
if (selectedNode != null) {
varNamesComboBox.setSelectedItem(selectedNode);
} else {
varNamesComboBox.setSelectedIndex(0);
this.selectedNode = (Node) varNamesComboBox.getSelectedItem();
}
return varNamesComboBox;
}
use of edu.cmu.tetradapp.util.SortingComboBox in project tetrad by cmu-phil.
the class UpdatedSemImWizard method makeVarNamesDropdown.
private JComboBox makeVarNamesDropdown() {
JComboBox varNamesComboBox = new SortingComboBox() {
public Dimension getMaximumSize() {
return getPreferredSize();
}
};
varNamesComboBox.setBackground(Color.white);
Graph graph = semUpdater.getManipulatedGraph();
for (Object o : graph.getNodes()) {
varNamesComboBox.addItem(o);
}
if (selectedNode != null) {
varNamesComboBox.setSelectedItem(selectedNode);
} else {
varNamesComboBox.setSelectedIndex(0);
this.selectedNode = (Node) varNamesComboBox.getSelectedItem();
}
return varNamesComboBox;
}
use of edu.cmu.tetradapp.util.SortingComboBox in project tetrad by cmu-phil.
the class BayesPmEditorWizard method createVariableChooser.
private void createVariableChooser(BayesPm bayesPm, GraphWorkbench workbench) {
variableChooser = new SortingComboBox() {
public Dimension getMaximumSize() {
return getPreferredSize();
}
};
variableChooser.setBackground(Color.white);
Graph graphModel = bayesPm.getDag();
for (Iterator it = graphModel.getNodes().iterator(); it.hasNext(); ) {
variableChooser.addItem(it.next());
}
if (graphModel.getNodes().size() > 0) {
variableChooser.setSelectedIndex(0);
}
workbench.scrollWorkbenchToNode((Node) (variableChooser.getSelectedItem()));
}
use of edu.cmu.tetradapp.util.SortingComboBox in project tetrad by cmu-phil.
the class BayesEstimatorEditorWizard 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 (Object o : graph.getNodes()) {
varNamesComboBox.addItem(o);
}
if (graph.getNodes().size() > 0) {
varNamesComboBox.setSelectedIndex(0);
}
return varNamesComboBox;
}
use of edu.cmu.tetradapp.util.SortingComboBox in project tetrad by cmu-phil.
the class BayesImEditorWizard 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 (Object o : graph.getNodes()) {
varNamesComboBox.addItem(o);
}
if (graph.getNodes().size() > 0) {
varNamesComboBox.setSelectedIndex(0);
}
return varNamesComboBox;
}
Aggregations