use of edu.cmu.tetrad.annotation.AlgType in project tetrad by cmu-phil.
the class GeneralAlgorithmEditor method populateAlgoTypeOptions.
/**
* Create new radio buttons and add them to both the radio button list and
* radio button group.
*
* @param radioButtons
*/
private void populateAlgoTypeOptions(List<JRadioButton> radioButtons) {
JRadioButton showAllRadBtn = new JRadioButton("show all");
showAllRadBtn.setActionCommand("all");
showAllRadBtn.addActionListener((e) -> {
algoTypeSelectAction(e);
});
radioButtons.add(showAllRadBtn);
algoFilterBtnGrp.add(showAllRadBtn);
for (AlgType item : AlgType.values()) {
String name = item.name();
JRadioButton radioButton = new JRadioButton(name.replace("_", " "));
radioButton.setActionCommand(name);
radioButton.addActionListener((e) -> {
algoTypeSelectAction(e);
});
radioButtons.add(radioButton);
algoFilterBtnGrp.add(radioButton);
}
}
Aggregations