|
||||||||||
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.SettingsModelDoubleRange
public class SettingsModelDoubleRange
Settings model for a double range [min, max]. It stores two floating point numbers. It ensures that the minimum is smaller than the maximum at any time.
Constructor Summary | |
---|---|
SettingsModelDoubleRange(String configName,
double minRange,
double maxRange)
Create setting object. |
Method Summary | |
---|---|
protected SettingsModelDoubleRange |
createClone()
|
protected String |
getConfigName()
|
double |
getMaxRange()
|
double |
getMinRange()
|
protected String |
getModelTypeID()
Each settings model provides an ID which will be stored with its values. |
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. |
(package private) void |
setMaxRange(double maxRange)
Sets a new max value of the range. |
(package private) void |
setMinRange(double minRange)
Sets a new min value of the range. |
(package private) void |
setRange(double newMin,
double newMax)
Sets a new min and a new max 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.) |
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 SettingsModelDoubleRange(String configName, double minRange, double maxRange) throws IllegalArgumentException
configName
- identifier in the config file.minRange
- minimum default minimum valuemaxRange
- maximum default maximum value
IllegalArgumentException
- if the specified configName is invalid
IllegalArgumentException
- if the specified range is invalidMethod Detail |
---|
public double getMinRange()
public double getMaxRange()
void setRange(double newMin, double newMax) throws IllegalArgumentException
newMin
- the new min valuenewMax
- the new max value
IllegalArgumentException
- if the min is larger than the max or
those numbers are not really numbers (NaN).void setMinRange(double minRange) throws IllegalArgumentException
minRange
- the new min vale of the range
IllegalArgumentException
- if the new min is larger than the
current maxsetRange(double, double)
void setMaxRange(double maxRange) throws IllegalArgumentException
maxRange
- the new max value of the range
IllegalArgumentException
- if the current min is larger than the
new maxsetRange(double, double)
protected SettingsModelDoubleRange 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.public String toString()
toString
in class SettingsModel
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 |