Load/SaveSettings Method

When the loadValidatedSettings method is called, the settings are already validated and can be loaded into the local fields, which in this case is the SettingsModels of the number of bins and the selected column.
    /**
     * @see org.knime.core.node.NodeModel
     *      #loadValidatedSettingsFrom(org.knime.core.node.NodeSettingsRO)
     */
     @Override
    protected void loadValidatedSettingsFrom(
            final NodeSettingsRO settings)
            throws InvalidSettingsException {
            
    	// loads the values from the settings into the models.
        // It can be safely assumed that the settings are validated by the 
        // method below.
        
        m_numberOfBins.loadSettingsFrom(settings);
        m_column.loadSettingsFrom(settings);

    }
In the saveSettings method the local fields are written into the settings such that the dialog displays the current values.
    /**
     * @see org.knime.core.node.NodeModel
     *      #saveSettingsTo(org.knime.core.node.NodeSettings)
     */
     @Override
    protected void saveSettingsTo(final NodeSettingsWO settings) {

        // save settings to the config object.
    	
        m_numberOfBins.saveSettingsTo(settings);
        m_column.saveSettingsTo(settings);
    }
LinkedInTwitterShare

What are you looking for?