use of org.knime.core.node.FlowVariableModel 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());
}
});
}
use of org.knime.core.node.FlowVariableModel in project knime-core by knime.
the class DialogComponentNumber method setEnabledComponents.
/**
* {@inheritDoc}
*/
@Override
protected void setEnabledComponents(final boolean enabled) {
boolean spinnerEnabled = enabled;
// enable the spinner according to the variable model
if (m_fvmButton != null) {
FlowVariableModel svmModel = m_fvmButton.getFlowVariableModel();
if (svmModel.isVariableReplacementEnabled()) {
spinnerEnabled = false;
}
m_fvmButton.setEnabled(enabled);
}
m_spinner.setEnabled(spinnerEnabled);
}
Aggregations