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 Nodepublic void removeNodeListener(NodeListener listener)
removeNodeListener in interface Nodepublic int getNodeIndex()
getNodeIndex in interface Nodepublic int getAbsoluteNodeIndex()
getAbsoluteNodeIndex in interface Nodepublic void connect(Cable cable)
public void disconnect()
disconnect in interface Nodepublic boolean isConnected()
isConnected in interface Nodepublic Cable getCable()
public boolean isInputNode()
isInputNode in interface Nodepublic boolean isOutputNode()
isOutputNode in interface Nodepublic boolean isDataNode()
isDataNode in interface Nodepublic boolean isParameterNode()
isParameterNode in interface Nodepublic boolean isOptional()
isOptional in interface Nodepublic boolean isEssentialIfConnected()
isEssentialIfConnected in interface Nodepublic boolean isEssential()
isEssential in interface Nodepublic Node getParentNode()
getParentNode in interface Nodepublic void setParentNode(Node node)
setParentNode in interface Nodepublic Node getChildNode()
getChildNode in interface Nodepublic void setChildNode(Node node)
setChildNode in interface Nodepublic boolean isTopLevelNode()
isTopLevelNode in interface Nodepublic Node getTopLevelNode()
getTopLevelNode in interface Nodepublic Task getTopLevelTask()
getTopLevelTask in interface Nodepublic boolean isBottomLevelNode()
isBottomLevelNode in interface Nodepublic Node getBottomLevelNode()
getBottomLevelNode in interface Nodepublic Task getBottomLevelTask()
getBottomLevelTask in interface Nodeprotected void notifyNodeConnected()
protected void notifyNodeDisconnected()
protected void notifyParameterNameSet()
protected void notifyParentNodeChanged()
protected void notifyChildNodeChanged()
public void nodeConnected(NodeEvent event)
nodeConnected in interface NodeListenerpublic void nodeDisconnected(NodeEvent event)
nodeDisconnected in interface NodeListenerpublic void nodeParentChanged(NodeEvent event)
nodeParentChanged in interface NodeListenerpublic void nodeChildChanged(NodeEvent event)
nodeChildChanged in interface NodeListenerpublic void parameterNameSet(NodeEvent event)
parameterNameSet in interface NodeListenerpublic java.lang.String toString()
toString in class java.lang.Objectpublic void dispose()