use of org.knime.core.node.defaultnodesettings.DialogComponentButtonGroup in project knime-core by knime.
the class CorrelationOperator method getDialogComponent.
private DialogComponentButtonGroup getDialogComponent() {
if (m_correlationComponent == null) {
final SettingsModelString correlationModel = m_settings.getCorrelationMethodModel();
m_correlationComponent = new DialogComponentButtonGroup(correlationModel, "Correlation method", false, CorrelationMethods.values());
}
return m_correlationComponent;
}
use of org.knime.core.node.defaultnodesettings.DialogComponentButtonGroup in project knime-core by knime.
the class AbstractFieldExtractorNodeDialog method createUIComponentWithFormatSelection.
/**
* 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 for the new column name.
* Then closes the group.
*
* @param timeField name of the time field for which a checkbox,
* a text field and a format selection (int or string) should be created
*/
protected void createUIComponentWithFormatSelection(final String timeField) {
// create the settings models and add listener
SettingsModelBoolean checkBoxModel = createUseTimeFieldModel(timeField);
SettingsModelString colNameModel = createTimeFieldColumnNameModel(timeField);
SettingsModelString formatModel = createRepresentationModelFor(timeField);
addListener(checkBoxModel, colNameModel);
addListener(checkBoxModel, formatModel);
createNewGroup("");
setHorizontalPlacement(true);
addDialogComponent(new DialogComponentBoolean(checkBoxModel, timeField));
// add radio buttons for string or int representation
addDialogComponent(new DialogComponentButtonGroup(formatModel, true, "Value as", AS_STRING, AS_INT));
addDialogComponent(new DialogComponentString(colNameModel, "Column name:", true, 20));
closeCurrentGroup();
setHorizontalPlacement(false);
}
use of org.knime.core.node.defaultnodesettings.DialogComponentButtonGroup in project knime-core by knime.
the class SleepNodeDialog method waitForFile.
private void waitForFile() {
m_events = new DialogComponentButtonGroup(new SettingsModelString(SleepNodeModel.CFGKEY_FILESTATUS, "Modification"), false, null, "Creation", "Modification", "Deletion");
FlowVariableModel fvm = createFlowVariableModel(SleepNodeModel.CFGKEY_FILEPATH, Type.STRING);
m_fileChooser = new FilesHistoryPanel(fvm, SleepNodeModel.CFGKEY_FILEPATH, LocationValidation.None);
m_fileRB = new JRadioButton("Wait for file.. ");
m_fileRB.addItemListener(new ItemListener() {
@Override
public void itemStateChanged(final ItemEvent e) {
if (m_fileRB.isSelected()) {
m_selection = 2;
}
m_fileChooser.setEnabled(m_fileRB.isSelected());
m_events.getModel().setEnabled(m_fileRB.isSelected());
}
});
}
Aggregations