|
||||||||||
| 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 SettingsModelpublic void addChangeListener(ChangeListener l)
addChangeListener in class SettingsModell - listener to add.protected void prependChangeListener(ChangeListener l)
prependChangeListener in class SettingsModell - listener to add.protected void notifyChangeListeners()
notifyChangeListeners in class SettingsModelpublic void removeChangeListener(ChangeListener l)
removeChangeListener in class SettingsModell - listener to remove.public boolean isEnabled()
isEnabled in class SettingsModelSettingsModel.setEnabled(boolean)public void setEnabled(boolean enabled)
setEnabled in class SettingsModelenabled - 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 SettingsModelprotected String getConfigName()
getConfigName in class SettingsModelprotected String getModelTypeID()
getModelTypeID in class SettingsModel
protected void loadSettingsForDialog(NodeSettingsRO settings,
PortObjectSpec[] specs)
throws NotConfigurableException
loadSettingsForDialog in class SettingsModelsettings - The NodeSettings to read from.specs - The input specs.
NotConfigurableException - if the specs are not good enough to
protected void loadSettingsForModel(NodeSettingsRO settings)
throws InvalidSettingsException
loadSettingsForModel in class SettingsModelsettings - The NodeSettings to read
from.
InvalidSettingsException - if load fails.
protected void saveSettingsForDialog(NodeSettingsWO settings)
throws InvalidSettingsException
saveSettingsForDialog in class SettingsModelsettings - The NodeSettings to read
from.
InvalidSettingsException - if the user has entered wrong values.protected void saveSettingsForModel(NodeSettingsWO settings)
saveSettingsForModel in class SettingsModelsettings - The NodeSettings to write
into.
protected void validateSettingsForModel(NodeSettingsRO settings)
throws InvalidSettingsException
validateSettingsForModel in class SettingsModelsettings - 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 | |||||||||