use of org.knime.base.node.preproc.rank.RankNodeModel.RankMode in project knime-core by knime.
the class RankNodeDialog method initPanel.
private JPanel initPanel() {
JPanel jp = new JPanel();
jp.setLayout(new BoxLayout(jp, BoxLayout.Y_AXIS));
Box rankColSelection = Box.createHorizontalBox();
// add column list
Box rankCols = initRankTableBox();
rankColSelection.add(rankCols);
// add buttons
Box rankButtonBox = initRankButtonBox();
rankColSelection.add(rankButtonBox);
Box groupColSelection = Box.createHorizontalBox();
groupColSelection.add(initGroupTableBox());
groupColSelection.add(initGroupButtonBox());
Box otherOptions = Box.createHorizontalBox();
otherOptions.add(Box.createHorizontalGlue());
Box modusBox = Box.createHorizontalBox();
modusBox.setBorder(new TitledBorder("Ranking Mode"));
modusBox.add(new JLabel("Mode: "));
Box radioPanel = Box.createVerticalBox();
ButtonGroup modusGroup = new ButtonGroup();
m_modusGroup = modusGroup;
for (RankMode rankMode : RankMode.values()) {
JRadioButton radio = new JRadioButton(rankMode.toString());
modusGroup.add(radio);
radioPanel.add(radio);
if (m_rankMode.getStringValue().equals(radio.getText())) {
radio.setSelected(true);
}
}
modusBox.add(radioPanel);
otherOptions.add(modusBox);
otherOptions.add(Box.createHorizontalGlue());
otherOptions.add(initOtherOptionsBox());
otherOptions.add(Box.createHorizontalGlue());
jp.add(rankColSelection);
jp.add(groupColSelection);
jp.add(otherOptions);
otherOptions.revalidate();
otherOptions.repaint();
return jp;
}
Aggregations