public class NodeImp extends java.lang.Object implements NodeListener, Node
Constructor and Description |
---|
NodeImp(Task task,
boolean input)
Creates a node attached to the specified Task.
|
Modifier and Type | Method and Description |
---|---|
void |
addNodeListener(NodeListener listener)
Adds a node listener to this node.
|
void |
connect(Cable cable)
Connect a cable to this node.
|
void |
disconnect()
Disconnect the cable from this node.
|
void |
dispose()
Cleans-up when a node is disposed
|
int |
getAbsoluteNodeIndex()
This is a convience method to provide backward compatibility with TrianaGUI, in which parameter nodes where
indexed after data nodes.
|
Node |
getBottomLevelNode() |
Task |
getBottomLevelTask() |
Cable |
getCable() |
Node |
getChildNode() |
java.lang.String |
getName() |
int |
getNodeIndex() |
Node |
getParentNode() |
Task |
getTask() |
Node |
getTopLevelNode() |
Task |
getTopLevelTask() |
boolean |
isBottomLevelNode() |
boolean |
isConnected() |
boolean |
isDataNode() |
boolean |
isEssential() |
boolean |
isEssentialIfConnected() |
boolean |
isInputNode() |
boolean |
isOptional() |
boolean |
isOutputNode() |
boolean |
isParameterNode() |
boolean |
isTopLevelNode() |
void |
nodeChildChanged(NodeEvent event)
Called when one of a group node's child changes
|
void |
nodeConnected(NodeEvent event)
Called when a node is connected to a cable.
|
void |
nodeDisconnected(NodeEvent event)
Called before a node is diconnected from a cable.
|
void |
nodeParentChanged(NodeEvent event)
Called when one of a group node's parents changes
|
protected void |
notifyChildNodeChanged()
Notifies all the node listeners that a node in the child hierarchy has changed.
|
protected void |
notifyNodeConnected()
Notifies all the node listeners that the node has been connected.
|
protected void |
notifyNodeDisconnected()
Notifies all the node listeners that a the node has been disconnected.
|
protected void |
notifyParameterNameSet()
Notifies all the node listeners that the name of the parameter this node is inputting/outputting has been set.
|
protected void |
notifyParentNodeChanged()
Notifies all the node listeners that a node in the parent hierarchy has changed.
|
void |
parameterNameSet(NodeEvent event)
Called when the name of the parameter the node is inputting/outputting is set.
|
void |
removeNodeListener(NodeListener listener)
Removes a node listener from this node.
|
void |
setChildNode(Node node)
Sets the child group node for this node
|
void |
setParentNode(Node node)
Sets the parent group node for this node
|
java.lang.String |
toString() |
public NodeImp(Task task, boolean input)
public Task getTask()
public void addNodeListener(NodeListener listener)
addNodeListener
in interface Node
public void removeNodeListener(NodeListener listener)
removeNodeListener
in interface Node
public int getNodeIndex()
getNodeIndex
in interface Node
public int getAbsoluteNodeIndex()
getAbsoluteNodeIndex
in interface Node
public void connect(Cable cable)
public void disconnect()
disconnect
in interface Node
public boolean isConnected()
isConnected
in interface Node
public Cable getCable()
public boolean isInputNode()
isInputNode
in interface Node
public boolean isOutputNode()
isOutputNode
in interface Node
public boolean isDataNode()
isDataNode
in interface Node
public boolean isParameterNode()
isParameterNode
in interface Node
public boolean isOptional()
isOptional
in interface Node
public boolean isEssentialIfConnected()
isEssentialIfConnected
in interface Node
public boolean isEssential()
isEssential
in interface Node
public Node getParentNode()
getParentNode
in interface Node
public void setParentNode(Node node)
setParentNode
in interface Node
public Node getChildNode()
getChildNode
in interface Node
public void setChildNode(Node node)
setChildNode
in interface Node
public boolean isTopLevelNode()
isTopLevelNode
in interface Node
public Node getTopLevelNode()
getTopLevelNode
in interface Node
public Task getTopLevelTask()
getTopLevelTask
in interface Node
public boolean isBottomLevelNode()
isBottomLevelNode
in interface Node
public Node getBottomLevelNode()
getBottomLevelNode
in interface Node
public Task getBottomLevelTask()
getBottomLevelTask
in interface Node
protected void notifyNodeConnected()
protected void notifyNodeDisconnected()
protected void notifyParameterNameSet()
protected void notifyParentNodeChanged()
protected void notifyChildNodeChanged()
public void nodeConnected(NodeEvent event)
nodeConnected
in interface NodeListener
public void nodeDisconnected(NodeEvent event)
nodeDisconnected
in interface NodeListener
public void nodeParentChanged(NodeEvent event)
nodeParentChanged
in interface NodeListener
public void nodeChildChanged(NodeEvent event)
nodeChildChanged
in interface NodeListener
public void parameterNameSet(NodeEvent event)
parameterNameSet
in interface NodeListener
public java.lang.String toString()
toString
in class java.lang.Object
public void dispose()