use of org.knime.core.node.util.filter.column.DataColumnSpecFilterPanel in project knime-core by knime.
the class AutoBinnerLearnNodeDialogPane method createAutoBinnerSettingsTab.
private JPanel createAutoBinnerSettingsTab(final boolean supportsQuantile) {
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_filterPanel = new DataColumnSpecFilterPanel();
p.add(m_filterPanel, c);
c.gridy++;
p.add(createMethodUIControls(supportsQuantile), 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;
}
use of org.knime.core.node.util.filter.column.DataColumnSpecFilterPanel 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_filterPanel = new DataColumnSpecFilterPanel();
p.add(m_filterPanel, 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(SwingConstants.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(SwingConstants.RIGHT);
p.add(m_mapMissingTo, c);
c.gridy++;
c.weighty = 1;
p.add(new JPanel(), c);
return p;
}
use of org.knime.core.node.util.filter.column.DataColumnSpecFilterPanel in project knime-core by knime.
the class EditNominalDomainDicNodeDialogPane method createEditNominalDomainTab.
private void createEditNominalDomainTab() {
m_filterPanel = new DataColumnSpecFilterPanel();
JPanel tabpanel = new JPanel(new BorderLayout());
tabpanel.add(m_filterPanel, BorderLayout.NORTH);
JPanel settings = new JPanel(new BorderLayout());
settings.add(createRadioButtonGroup(IGNORE_COLUMNS_NOT_PRESENT_IN_DATA), BorderLayout.NORTH);
JPanel secondSettings = new JPanel(new BorderLayout());
secondSettings.add(createRadioButtonGroup(IGNORE_TYPES_NOT_MATCH), BorderLayout.NORTH);
secondSettings.add(createRadioButtonGroup(NEW_VALUES_LAST, "Before existing domain values (1st input)", "After existing domain values (1st input)"), BorderLayout.CENTER);
secondSettings.add(createTextField("Maximum amount of possbile domain values"), BorderLayout.SOUTH);
settings.add(secondSettings, BorderLayout.SOUTH);
tabpanel.add(settings, BorderLayout.SOUTH);
addTab("Add Domain Values", tabpanel);
}
use of org.knime.core.node.util.filter.column.DataColumnSpecFilterPanel in project knime-core by knime.
the class EditNumericDomainNodeDialogPane method createMinMaxTab.
private void createMinMaxTab() {
m_filterPanel = new DataColumnSpecFilterPanel();
m_filterPanel.setIncludeTitle(" Include ");
m_filterPanel.setExcludeTitle(" Exclude ");
m_lowerBField = createTextField("0.0");
m_upperBField = createTextField("1.0");
JPanel retainMinMaxPanel = new JPanel(new GridLayout(2, 2));
retainMinMaxPanel.setBorder(BorderFactory.createTitledBorder("Domain"));
createBoundedBox(retainMinMaxPanel, m_lowerBField, LOWER_B + ": ");
createBoundedBox(retainMinMaxPanel, m_upperBField, UPPER_B + ": ");
Box outOfDomainBox = Box.createVerticalBox();
outOfDomainBox.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Out of Domain Policy"));
m_buttonGrp = new ButtonGroup();
for (final DomainOverflowPolicy handler : DomainOverflowPolicy.values()) {
JRadioButton jRadioButton = new JRadioButton(handler.getDescription());
jRadioButton.setActionCommand(handler.toString());
jRadioButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(final ActionEvent e) {
m_handler = handler;
}
});
m_buttonGrp.add(jRadioButton);
outOfDomainBox.add(jRadioButton, Component.LEFT_ALIGNMENT);
}
JPanel tabpanel = new JPanel();
tabpanel.setLayout(new BorderLayout());
tabpanel.add(m_filterPanel, BorderLayout.NORTH);
tabpanel.add(retainMinMaxPanel, BorderLayout.WEST);
outOfDomainBox.add(Box.createHorizontalGlue());
tabpanel.add(outOfDomainBox, BorderLayout.SOUTH);
addTab("Edit Domain", tabpanel);
}
use of org.knime.core.node.util.filter.column.DataColumnSpecFilterPanel in project knime-core by knime.
the class LogRegLearnerNodeDialogPane method createIncludesPanel.
/**
* Create options panel for the included columns.
*/
private JPanel createIncludesPanel() {
JPanel p = new JPanel(new GridBagLayout());
GridBagConstraints c = new GridBagConstraints();
c.fill = GridBagConstraints.BOTH;
c.weightx = 1;
c.weighty = 0;
c.gridx = 0;
c.gridy = 0;
c.anchor = GridBagConstraints.BASELINE_LEADING;
c.insets = new Insets(5, 5, 0, 0);
m_filterPanel = new DataColumnSpecFilterPanel(false);
p.add(m_filterPanel, c);
c.gridy++;
m_notSortIncludes = new JCheckBox("Use order from column domain (applies only to nominal columns). " + "First value is chosen as reference for dummy variables.");
p.add(m_notSortIncludes, c);
return p;
}
Aggregations