|
||||||||||
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 Port
s. These Port
s are divided into input Port
s, positioned to the
left of the node; repository Port
s, positioned to the right of the node; and output ports
that are positioned below repository Port
s. Any of these Port
s are optional.
If the Node
has no Port
s, KIELER will generate it's own Port
s, 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 Port s to the node. |
void |
addOutputPorts(Graph graph,
int portStartY,
int portCount)
Creates a set of output Port s to the node. |
void |
addRepositoryPorts(Graph graph,
int portStartY,
int portCount)
Creates a set of repository Port s 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 existsMethod Detail |
---|
public void addInputPorts(Graph graph, int portStartY, int portCount)
Port
s to the node.
graph
- the graph that contains the nodeportStartY
- the y-coordinate of the first Port
, relative to the top border of the Node
portCount
- the number of ports that are addedpublic void addRepositoryPorts(Graph graph, int portStartY, int portCount)
Port
s to the node.
graph
- the graph that contains the nodeportStartY
- the y-coordinate of the first Port
, relative to the top border of the Node
portCount
- the number of ports that are addedpublic void addOutputPorts(Graph graph, int portStartY, int portCount)
Port
s to the node.
graph
- the graph that contains the nodeportStartY
- the y-coordinate of the first Port
, relative to the top border of the Node
portCount
- the number of ports that are addedpublic Port getPort(int portIndex)
Port
, progress through input Port
s, then repository Port
s and
finally through outputPort
s.
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 Node
h
- the new height of the Node
public int getWidth()
Node
public int getHeight()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |