Search in sources :

Example 1 with SettingsModelLong

use of org.knime.core.node.defaultnodesettings.SettingsModelLong in project knime-core by knime.

the class CreateDateTimeNodeModel method createRowNrFixedModel.

/**
 * @return the long model, used in both dialog and model.
 */
static SettingsModelLong createRowNrFixedModel(final SettingsModelString rowNrOptionSelectionModel) {
    final SettingsModelLong settingsModelLong = new SettingsModelLongBounded("nr_rows", 1000, 1, Long.MAX_VALUE);
    rowNrOptionSelectionModel.addChangeListener(l -> settingsModelLong.setEnabled(rowNrOptionSelectionModel.getStringValue().equals(RowNrMode.Fixed.name())));
    return settingsModelLong;
}
Also used : SettingsModelLong(org.knime.core.node.defaultnodesettings.SettingsModelLong) SettingsModelLongBounded(org.knime.core.node.defaultnodesettings.SettingsModelLongBounded)

Aggregations

SettingsModelLong (org.knime.core.node.defaultnodesettings.SettingsModelLong)1 SettingsModelLongBounded (org.knime.core.node.defaultnodesettings.SettingsModelLongBounded)1