use of org.knime.core.node.defaultnodesettings.SettingsModelString in project knime-core by knime.
the class DateTimeShiftNodeModel method createPeriodValueModel.
/**
* @param periodSelectionModel model for the period selection button group
* @return the string model, used in both dialog and model.
*/
public static SettingsModelString createPeriodValueModel(final SettingsModelString periodSelectionModel) {
final SettingsModelString model = new SettingsModelString("period_value", "");
periodSelectionModel.addChangeListener(l -> model.setEnabled(periodSelectionModel.getStringValue().equals(DurationMode.Value.name()) && periodSelectionModel.isEnabled()));
model.setEnabled(false);
return model;
}
use of org.knime.core.node.defaultnodesettings.SettingsModelString in project knime-core by knime.
the class DateTimeShiftNodeModel method createNumericalSelectionModel.
/**
* @return the string model, used in both dialog and model.
*/
public static SettingsModelString createNumericalSelectionModel() {
final SettingsModelString model = new SettingsModelString("numerical_selection", NumericalMode.Column.name());
model.setEnabled(false);
return model;
}
use of org.knime.core.node.defaultnodesettings.SettingsModelString in project knime-core by knime.
the class ModifyTimeNodeModel method createSuffixModel.
/**
* @param replaceOrAppendModel model for the replace/append button group
* @return the string model, used in both dialog and model.
*/
static SettingsModelString createSuffixModel(final SettingsModelString replaceOrAppendModel) {
final SettingsModelString suffixModel = new SettingsModelString("suffix", "(modified time)");
replaceOrAppendModel.addChangeListener(e -> suffixModel.setEnabled(replaceOrAppendModel.getStringValue().equals(OPTION_APPEND)));
suffixModel.setEnabled(false);
return suffixModel;
}
use of org.knime.core.node.defaultnodesettings.SettingsModelString in project knime-core by knime.
the class ModifyDateNodeModel method createTimeZoneSelectModel.
/**
* @return the string select model, used in both dialog and model.
*/
static SettingsModelString createTimeZoneSelectModel(final SettingsModelBoolean zoneModelBool) {
final SettingsModelString zoneSelectModel = new SettingsModelString("time_zone_select", ZoneId.systemDefault().getId());
zoneSelectModel.setEnabled(false);
zoneModelBool.addChangeListener(e -> zoneSelectModel.setEnabled(zoneModelBool.getBooleanValue()));
return zoneSelectModel;
}
use of org.knime.core.node.defaultnodesettings.SettingsModelString in project knime-core by knime.
the class ModifyDateNodeModel method createSuffixModel.
/**
* @param replaceOrAppendModel model for the replace/append button group
* @return the string model, used in both dialog and model.
*/
public static SettingsModelString createSuffixModel(final SettingsModelString replaceOrAppendModel) {
final SettingsModelString suffixModel = new SettingsModelString("suffix", "(modified date)");
replaceOrAppendModel.addChangeListener(e -> suffixModel.setEnabled(replaceOrAppendModel.getStringValue().equals(OPTION_APPEND)));
suffixModel.setEnabled(false);
return suffixModel;
}
Aggregations