org.knime.core.node
Class FlowVariableModel

java.lang.Object
  extended by org.knime.core.node.FlowVariableModel

public class FlowVariableModel
extends Object

Container holding information regarding variables which represent settings of a node and/or are used to replace settings of a node. This allows NodeDialogPane implementations to encapsulate all of the information related to variable/settings replacements.

Author:
Michael Berthold, University of Konstanz

Constructor Summary
FlowVariableModel(NodeDialogPane parent, String[] keys, FlowVariable.Type type)
          Create a new WVM object.
 
Method Summary
 void addChangeListener(ChangeListener l)
          Adds a listener which is notified whenever a new value is set in the model.
 String getInputVariableName()
           
 String[] getKeys()
           
(package private)  FlowVariable[] getMatchingVariables()
           
 String getOutputVariableName()
           
(package private)  NodeDialogPane getParent()
           
 FlowVariable.Type getType()
           
 boolean isVariableReplacementEnabled()
           
protected  void notifyChangeListeners()
          Notifies all registered listeners about a new model content.
 void removeChangeListener(ChangeListener l)
          Remove a specific listener.
 void setInputVariableName(String variableName)
           
 void setOutputVariableName(String variableName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlowVariableModel

FlowVariableModel(NodeDialogPane parent,
                  String[] keys,
                  FlowVariable.Type type)
Create a new WVM object.

Parameters:
parent - NodeDialogPane (needed to retrieve visible variables)
keys - of corresponding settings object
type - of variable/settings object
Method Detail

getParent

NodeDialogPane getParent()
Returns:
parent NodeDialogPane

getKeys

public String[] getKeys()
Returns:
the key of the corresponding setting object.

getType

public FlowVariable.Type getType()
Returns:
the type of the variable/settings object.

getInputVariableName

public String getInputVariableName()
Returns:
the inputVariableName

setInputVariableName

public void setInputVariableName(String variableName)
Parameters:
variableName - the inputVariableName to set. Set to null if no replacement is wanted.

isVariableReplacementEnabled

public boolean isVariableReplacementEnabled()
Returns:
true if variable replacement is activated.

getOutputVariableName

public String getOutputVariableName()
Returns:
the outputVariableName

setOutputVariableName

public void setOutputVariableName(String variableName)
Parameters:
variableName - the outputVariableName to set. Set to null if no replacement is wanted.

getMatchingVariables

FlowVariable[] getMatchingVariables()
Returns:
array of variables names that match the type of this model.

addChangeListener

public void addChangeListener(ChangeListener l)
Adds a listener which is notified whenever a new value is set in the model. Does nothing if the listener is already registered.

Parameters:
l - listener to add.

removeChangeListener

public void removeChangeListener(ChangeListener l)
Remove a specific listener.

Parameters:
l - listener to remove.

notifyChangeListeners

protected void notifyChangeListeners()
Notifies all registered listeners about a new model content.



Copyright, 2003 - 2010. All rights reserved.
University of Konstanz, Germany.
Chair for Bioinformatics and Information Mining, Prof. Dr. Michael R. Berthold.
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.