public class SettingsModelDuration extends SettingsModel
CFGKEY_INTERNAL
Constructor and Description |
---|
SettingsModelDuration(String configName)
Creates a new object holding with default values 0 days, 0 hours, 0 minutes, 0 seconds
|
SettingsModelDuration(String configName,
Duration duration)
Create a new object with the given values for days, hours, minutes, seconds
|
Modifier and Type | Method and Description |
---|---|
protected SettingsModelDuration |
createClone() |
protected String |
getConfigName() |
Duration |
getDuration()
Returns the total duration
|
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. |
void |
setDuration(Duration duration) |
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.)
|
addChangeListener, createCloneWithValidatedValue, dlgLoadSettingsFrom, dlgSaveSettingsTo, isEnabled, loadSettingsFrom, notifyChangeListeners, prependChangeListener, removeChangeListener, saveSettingsTo, setEnabled, validateSettings
public SettingsModelDuration(String configName)
configName
- the identifier the value is stored with in the NodeSettings
objectpublic SettingsModelDuration(String configName, Duration duration)
configName
- the identifier the value is stored with in the org.knime.core.node NodeSettings
objectduration
- The initial duration valueprotected SettingsModelDuration createClone()
createClone
in class SettingsModel
protected String getModelTypeID()
getModelTypeID
in class SettingsModel
protected String getConfigName()
getConfigName
in class SettingsModel
public Duration getDuration()
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 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 validateSettingsForModel(NodeSettingsRO settings) throws InvalidSettingsException
validateSettingsForModel
in class SettingsModel
settings
- the object to read the value(s) fromInvalidSettingsException
- if the value(s) in the settings object
are invalid.protected void loadSettingsForModel(NodeSettingsRO settings) throws InvalidSettingsException
loadSettingsForModel
in class SettingsModel
settings
- The NodeSettings
to read
from.InvalidSettingsException
- if load fails.protected void saveSettingsForModel(NodeSettingsWO settings)
saveSettingsForModel
in class SettingsModel
settings
- The NodeSettings
to write
into.public String toString()
toString
in class SettingsModel
public void setDuration(Duration duration)
duration
-
KNIME GmbH, Konstanz, Germany
You may not modify, publish, transmit, transfer or sell, reproduce, create derivative works from, distribute, perform, display, or in any way exploit any of the content, in whole or in part, except as otherwise expressly permitted in writing by the copyright owner or as specified in the license file distributed with this product.