|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.tree.DefaultTreeModel
org.knime.core.node.config.ConfigEditTreeModel
public final class ConfigEditTreeModel
Config editor that keeps a mask of variables to overwrite existing settings. This class is used to modify node settings with values assigned from flow variables. It also keeps a list of "exposed variables", that is each individual setting can be exported as a new variable.
This class is not meant to be used anywhere else than in the KNIME framework classes.
| Nested Class Summary | |
|---|---|
static class |
ConfigEditTreeModel.ConfigEditTreeNode
Single Tree node implementation. |
| Field Summary |
|---|
| Fields inherited from class javax.swing.tree.DefaultTreeModel |
|---|
asksAllowsChildren, listenerList, root |
| Method Summary | |
|---|---|
void |
addConfigEditTreeEventListener(ConfigEditTreeEventListener listener)
Adds new listener. |
static ConfigEditTreeModel |
create(ConfigBase settingsTree)
Parses a settings tree and creates an empty mask (for later modification). |
static ConfigEditTreeModel |
create(ConfigBase settingsTree,
ConfigBase variableTree)
Factory method that parses the settings tree and constructs a new object of this class. |
static boolean |
doesTypeAccept(FlowVariable.Type desiredType,
FlowVariable.Type actualType)
Determines whether a flow variable at hand (represented by its actual type) can be converted into a desired type. |
ConfigEditTreeModel.ConfigEditTreeNode |
findChildForKeyPath(String[] keyPath)
Get the child tree node associated with the key path. |
(package private) void |
fireConfigEditTreeEvent(String[] treePath,
String useVariable,
String exposeVariableName)
Fire an event. |
ConfigEditTreeModel.ConfigEditTreeNode |
getRoot()
|
Set<String> |
getVariableControlledParameters()
|
boolean |
hasConfiguration()
|
List<FlowVariable> |
overwriteSettings(Config settingsTree,
Map<String,FlowVariable> variables)
Modifies the first argument to reflect the values of the mask represented by this object. |
void |
removeConfigEditTreeEventListener(ConfigEditTreeEventListener listener)
Removes a registered listener. |
String |
toString()
|
void |
update(Collection<FlowVariableModel> variableModels)
Updates this tree with the settings available in the argument list. |
void |
writeVariablesTo(ConfigBase config)
Write the mask to a config object (for storage in node settings object). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static ConfigEditTreeModel create(ConfigBase settingsTree,
ConfigBase variableTree)
throws InvalidSettingsException
settingsTree - The original settings object.variableTree - The variables mask.
InvalidSettingsException - If setting can't be parsedpublic static ConfigEditTreeModel create(ConfigBase settingsTree)
settingsTree - to be parsed.
public static boolean doesTypeAccept(FlowVariable.Type desiredType,
FlowVariable.Type actualType)
desiredType - The type that is requested.actualType - The actual type.
actualType can be
used to represent a flow variable of type desiredType.public boolean hasConfiguration()
public Set<String> getVariableControlledParameters()
public void writeVariablesTo(ConfigBase config)
config - To save to.
public List<FlowVariable> overwriteSettings(Config settingsTree,
Map<String,FlowVariable> variables)
throws InvalidSettingsException
settingsTree - settings tree to modify (supposed to have
equivalent tree structure)variables - The has of variables-values to apply.
InvalidSettingsException - If reading failspublic ConfigEditTreeModel.ConfigEditTreeNode getRoot()
getRoot in interface TreeModelgetRoot in class DefaultTreeModelpublic ConfigEditTreeModel.ConfigEditTreeNode findChildForKeyPath(String[] keyPath)
keyPath - The path the child.
public void update(Collection<FlowVariableModel> variableModels)
variableModels - The models that were registered at the dialog.public String toString()
toString in class Objectpublic void addConfigEditTreeEventListener(ConfigEditTreeEventListener listener)
listener - to be added.public void removeConfigEditTreeEventListener(ConfigEditTreeEventListener listener)
listener - to be removed.
void fireConfigEditTreeEvent(String[] treePath,
String useVariable,
String exposeVariableName)
treePath - The tree path that has changed.useVariable - The new variable, which overwrites the user settings.exposeVariableName - The variable name to expose.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||