|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gicentre.utils.network.Node
public class Node
Represents a node in a network graph structure. This class has a default drawing behaviour, but by inheriting it and overriding its draw() method, visual appearance of the node can be customised.
Constructor Summary | |
---|---|
Node(float x,
float y)
Creates a node with the given location. |
Method Summary | |
---|---|
void |
draw(processing.core.PApplet applet,
float px,
float py)
Draws the node in the given Processing applet. |
java.util.HashSet<Edge> |
getInEdges()
Reports a list of all incoming edges attached to this node. |
processing.core.PVector |
getLocation()
Reports the node's location. |
java.util.HashSet<Edge> |
getOutEdges()
Reports a list of all outgoing edges attached to this node. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Node(float x, float y)
x
- x-coordinate of the node's location.y
- y-coordinate of the node's location.Method Detail |
---|
public void draw(processing.core.PApplet applet, float px, float py)
applet
- Processing sketch in which to draw this node.px
- x-coordinate of this node's graphical position.py
- y-coordinate of this node's graphical position.public processing.core.PVector getLocation()
public java.util.HashSet<Edge> getInEdges()
public java.util.HashSet<Edge> getOutEdges()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |