In this method, a node's user settings values are loaded into the dialog. The
NodeSettings object contains the current settings previously stored by the
saveSettings method of the
NodeModel. You must be able to handle invalid and unset settings (as no settings are available when the dialog is opened for the first time). You must not throw an exception due to missing or invalid settings.
You can prevent a dialog from being presented to the user by throwing a
NotConfigurableException. You should also consider throwing this if it is impossible for the user to enter valid settings, for example if the incoming table doesn't contain a nominal column and the dialog requires a nominal column to be selected.
// get the value with key and default value and directly set the // value in the GUI component (spinner) m_percentage.setValue(settings.getInt( ExampleNodeModel.CFG_PERCENTAGE, 100)); // get the value with key and default value and directly set the // value in the GUI component (checkbox) m_replaceBox.setSelected(settings.getBoolean( ExampleNodeModel.CFG_REPLACE, false));