|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectkieker.webgui.service.impl.utility.model.Node
public class Node
Objects of this class represent nodes within a Graph, that may or may not have any number
of Ports. These Ports are divided into input Ports, positioned to the
left of the node; repository Ports, positioned to the right of the node; and output ports
that are positioned below repository Ports. Any of these Ports are optional.
If the Node has no Ports, KIELER will generate it's own Ports, where it sees
fit.
| Constructor Summary | |
|---|---|
Node(Graph graph,
String id,
int width,
int height,
boolean hasPorts)
Class constructor. |
|
| Method Summary | |
|---|---|
void |
addInputPorts(Graph graph,
int portStartY,
int portCount)
Creates a set of input Ports to the node. |
void |
addOutputPorts(Graph graph,
int portStartY,
int portCount)
Creates a set of output Ports to the node. |
void |
addRepositoryPorts(Graph graph,
int portStartY,
int portCount)
Creates a set of repository Ports to the node. |
int |
getHeight()
|
String |
getId()
|
List<Port> |
getInputPorts()
|
de.cau.cs.kieler.core.kgraph.KNode |
getKielerNode()
|
List<Port> |
getOutputPorts()
|
Port |
getPort(int portIndex)
Looks for a port with the specified index. |
Point |
getPosition()
|
List<Port> |
getRepoPorts()
|
int |
getWidth()
|
boolean |
isNodeFamily()
|
void |
setDimensions(int w,
int h)
Resizes the Node. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Node(Graph graph,
String id,
int width,
int height,
boolean hasPorts)
Node and assigns a generated KNode to the graph.
graph - the graph that contains the nodeid - a unique string representing the nodewidth - the width of the nodeheight - the height of the nodehasPorts - true if at least one port exists| Method Detail |
|---|
public void addInputPorts(Graph graph,
int portStartY,
int portCount)
Ports to the node.
graph - the graph that contains the nodeportStartY - the y-coordinate of the first Port, relative to the top border of the NodeportCount - the number of ports that are added
public void addRepositoryPorts(Graph graph,
int portStartY,
int portCount)
Ports to the node.
graph - the graph that contains the nodeportStartY - the y-coordinate of the first Port, relative to the top border of the NodeportCount - the number of ports that are added
public void addOutputPorts(Graph graph,
int portStartY,
int portCount)
Ports to the node.
graph - the graph that contains the nodeportStartY - the y-coordinate of the first Port, relative to the top border of the NodeportCount - the number of ports that are addedpublic Port getPort(int portIndex)
Port, progress through input Ports, then repository Ports and
finally through outputPorts.
portIndex - the index of the Port
Port with the specified index if it exists or null if it does notpublic de.cau.cs.kieler.core.kgraph.KNode getKielerNode()
public String getId()
public boolean isNodeFamily()
public List<Port> getInputPorts()
public List<Port> getRepoPorts()
public List<Port> getOutputPorts()
public Point getPosition()
public void setDimensions(int w,
int h)
Node.
w - the new width of the Nodeh - the new height of the Nodepublic int getWidth()
Nodepublic int getHeight()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||