Search in sources :

Example 6 with DataColumnSpecFilterPanel

use of org.knime.core.node.util.filter.column.DataColumnSpecFilterPanel 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;
}
Also used : JPanel(javax.swing.JPanel) GridBagConstraints(java.awt.GridBagConstraints) Insets(java.awt.Insets) GridBagLayout(java.awt.GridBagLayout) DataColumnSpecFilterPanel(org.knime.core.node.util.filter.column.DataColumnSpecFilterPanel) DoubleValue(org.knime.core.data.DoubleValue) NominalValue(org.knime.core.data.NominalValue) JLabel(javax.swing.JLabel) ColumnSelectionPanel(org.knime.core.node.util.ColumnSelectionPanel) JTextField(javax.swing.JTextField)

Example 7 with DataColumnSpecFilterPanel

use of org.knime.core.node.util.filter.column.DataColumnSpecFilterPanel in project knime-core by knime.

the class OneSampleTTestNodeDialog 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("Test value:"), c);
    c.gridx++;
    c.weightx = 0.5;
    c.insets = rightCategoryInsets;
    m_testValue = new JTextField();
    p.add(m_testValue, c);
    c.gridx = 0;
    c.gridy++;
    c.weightx = 0;
    c.insets = leftInsets;
    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.weightx = 1;
    c.weighty = 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;
}
Also used : JPanel(javax.swing.JPanel) GridBagConstraints(java.awt.GridBagConstraints) Insets(java.awt.Insets) GridBagLayout(java.awt.GridBagLayout) DataColumnSpecFilterPanel(org.knime.core.node.util.filter.column.DataColumnSpecFilterPanel) DoubleValue(org.knime.core.data.DoubleValue) JLabel(javax.swing.JLabel) JTextField(javax.swing.JTextField)

Example 8 with DataColumnSpecFilterPanel

use of org.knime.core.node.util.filter.column.DataColumnSpecFilterPanel 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;
}
Also used : JPanel(javax.swing.JPanel) GridBagConstraints(java.awt.GridBagConstraints) Insets(java.awt.Insets) GridBagLayout(java.awt.GridBagLayout) JComboBox(javax.swing.JComboBox) NominalValue(org.knime.core.data.NominalValue) ActionEvent(java.awt.event.ActionEvent) JLabel(javax.swing.JLabel) JTextField(javax.swing.JTextField) ActionListener(java.awt.event.ActionListener) DataColumnSpecFilterPanel(org.knime.core.node.util.filter.column.DataColumnSpecFilterPanel) DoubleValue(org.knime.core.data.DoubleValue) ColumnSelectionPanel(org.knime.core.node.util.ColumnSelectionPanel)

Aggregations

JPanel (javax.swing.JPanel)8 DataColumnSpecFilterPanel (org.knime.core.node.util.filter.column.DataColumnSpecFilterPanel)8 GridBagConstraints (java.awt.GridBagConstraints)6 GridBagLayout (java.awt.GridBagLayout)6 Insets (java.awt.Insets)6 JLabel (javax.swing.JLabel)4 JTextField (javax.swing.JTextField)4 ActionEvent (java.awt.event.ActionEvent)3 ActionListener (java.awt.event.ActionListener)3 JCheckBox (javax.swing.JCheckBox)3 DoubleValue (org.knime.core.data.DoubleValue)3 BorderLayout (java.awt.BorderLayout)2 NominalValue (org.knime.core.data.NominalValue)2 ColumnSelectionPanel (org.knime.core.node.util.ColumnSelectionPanel)2 GridLayout (java.awt.GridLayout)1 Box (javax.swing.Box)1 ButtonGroup (javax.swing.ButtonGroup)1 JComboBox (javax.swing.JComboBox)1 JRadioButton (javax.swing.JRadioButton)1 JSpinner (javax.swing.JSpinner)1