|
||||||||||
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.SettingsModelFilterString
public class SettingsModelFilterString
Implements a settings model that provides include and exclude lists. These lists contain strings. It's currently used e.g. in the column filter component and provides the list of column names to include and exclude.
Constructor Summary | |
---|---|
SettingsModelFilterString(String configName)
Constructs a new model with initially empty include and exclude lists. |
|
SettingsModelFilterString(String configName,
Collection<String> defaultInclList,
Collection<String> defaultExclList)
Creates a new object holding a list of strings in an exclude list and a list of strings in an include list.. |
|
SettingsModelFilterString(String configName,
Collection<String> defaultInclList,
Collection<String> defaultExclList,
boolean keepAll)
Creates a new object holding a list of strings in an exclude list and a list of strings in an include list.. |
|
SettingsModelFilterString(String configName,
String[] defaultInclList,
String[] defaultExclList)
Creates a new object holding a list of strings in an exclude list and a list of strings in an include list.. |
|
SettingsModelFilterString(String configName,
String[] defaultInclList,
String[] defaultExclList,
boolean keepAll)
Creates a new object holding a list of strings in an exclude list and a list of strings in an include list. |
Method Summary | |
---|---|
protected SettingsModelFilterString |
createClone()
|
protected String |
getConfigName()
|
List<String> |
getExcludeList()
|
List<String> |
getIncludeList()
|
protected String |
getModelTypeID()
Each settings model provides an ID which will be stored with its values. |
boolean |
isKeepAllSelected()
Returns the status of the keep-all columns selection box. |
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 |
setExcludeList(Collection<String> newValue)
set the value of the stored exclude list. |
void |
setExcludeList(String[] newValue)
set the value of the stored exclude list. |
void |
setIncludeList(Collection<String> newValue)
set the value of the stored include list. |
void |
setIncludeList(String[] newValue)
set the value of the stored include list. |
void |
setKeepAllSelected(boolean selected)
Set a new keep all selection state. |
void |
setNewValues(Collection<String> incl,
Collection<String> excl,
boolean keepAll)
|
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 SettingsModelFilterString(String configName, Collection<String> defaultInclList, Collection<String> defaultExclList)
configName
- the identifier the values are stored with in the
NodeSettings
objectdefaultInclList
- the initial value for the include listdefaultExclList
- the initial value for the exclude list.public SettingsModelFilterString(String configName, Collection<String> defaultInclList, Collection<String> defaultExclList, boolean keepAll)
configName
- the identifier the values are stored with in the
NodeSettings
objectdefaultInclList
- the initial value for the include listdefaultExclList
- the initial value for the exclude list.keepAll
- true, if all column should be kept selectedpublic SettingsModelFilterString(String configName, String[] defaultInclList, String[] defaultExclList)
configName
- the identifier the values are stored with in the
NodeSettings
objectdefaultInclList
- the initial value for the include listdefaultExclList
- the initial value for the exclude list.public SettingsModelFilterString(String configName, String[] defaultInclList, String[] defaultExclList, boolean keepAll)
configName
- the identifier the values are stored within the
NodeSettings
objectdefaultInclList
- the initial value for the include listdefaultExclList
- the initial value for the exclude list.keepAll
- true, if all column should be kept selectedpublic SettingsModelFilterString(String configName)
configName
- the identifier the values are stored with in the
NodeSettings
objectMethod Detail |
---|
public boolean isKeepAllSelected()
public void setKeepAllSelected(boolean selected)
selected
- if keep all box is selected or notprotected SettingsModelFilterString createClone()
createClone
in class SettingsModel
protected String getModelTypeID()
getModelTypeID
in class SettingsModel
protected String getConfigName()
getConfigName
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 saveSettingsForDialog(NodeSettingsWO settings) throws InvalidSettingsException
saveSettingsForDialog
in class SettingsModel
settings
- The NodeSettings
to read
from.
InvalidSettingsException
- if the user has entered wrong values.public void setIncludeList(String[] newValue)
newValue
- the new value to store as include list.public void setIncludeList(Collection<String> newValue)
newValue
- the new value to store as include list. Can't be null.public final void setNewValues(Collection<String> incl, Collection<String> excl, boolean keepAll)
public List<String> getIncludeList()
public void setExcludeList(String[] newValue)
newValue
- the new value to store as exclude list.public void setExcludeList(Collection<String> newValue)
newValue
- the new value to store as exclude list. Can't be null.public List<String> getExcludeList()
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.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.public String toString()
toString
in class SettingsModel
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |