|
||||||||||
| 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.SettingsModelNumber
org.knime.core.node.defaultnodesettings.SettingsModelInteger
public class SettingsModelInteger
| Constructor Summary | |
|---|---|
SettingsModelInteger(String configName,
int defaultValue)
Creates a new object holding an integer value. |
|
| Method Summary | |
|---|---|
protected SettingsModelInteger |
createClone()
|
protected String |
getConfigName()
|
FlowVariable.Type |
getFlowVariableType()
|
int |
getIntValue()
|
String |
getKey()
|
protected String |
getModelTypeID()
Each settings model provides an ID which will be stored with its values. |
(package private) String |
getNumberValueStr()
|
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 |
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 |
setIntValue(int newValue)
set the value stored to the new value. |
(package private) void |
setNumberValueStr(String newValueStr)
Allows to set a new value by passing a string that will be parsed and, if valid, set as new value. |
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.) |
protected void |
validateValue(int value)
Called during validateSettingsForModel(org.knime.core.node.NodeSettingsRO), can be overwritten by
derived classes. |
| Methods inherited from class org.knime.core.node.defaultnodesettings.SettingsModel |
|---|
addChangeListener, createCloneWithValidatedValue, dlgLoadSettingsFrom, dlgSaveSettingsTo, isEnabled, loadSettingsFrom, notifyChangeListeners, prependChangeListener, removeChangeListener, saveSettingsTo, setEnabled, validateSettings |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SettingsModelInteger(String configName,
int defaultValue)
configName - the identifier the value is stored with in the
NodeSettings objectdefaultValue - the initial value| Method Detail |
|---|
protected SettingsModelInteger createClone()
createClone in class SettingsModelprotected String getModelTypeID()
getModelTypeID in class SettingsModelprotected String getConfigName()
getConfigName in class SettingsModelpublic void setIntValue(int newValue)
newValue - the new value to store.public int getIntValue()
void setNumberValueStr(String newValueStr)
setNumberValueStr in class SettingsModelNumbernewValueStr - the new value to be set, as string representationString getNumberValueStr()
getNumberValueStr in class SettingsModelNumber
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 saveSettingsForDialog(NodeSettingsWO settings)
throws InvalidSettingsException
saveSettingsForDialog in class SettingsModelsettings - The NodeSettings to read
from.
InvalidSettingsException - if the user has entered wrong values.
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.
protected void validateValue(int value)
throws InvalidSettingsException
validateSettingsForModel(org.knime.core.node.NodeSettingsRO), can be overwritten by
derived classes.
value - the value to validate
InvalidSettingsException - if the value is not valid and should be
rejected
protected void loadSettingsForModel(NodeSettingsRO settings)
throws InvalidSettingsException
loadSettingsForModel in class SettingsModelsettings - The NodeSettings to read
from.
InvalidSettingsException - if load fails.protected void saveSettingsForModel(NodeSettingsWO settings)
saveSettingsForModel in class SettingsModelsettings - The NodeSettings to write
into.public String toString()
toString in class SettingsModelpublic String getKey()
getKey in interface SettingsModelFlowVariableCompatiblepublic FlowVariable.Type getFlowVariableType()
getFlowVariableType in interface SettingsModelFlowVariableCompatible
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||