|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.knime.core.node.defaultnodesettings.SettingsModel
org.knime.core.node.defaultnodesettings.DialogComponent.EmptySettingsModel
protected static final class DialogComponent.EmptySettingsModel
-------------------------------------------------------------------------
Components deriving from DialogComponent
can use this model if
they don't need or want to store any value (but are only displaying
stuff). Do not call any of the methods of this model. No value will be
stored in this model, no value will be saved or loaded. You cannot change
the value of the component through this model.
Constructor Summary | |
---|---|
DialogComponent.EmptySettingsModel()
Creates an empty settings model, that will not hold any value. |
Method Summary | |
---|---|
void |
addChangeListener(ChangeListener l)
Adds a listener (to the end of the listener list) which is notified, whenever a new values is set in the model or the enable status changes. |
protected DialogComponent.EmptySettingsModel |
createClone()
|
protected String |
getConfigName()
|
protected String |
getModelTypeID()
Each settings model provides an ID which will be stored with its values. |
boolean |
isEnabled()
|
protected void |
loadSettingsForDialog(NodeSettingsRO settings,
PortObjectSpec[] specs)
Read the value(s) of this settings model from configuration object. |
protected void |
loadSettingsForModel(NodeSettingsRO settings)
Read value(s) of this settings model from the configuration object. |
protected void |
notifyChangeListeners()
Notifies all registered listeners about a new model content. |
protected void |
prependChangeListener(ChangeListener l)
Adds a listener (to the beginning of the listener list) which is notified, whenever a new values is set in the model or the enable status changes. |
void |
removeChangeListener(ChangeListener l)
Remove a specific listener. |
protected void |
saveSettingsForDialog(NodeSettingsWO settings)
Write value(s) of this component model to configuration object. |
protected void |
saveSettingsForModel(NodeSettingsWO settings)
Write value(s) of this settings model to configuration object. NOTE: Don't call this method directly, rather call saveSettingsTo. |
void |
setEnabled(boolean enabled)
Sets the enabled status of the model. |
String |
toString()
Derived classes should print their class name plus the config name for nice and useful error messages. |
protected void |
validateSettingsForModel(NodeSettingsRO settings)
Read the expected values from the settings object, without assigning them to the internal variables! (Is not called when the model was disabled at the time the settings were saved.) |
Methods inherited from class org.knime.core.node.defaultnodesettings.SettingsModel |
---|
createCloneWithValidatedValue, dlgLoadSettingsFrom, dlgSaveSettingsTo, loadSettingsFrom, saveSettingsTo, validateSettings |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DialogComponent.EmptySettingsModel()
Method Detail |
---|
public String toString()
toString
in class SettingsModel
public void addChangeListener(ChangeListener l)
addChangeListener
in class SettingsModel
l
- listener to add.protected void prependChangeListener(ChangeListener l)
prependChangeListener
in class SettingsModel
l
- listener to add.protected void notifyChangeListeners()
notifyChangeListeners
in class SettingsModel
public void removeChangeListener(ChangeListener l)
removeChangeListener
in class SettingsModel
l
- listener to remove.public boolean isEnabled()
isEnabled
in class SettingsModel
SettingsModel.setEnabled(boolean)
public void setEnabled(boolean enabled)
setEnabled
in class SettingsModel
enabled
- the new enable status. If true the model
saves/validates/loads its value, if false, all these
operations are skipped.protected DialogComponent.EmptySettingsModel createClone()
createClone
in class SettingsModel
protected String getConfigName()
getConfigName
in class SettingsModel
protected String getModelTypeID()
getModelTypeID
in class SettingsModel
protected void loadSettingsForDialog(NodeSettingsRO settings, PortObjectSpec[] specs) throws NotConfigurableException
loadSettingsForDialog
in class SettingsModel
settings
- The NodeSettings
to read from.specs
- The input specs.
NotConfigurableException
- if the specs are not good enough toprotected void loadSettingsForModel(NodeSettingsRO settings) throws InvalidSettingsException
loadSettingsForModel
in class SettingsModel
settings
- The NodeSettings
to read
from.
InvalidSettingsException
- if load fails.protected void saveSettingsForDialog(NodeSettingsWO settings) throws InvalidSettingsException
saveSettingsForDialog
in class SettingsModel
settings
- The NodeSettings
to read
from.
InvalidSettingsException
- if the user has entered wrong values.protected void saveSettingsForModel(NodeSettingsWO settings)
saveSettingsForModel
in class SettingsModel
settings
- The NodeSettings
to write
into.protected void validateSettingsForModel(NodeSettingsRO settings) throws InvalidSettingsException
validateSettingsForModel
in class SettingsModel
settings
- the object to read the value(s) from
InvalidSettingsException
- if the value(s) in the settings object
are invalid.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |