use of org.knime.core.node.util.ColumnSelectionPanel in project knime-core by knime.
the class CrosstabNodeDialog method createSettingsPanel.
@SuppressWarnings("unchecked")
private JPanel createSettingsPanel() {
JPanel p = new JPanel(new GridBagLayout());
GridBagConstraints c = new GridBagConstraints();
c.fill = GridBagConstraints.BOTH;
c.anchor = GridBagConstraints.WEST;
c.insets = new Insets(8, 3, 3, 3);
c.gridx = 0;
c.gridy = 0;
c.gridwidth = 1;
c.weightx = 0;
c.weighty = 0;
c.fill = GridBagConstraints.BOTH;
p.add(new JLabel("Row variable:"), c);
c.gridx++;
c.weightx = 1;
m_rowVarColumn = new ColumnSelectionComboxBox(StringValue.class, DoubleValue.class);
m_rowVarColumn.setBorder(null);
p.add(m_rowVarColumn, c);
c.insets = new Insets(3, 3, 3, 3);
c.gridx = 0;
c.gridy++;
c.weightx = 0;
p.add(new JLabel("Column variable:"), c);
c.gridx++;
c.weightx = 1;
m_colVarColumn = new ColumnSelectionComboxBox(StringValue.class, DoubleValue.class);
m_colVarColumn.setBorder(null);
p.add(m_colVarColumn, c);
c.gridx = 0;
c.gridy++;
c.weightx = 0;
p.add(new JLabel("Weight column:"), c);
c.gridx++;
c.weightx = 1;
m_weightColumn = new ColumnSelectionPanel((Border) null, new DataValueColumnFilter(DoubleValue.class), true);
m_weightColumn.setBorder(null);
p.add(m_weightColumn, c);
c.gridx = 0;
c.gridy++;
c.gridwidth = 2;
m_enableHiliting = new JCheckBox("Enable hiliting");
p.add(m_enableHiliting, c);
c.gridy++;
c.gridx = 0;
c.weighty = 1;
p.add(new JPanel(), c);
return p;
}
use of org.knime.core.node.util.ColumnSelectionPanel in project knime-core by knime.
the class RuleEngine2PortsNodeDialog method addAppendOrReplace.
/**
* {@inheritDoc} it adds the replace or append controls (radiobuttons, textfield and column selector).
*/
@Override
protected void addAppendOrReplace(final JPanel panel, final GridBagConstraints gbc) {
m_append = new JRadioButton("Append column");
panel.add(m_append, gbc);
gbc.gridx++;
gbc.weightx = 1;
gbc.gridwidth = 4;
m_appendColumn = Util.createTextFieldWithWatermark("Prediction", 22, "Computed column name");
panel.add(m_appendColumn, gbc);
gbc.gridy++;
gbc.weightx = 0;
gbc.gridx = 0;
gbc.gridwidth = 1;
m_replace = new JRadioButton("Replace column");
panel.add(m_replace, gbc);
gbc.gridx++;
gbc.weightx = 1;
gbc.gridwidth = 4;
m_replaceColumn = new ColumnSelectionPanel((String) null);
panel.add(m_replaceColumn, gbc);
gbc.gridy++;
}
use of org.knime.core.node.util.ColumnSelectionPanel in project knime-core by knime.
the class OneWayANOVANodeDialog method createPanel.
/**
* Create the configuration panel.
*/
@SuppressWarnings("unchecked")
private Component createPanel() {
JPanel p = new JPanel(new GridBagLayout());
GridBagConstraints c = new GridBagConstraints();
c.fill = GridBagConstraints.BOTH;
c.anchor = GridBagConstraints.BASELINE;
c.insets = new Insets(2, 2, 2, 2);
c.gridx = 0;
c.gridy = 0;
c.gridwidth = 1;
c.weightx = 0;
c.weighty = 0;
Insets leftInsets = new Insets(3, 8, 3, 8);
Insets rightInsets = new Insets(3, 0, 3, 8);
Insets leftCategoryInsets = new Insets(11, 8, 3, 8);
Insets rightCategoryInsets = new Insets(11, 0, 3, 8);
c.gridx = 0;
c.insets = leftCategoryInsets;
c.gridwidth = 1;
c.weightx = 0;
c.weighty = 0;
p.add(new JLabel("Grouping column:"), c);
c.gridx++;
c.insets = rightCategoryInsets;
m_groupingColumn = new ColumnSelectionPanel(NominalValue.class, DoubleValue.class);
m_groupingColumn.setBorder(null);
p.add(m_groupingColumn, c);
c.gridx = 0;
c.gridy++;
c.insets = leftInsets;
c.weightx = 0;
p.add(new JLabel("Confidence Interval (in %):"), c);
c.gridx++;
c.insets = rightInsets;
m_confidenceIntervalProb = new JTextField("95");
p.add(m_confidenceIntervalProb, c);
c.gridx = 0;
c.gridy++;
c.insets = leftInsets;
c.gridwidth = 3;
c.weighty = 1;
c.weightx = 1;
m_testColumns = new DataColumnSpecFilterPanel(DoubleValue.class);
m_testColumns.setBorder(BorderFactory.createTitledBorder("Test columns"));
p.add(m_testColumns, c);
// dummy panel to make the controls smaller above the last component
// (the DataColumnSpecFilterPanel).
c.gridheight = c.gridy;
c.gridx = 2;
c.gridy = 0;
c.weighty = 1;
c.weightx = 1;
c.gridwidth = 1;
p.add(new JPanel(), c);
return p;
}
use of org.knime.core.node.util.ColumnSelectionPanel in project knime-core by knime.
the class TwoSampleTTestNodeDialog method createPanel.
/**
* Create the configuration panel.
*/
@SuppressWarnings("unchecked")
private Component createPanel() {
JPanel p = new JPanel(new GridBagLayout());
GridBagConstraints c = new GridBagConstraints();
c.fill = GridBagConstraints.BOTH;
c.anchor = GridBagConstraints.BASELINE;
c.insets = new Insets(2, 2, 2, 2);
c.gridx = 0;
c.gridy = 0;
c.gridwidth = 1;
c.weightx = 0;
c.weighty = 0;
Insets leftInsets = new Insets(3, 8, 3, 8);
Insets rightInsets = new Insets(3, 0, 3, 8);
Insets leftCategoryInsets = new Insets(11, 8, 3, 8);
Insets rightCategoryInsets = new Insets(11, 0, 3, 8);
c.gridx = 0;
c.insets = leftCategoryInsets;
c.gridwidth = 1;
c.weightx = 0;
c.weighty = 0;
p.add(new JLabel("Grouping column:"), c);
c.gridx++;
c.insets = rightCategoryInsets;
m_groupingColumn = new ColumnSelectionPanel(NominalValue.class, DoubleValue.class);
m_groupingColumn.setBorder(null);
m_groupingColumn.addActionListener(new ActionListener() {
@Override
public void actionPerformed(final ActionEvent e) {
initGroupComboBoxes();
}
});
p.add(m_groupingColumn, c);
c.gridx = 0;
c.gridy++;
c.insets = leftInsets;
c.gridwidth = 1;
c.weightx = 0;
c.weighty = 0;
p.add(new JLabel("Group one:"), c);
c.gridx++;
c.weightx = 0.5;
c.insets = rightInsets;
m_groupOne = new JComboBox();
m_groupOne.setEditable(true);
p.add(m_groupOne, c);
c.gridx = 0;
c.gridy++;
c.insets = leftInsets;
c.gridwidth = 1;
c.weightx = 0;
c.weighty = 0;
p.add(new JLabel("Group two:"), c);
c.gridx++;
c.weightx = 0.5;
c.insets = rightInsets;
m_groupTwo = new JComboBox();
m_groupTwo.setEditable(true);
p.add(m_groupTwo, c);
c.gridx = 0;
c.gridy++;
c.insets = leftInsets;
c.weightx = 0;
p.add(new JLabel("Confidence Interval (in %):"), c);
c.gridx++;
c.insets = rightInsets;
m_confidenceIntervalProb = new JTextField("95");
p.add(m_confidenceIntervalProb, c);
c.gridx = 0;
c.gridy++;
c.insets = leftInsets;
c.gridwidth = 3;
c.weighty = 1;
c.weightx = 1;
m_testColumns = new DataColumnSpecFilterPanel(DoubleValue.class);
m_testColumns.setBorder(BorderFactory.createTitledBorder("Test columns"));
p.add(m_testColumns, c);
// dummy panel to make the controls smaller above the last component
// (the DataColumnSpecFilterPanel).
c.gridheight = c.gridy;
c.gridx = 2;
c.gridy = 0;
c.weighty = 1;
c.weightx = 1;
c.gridwidth = 1;
p.add(new JPanel(), c);
return p;
}
Aggregations