use of org.knime.core.node.defaultnodesettings.SettingsModelBoolean in project knime-core by knime.
the class AbstractFieldExtractorNodeDialog method createUIComponentFor.
/**
* Creates the necessary {@link SettingsModel}s, adds the listener to the
* checkbox and creates the UI component with a horizontally oriented group
* containing the checkbox and text field. Then closes the group.
* @param timeField name of the time field for which the ui component
* should be created
*/
protected void createUIComponentFor(final String timeField) {
// create the settings models and add listener
SettingsModelBoolean checkBoxModel = createUseTimeFieldModel(timeField);
SettingsModelString colNameModel = createTimeFieldColumnNameModel(timeField);
addListener(checkBoxModel, colNameModel);
createNewGroup("");
setHorizontalPlacement(true);
addDialogComponent(new DialogComponentBoolean(checkBoxModel, timeField));
addDialogComponent(new DialogComponentString(colNameModel, "Column name:", true, 20));
closeCurrentGroup();
setHorizontalPlacement(false);
}
use of org.knime.core.node.defaultnodesettings.SettingsModelBoolean in project knime-core by knime.
the class DecTreePredictorNodeFactory method createNodeDialogPane.
/**
* {@inheritDoc}
*/
@Override
public NodeDialogPane createNodeDialogPane() {
return new DefaultNodeSettingsPane() {
{
addDialogComponent(new DialogComponentNumber(DecTreePredictorNodeModel.createMaxNumPatternSettings(), /* label: */
"Maximum number of stored patterns " + "for HiLite-ing: ", 100));
addDialogComponent(new DialogComponentBoolean(new SettingsModelBoolean(DecTreePredictorNodeModel.SHOW_DISTRIBUTION, false), "Append columns with normalized class distribution"));
}
};
}
use of org.knime.core.node.defaultnodesettings.SettingsModelBoolean in project knime-core by knime.
the class ColumnListLoopStartNodeDialog method saveSettingsTo.
/**
* {@inheritDoc}
*/
@Override
protected void saveSettingsTo(final NodeSettingsWO settings) throws InvalidSettingsException {
DataColumnSpecFilterConfiguration conf = ColumnListLoopStartNodeModel.createDCSFilterConfiguration();
m_filterPanel.saveConfiguration(conf);
conf.saveConfiguration(settings);
SettingsModelBoolean noColumnsSettings = ColumnListLoopStartNodeModel.createNoColumnsPolicySetings();
noColumnsSettings.setBooleanValue(m_noColumnsPolicyOneInterationButton.isSelected());
noColumnsSettings.saveSettingsTo(settings);
}
use of org.knime.core.node.defaultnodesettings.SettingsModelBoolean in project knime-core by knime.
the class DecisionTreeLearnerNodeDialog2 method createSettingsFilterNominalValuesFromParent.
/**
* @param skipNominalColumnsWithoutDomainModel model to listen to for
* enablement (only enable if binary nominal splits)
* @return model representing {@link
* DecisionTreeLearnerNodeModel2#KEY_FILTER_NOMINAL_VALUES_FROM_PARENT}
*/
static SettingsModelBoolean createSettingsFilterNominalValuesFromParent(final SettingsModelBoolean skipNominalColumnsWithoutDomainModel) {
final SettingsModelBoolean model = new SettingsModelBoolean(DecisionTreeLearnerNodeModel2.KEY_FILTER_NOMINAL_VALUES_FROM_PARENT, false);
skipNominalColumnsWithoutDomainModel.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(final ChangeEvent e) {
model.setEnabled(skipNominalColumnsWithoutDomainModel.getBooleanValue());
}
});
model.setEnabled(skipNominalColumnsWithoutDomainModel.getBooleanValue());
return model;
}
use of org.knime.core.node.defaultnodesettings.SettingsModelBoolean in project knime-core by knime.
the class CreateBitVectorNodeModel method createUseMeanModel.
/**
* @return the use mean model
*/
static SettingsModelBoolean createUseMeanModel() {
final SettingsModelBoolean model = new SettingsModelBoolean("singleNumericUseMean", DEFAULT_USE_MEAN);
model.setEnabled(ColumnType.getDefault().equals(ColumnType.MULTI_NUMERICAL));
return model;
}
Aggregations