use of org.knime.core.node.defaultnodesettings.DialogComponentBoolean in project knime-core by knime.
the class DBTableCreatorNodeDialog method createTableSettingsPanel.
/**
* @return a newly created table settings panel
*/
private JPanel createTableSettingsPanel() {
final JPanel panel = new JPanel(new BorderLayout());
final JPanel tablePanel = new JPanel();
tablePanel.setLayout(new BoxLayout(tablePanel, BoxLayout.Y_AXIS));
tablePanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Table Settings"));
final Box box = new Box(BoxLayout.Y_AXIS);
final DialogComponentString schemaComp = new DialogComponentString(m_config.getSchemaSettingsModel(), "Schema: ");
box.add(schemaComp.getComponentPanel());
box.add(Box.createVerticalGlue());
final DialogComponentString tableNameComp = new DialogComponentString(m_config.getTableNameSettingsModel(), "Table name: ");
box.add(tableNameComp.getComponentPanel());
box.add(Box.createVerticalGlue());
final DialogComponentBoolean tempTableComp = new DialogComponentBoolean(m_config.getTempTableSettingsModel(), "Create temporary table");
box.add(tempTableComp.getComponentPanel());
box.add(Box.createVerticalGlue());
final DialogComponentBoolean ifNotExistsComp = new DialogComponentBoolean(m_config.getIfNotExistsSettingsModel(), "Create table if it does not exist");
box.add(ifNotExistsComp.getComponentPanel());
box.add(Box.createVerticalGlue());
tablePanel.add(box);
final JPanel dynamicPanel = new JPanel(new BorderLayout());
dynamicPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Dynamic Settings"));
final DialogComponentBoolean useDynamicSettingsComp = new DialogComponentBoolean(m_config.getUseDynamicSettingsModel(), "Use dynamic settings");
dynamicPanel.add(useDynamicSettingsComp.getComponentPanel());
panel.add(tablePanel, BorderLayout.CENTER);
panel.add(dynamicPanel, BorderLayout.SOUTH);
return panel;
}
use of org.knime.core.node.defaultnodesettings.DialogComponentBoolean in project knime-core by knime.
the class DBGroupByNodeDialog2 method createAdvancedOptionsPanel.
private JComponent createAdvancedOptionsPanel() {
final JPanel panel = new JPanel(new GridBagLayout());
panel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), " Advanced settings "));
final GridBagConstraints c = new GridBagConstraints();
c.gridx = 0;
c.gridy = 0;
c.anchor = GridBagConstraints.FIRST_LINE_START;
c.fill = GridBagConstraints.NONE;
final DialogComponentStringSelection colNamePolicy = new DialogComponentStringSelection(m_columnNamePolicy, "Column naming:", ColumnNamePolicy.getPolicyLabels());
panel.add(colNamePolicy.getComponentPanel(), c);
c.gridx++;
panel.add(new DialogComponentBoolean(m_addCountStar, "Add COUNT(*)").getComponentPanel(), c);
c.gridx++;
panel.add(new DialogComponentString(m_countStarColName, "column name: ", true, 15).getComponentPanel(), c);
return panel;
}
use of org.knime.core.node.defaultnodesettings.DialogComponentBoolean in project knime-core by knime.
the class ParameterizedDBQueryPanel method createOptionsPanel.
private JPanel createOptionsPanel() {
final JPanel panel = new JPanel(new BorderLayout());
panel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createLoweredBevelBorder(), BorderFactory.createTitledBorder("Options")));
final Box optionsBox = Box.createHorizontalBox();
optionsBox.add(new DialogComponentBoolean(m_appendInputColsModel, "Append input columns").getComponentPanel());
optionsBox.add(new DialogComponentBoolean(m_includeEmptyResultsModel, "Include empty results").getComponentPanel());
optionsBox.add(new DialogComponentBoolean(m_retainAllColumnsModel, "Retain all columns").getComponentPanel());
optionsBox.add(new DialogComponentBoolean(m_failIfExceptionModel, "Fail on error").getComponentPanel());
panel.add(optionsBox, BorderLayout.CENTER);
m_appendInputColsModel.addChangeListener(l -> {
m_includeEmptyResultsModel.setEnabled(m_appendInputColsModel.getBooleanValue());
m_retainAllColumnsModel.setEnabled(m_appendInputColsModel.getBooleanValue());
});
return panel;
}
use of org.knime.core.node.defaultnodesettings.DialogComponentBoolean in project knime-core by knime.
the class AppendElementOperator method getDC.
/**
* @return
*/
private DialogComponent getDC() {
if (m_filterMissingDC == null) {
m_filterMissingDC = new DialogComponentBoolean(m_filterMissing, "Filter missing collection elements");
m_filterMissingDC.setToolTipText("Tick this option to filter missing collection elements");
}
return m_filterMissingDC;
}
use of org.knime.core.node.defaultnodesettings.DialogComponentBoolean in project knime-core by knime.
the class NumericOutliersNodeDialogPane method createSettingsDialog.
/**
* Creates the settings panel.
*
* @return the settings panel
*/
private JPanel createSettingsDialog() {
final JPanel panel = new JPanel(new GridBagLayout());
final GridBagConstraints gbc = new GridBagConstraints();
gbc.anchor = GridBagConstraints.LINE_START;
gbc.gridx = 0;
gbc.gridy = 0;
gbc.weightx = 1;
gbc.weighty = 0;
// add panel border
panel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), SETTINGS_BORDER_TITLE));
// add IQR scale dialog
m_scalarDialog = new DialogComponentNumberEdit(NumericOutliersNodeModel.createScalarModel(), QUARTILE_RANGE_MULT);
panel.add(m_scalarDialog.getComponentPanel(), gbc);
++gbc.gridy;
// add the update domain dialog
m_updateDomainDialog = new DialogComponentBoolean(NumericOutliersNodeModel.createDomainModel(), DOMAIN_POLICY);
panel.add(m_updateDomainDialog.getComponentPanel(), gbc);
++gbc.gridy;
// add the heuristic dialog
m_heuristicDialog = new DialogComponentBoolean(NumericOutliersNodeModel.createHeuristicModel(), HEURISTIC_LABEL);
panel.add(m_heuristicDialog.getComponentPanel(), gbc);
++gbc.gridy;
// add a component to select the percentile estimation type
List<String> eTypes = Arrays.stream(EstimationType.values()).map(val -> val.toString()).collect(Collectors.toList());
m_estimationDialog = new DialogComponentStringSelection(NumericOutliersNodeModel.createEstimationModel(), ESTIMATION_TYPE, eTypes);
panel.add(m_estimationDialog.getComponentPanel(), gbc);
return panel;
}
Aggregations