Search in sources :

Example 1 with ColumnFilterPanel

use of org.knime.core.node.util.ColumnFilterPanel in project knime-core by knime.

the class CategoryToNumberNodeDialogPane method createCategoryToNumberSettingsTab.

@SuppressWarnings("unchecked")
private JPanel createCategoryToNumberSettingsTab() {
    JPanel p = new JPanel(new GridBagLayout());
    GridBagConstraints c = new GridBagConstraints();
    c.fill = GridBagConstraints.HORIZONTAL;
    c.anchor = GridBagConstraints.NORTHWEST;
    c.insets = new Insets(2, 2, 2, 2);
    c.gridx = 0;
    c.gridy = 0;
    c.gridwidth = 1;
    c.weightx = 1;
    c.weighty = 0;
    Insets leftInsets = new Insets(3, 8, 3, 8);
    Insets middleInsets = new Insets(3, 0, 3, 0);
    c.gridwidth = 3;
    m_includedColumns = new ColumnFilterPanel(true, StringValue.class);
    p.add(m_includedColumns, c);
    c.weighty = 0;
    c.weightx = 0;
    c.gridy++;
    c.gridwidth = 2;
    c.gridx = 0;
    c.insets = leftInsets;
    m_appendColums = new JCheckBox("Append columns");
    m_appendColums.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(final ActionEvent e) {
            m_columnSuffix.setEnabled(m_appendColums.isSelected());
        }
    });
    p.add(m_appendColums, c);
    c.gridy++;
    c.gridwidth = 1;
    c.gridx = 0;
    c.insets = leftInsets;
    p.add(new JLabel("Column suffix:"), c);
    c.gridx = 1;
    c.insets = middleInsets;
    m_columnSuffix = new JTextField();
    p.add(m_columnSuffix, c);
    c.gridy++;
    c.gridwidth = 1;
    c.gridx = 0;
    c.insets = leftInsets;
    p.add(new JLabel("Start value:"), c);
    c.gridx = 1;
    c.insets = middleInsets;
    m_startIndex = new JSpinner(new SpinnerNumberModel(0, Integer.MIN_VALUE, Integer.MAX_VALUE, 1));
    p.add(m_startIndex, c);
    c.gridy++;
    c.gridwidth = 1;
    c.gridx = 0;
    c.insets = leftInsets;
    p.add(new JLabel("Increment:"), c);
    c.gridx = 1;
    c.insets = middleInsets;
    m_increment = new JSpinner(new SpinnerNumberModel(1, 1, Integer.MAX_VALUE, 1));
    p.add(m_increment, c);
    c.gridy++;
    c.gridwidth = 1;
    c.gridx = 0;
    c.insets = leftInsets;
    p.add(new JLabel("Max. categories:"), c);
    c.gridx = 1;
    c.insets = middleInsets;
    m_maxCategories = new JSpinner(new SpinnerNumberModel(1000, 1, Integer.MAX_VALUE, 100));
    p.add(m_maxCategories, c);
    c.gridy++;
    c.gridwidth = 1;
    c.gridx = 0;
    c.insets = leftInsets;
    p.add(new JLabel("Default value:"), c);
    c.gridx = 1;
    c.insets = middleInsets;
    m_defaultValue = new JTextField();
    m_defaultValue.setHorizontalAlignment(JTextField.RIGHT);
    p.add(m_defaultValue, c);
    c.gridy++;
    c.gridwidth = 1;
    c.gridx = 0;
    c.insets = leftInsets;
    p.add(new JLabel("Map missing to:"), c);
    c.gridx = 1;
    c.insets = middleInsets;
    m_mapMissingTo = new JTextField();
    m_mapMissingTo.setHorizontalAlignment(JTextField.RIGHT);
    p.add(m_mapMissingTo, c);
    c.gridy++;
    c.weighty = 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) ActionEvent(java.awt.event.ActionEvent) JLabel(javax.swing.JLabel) JTextField(javax.swing.JTextField) JCheckBox(javax.swing.JCheckBox) SpinnerNumberModel(javax.swing.SpinnerNumberModel) ActionListener(java.awt.event.ActionListener) ColumnFilterPanel(org.knime.core.node.util.ColumnFilterPanel) JSpinner(javax.swing.JSpinner) StringValue(org.knime.core.data.StringValue)

Example 2 with ColumnFilterPanel

use of org.knime.core.node.util.ColumnFilterPanel in project knime-core by knime.

the class Joiner2NodeDialog method createColumnSelectionTab.

private JComponent createColumnSelectionTab(final String topTitle, final String bottomTitle) {
    JPanel p = new JPanel(new GridBagLayout());
    GridBagConstraints c = new GridBagConstraints();
    c.fill = GridBagConstraints.HORIZONTAL;
    c.anchor = GridBagConstraints.NORTHWEST;
    c.insets = new Insets(2, 2, 2, 2);
    c.gridx = 0;
    c.gridy = 0;
    c.weightx = 1;
    c.gridwidth = 1;
    m_leftFilterPanel = new ColumnFilterPanel(true);
    m_leftFilterPanel.setBorder(BorderFactory.createTitledBorder(topTitle));
    p.add(m_leftFilterPanel, c);
    c.gridy++;
    m_rightFilterPanel = new ColumnFilterPanel(true);
    m_rightFilterPanel.setBorder(BorderFactory.createTitledBorder(bottomTitle));
    p.add(m_rightFilterPanel, c);
    c.gridy++;
    p.add(createDuplicateColumnHandlingUIConstrols(), c);
    return new JScrollPane(p);
}
Also used : JScrollPane(javax.swing.JScrollPane) JPanel(javax.swing.JPanel) GridBagConstraints(java.awt.GridBagConstraints) Insets(java.awt.Insets) GridBagLayout(java.awt.GridBagLayout) ColumnFilterPanel(org.knime.core.node.util.ColumnFilterPanel)

Example 3 with ColumnFilterPanel

use of org.knime.core.node.util.ColumnFilterPanel in project knime-core by knime.

the class DBJoinerNodeDialog method createColumnSelectionTab.

private JComponent createColumnSelectionTab() {
    JPanel p = new JPanel(new GridBagLayout());
    GridBagConstraints c = new GridBagConstraints();
    c.fill = GridBagConstraints.HORIZONTAL;
    c.anchor = GridBagConstraints.NORTHWEST;
    c.insets = new Insets(2, 2, 2, 2);
    c.gridx = 0;
    c.gridy = 0;
    c.weightx = 1;
    c.gridwidth = 1;
    m_leftFilterPanel = new ColumnFilterPanel(true);
    m_leftFilterPanel.setBorder(BorderFactory.createTitledBorder("Top Input ('left' table)"));
    p.add(m_leftFilterPanel, c);
    c.gridy++;
    m_rightFilterPanel = new ColumnFilterPanel(true);
    m_rightFilterPanel.setBorder(BorderFactory.createTitledBorder("Bottom Input ('right' table)"));
    p.add(m_rightFilterPanel, c);
    c.gridy++;
    p.add(createDuplicateColumnHandlingUIConstrols(), c);
    return new JScrollPane(p);
}
Also used : JScrollPane(javax.swing.JScrollPane) JPanel(javax.swing.JPanel) GridBagConstraints(java.awt.GridBagConstraints) Insets(java.awt.Insets) GridBagLayout(java.awt.GridBagLayout) ColumnFilterPanel(org.knime.core.node.util.ColumnFilterPanel)

Example 4 with ColumnFilterPanel

use of org.knime.core.node.util.ColumnFilterPanel in project knime-core by knime.

the class AutoBinnerLearnNodeDialogPane method createAutoBinnerSettingsTab.

/**
 * @return
 */
@SuppressWarnings("unchecked")
private JPanel createAutoBinnerSettingsTab() {
    JPanel p = new JPanel(new GridBagLayout());
    GridBagConstraints c = new GridBagConstraints();
    c.fill = GridBagConstraints.HORIZONTAL;
    c.anchor = GridBagConstraints.NORTHWEST;
    c.insets = new Insets(2, 2, 2, 2);
    c.gridx = 0;
    c.gridy = 0;
    c.gridwidth = 1;
    c.weightx = 1;
    c.weighty = 1;
    m_targetCol = new ColumnFilterPanel(true, DoubleValue.class);
    p.add(m_targetCol, c);
    c.gridy++;
    p.add(createMethodUIControls(), c);
    c.gridy++;
    p.add(createBinNamingUIControls(), c);
    m_integerBounds = new JCheckBox("Force integer bounds");
    c.gridy++;
    p.add(m_integerBounds, c);
    c.gridy++;
    m_replaceColumn = new JCheckBox("Replace target column(s)");
    p.add(m_replaceColumn, c);
    return p;
}
Also used : JCheckBox(javax.swing.JCheckBox) JPanel(javax.swing.JPanel) GridBagConstraints(java.awt.GridBagConstraints) Insets(java.awt.Insets) GridBagLayout(java.awt.GridBagLayout) ColumnFilterPanel(org.knime.core.node.util.ColumnFilterPanel) DoubleValue(org.knime.core.data.DoubleValue)

Example 5 with ColumnFilterPanel

use of org.knime.core.node.util.ColumnFilterPanel in project knime-core by knime.

the class AutoBinnerLearnNodeDialogPane method createAutoBinnerSettingsTab.

/**
 * @return
 */
@SuppressWarnings("unchecked")
private JPanel createAutoBinnerSettingsTab() {
    JPanel p = new JPanel(new GridBagLayout());
    GridBagConstraints c = new GridBagConstraints();
    c.fill = GridBagConstraints.HORIZONTAL;
    c.anchor = GridBagConstraints.NORTHWEST;
    c.insets = new Insets(2, 2, 2, 2);
    c.gridx = 0;
    c.gridy = 0;
    c.gridwidth = 1;
    c.weightx = 1;
    c.weighty = 1;
    m_targetCol = new ColumnFilterPanel(true, DoubleValue.class);
    p.add(m_targetCol, c);
    c.gridy++;
    p.add(createMethodUIControls(), c);
    c.gridy++;
    p.add(createBinNamingUIControls(), c);
    c.gridy++;
    m_replaceColumn = new JCheckBox("Replace target column(s)");
    p.add(m_replaceColumn, c);
    return p;
}
Also used : JCheckBox(javax.swing.JCheckBox) JPanel(javax.swing.JPanel) GridBagConstraints(java.awt.GridBagConstraints) Insets(java.awt.Insets) GridBagLayout(java.awt.GridBagLayout) ColumnFilterPanel(org.knime.core.node.util.ColumnFilterPanel) DoubleValue(org.knime.core.data.DoubleValue)

Aggregations

ColumnFilterPanel (org.knime.core.node.util.ColumnFilterPanel)7 GridBagConstraints (java.awt.GridBagConstraints)6 GridBagLayout (java.awt.GridBagLayout)6 Insets (java.awt.Insets)6 JPanel (javax.swing.JPanel)6 JCheckBox (javax.swing.JCheckBox)4 JScrollPane (javax.swing.JScrollPane)2 DoubleValue (org.knime.core.data.DoubleValue)2 ActionEvent (java.awt.event.ActionEvent)1 ActionListener (java.awt.event.ActionListener)1 HashSet (java.util.HashSet)1 JLabel (javax.swing.JLabel)1 JSpinner (javax.swing.JSpinner)1 JTextField (javax.swing.JTextField)1 SpinnerNumberModel (javax.swing.SpinnerNumberModel)1 StringValue (org.knime.core.data.StringValue)1 InvalidSettingsException (org.knime.core.node.InvalidSettingsException)1 NotConfigurableException (org.knime.core.node.NotConfigurableException)1