public class Node
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
java.lang.String |
caption
caption of the node (if it has none:
null ) |
java.util.ArrayList<Edge> |
edges
list of all (outgoing) edges
|
int |
fillColor |
java.lang.Boolean |
fixCaption
allow the user to change the caption of the nodes during runtime
if this value is null , this property is copied from the parent Graph object |
java.lang.Boolean |
fixColor
allow the user to change the color of the nodes during runtime
if this value is null , this property is copied from the parent Graph object |
java.lang.Boolean |
fixPosition
allow the user to move the nodes during runtime
if this value is null , this property is copied from the parent Graph object |
java.lang.Boolean |
fixSize
allow the user to change the size of the nodes during runtime
if this value is null , this property is copied from the parent Graph object |
processing.core.PVector |
pos
position of the node
|
float |
radius
radius of the node
|
float |
range
range in which the node affects other nodes (collision, ...)
|
java.lang.Boolean |
shaded
shaded or filled
if this value is null , this property is copied from the parent Graph object |
int |
shadedAlpha |
float |
shadedStroke |
java.lang.Boolean |
showCaption
visibility of the node caption
if this value is null , this property is copied from the parent Graph object |
java.lang.Boolean |
showIcon
visibility of the node icon (PShape)
if this value is null , this property is copied from the parent Graph object |
Constructor and Description |
---|
Node(float xx,
float yy)
create Node
|
Node(float xx,
float yy,
float rr,
float ra,
int cc)
create Node
|
Node(float xx,
float yy,
int cc)
create Node
|
Node(Graph bb)
create Node
|
Node(Graph bb,
float sz,
float rr)
create Node
|
Node(Graph bb,
float xx,
float yy,
float sz,
float rr,
int cc)
create Node
|
Node(Graph bb,
float sz,
float rr,
int cc)
create Node
|
Modifier and Type | Method and Description |
---|---|
Edge |
addEdge(Node nn,
float vv)
add an edge to another node
|
Edge |
addEdge(Node nn,
float vv,
int cc)
add an edge to another node
|
Edge |
addEdge(java.lang.String nn,
float lk,
int cc)
add an edge to another node
|
java.lang.String |
addProperty(java.lang.String key,
java.lang.String value) |
java.lang.Object |
addReference(java.lang.String key,
java.lang.Object value) |
Node |
enableColorPicker(boolean bool) |
int |
getColor() |
float |
getColorAngle(float aa) |
Edge |
getEdge(int i) |
Graph |
getGraph() |
processing.core.PVector |
getPosition()
get the current position of the node
|
processing.core.PVector |
getPosition(boolean listV)
get the position of node
|
float |
getRadius()
get the radius of the node (= the displayed radius)
|
float |
getRange()
get the range of the node (= the collision radius)
|
processing.core.PShape |
getShape() |
boolean |
hasProperty(java.lang.String key) |
boolean |
hasReference(java.lang.String key) |
void |
keyEvent(java.awt.event.KeyEvent event) |
void |
loadSVG(java.lang.String filename) |
void |
mouseEvent(processing.event.MouseEvent event) |
Node |
move(boolean relative,
float xx,
float yy) |
Node |
move(float xx,
float yy) |
java.lang.String |
removeProperty(java.lang.String key) |
java.lang.Object |
removeReference(java.lang.String key) |
void |
setColorAngle(float aa) |
Node |
setPosition(boolean relative,
float xx,
float yy) |
Node |
setPosition(float xx,
float yy) |
Node |
setRadius(float ss)
set the radius of the node (= the displayed radius)
|
Node |
setRange(float rr)
set the range of the node (= the collision radius)
|
public java.util.ArrayList<Edge> edges
public float radius
public float range
public processing.core.PVector pos
public java.lang.String caption
null
)public java.lang.Boolean fixSize
null
, this property is copied from the parent Graph
objectpublic java.lang.Boolean fixColor
null
, this property is copied from the parent Graph
objectpublic java.lang.Boolean fixPosition
null
, this property is copied from the parent Graph
objectpublic java.lang.Boolean fixCaption
null
, this property is copied from the parent Graph
objectpublic java.lang.Boolean showCaption
null
, this property is copied from the parent Graph
objectpublic java.lang.Boolean showIcon
null
, this property is copied from the parent Graph
objectpublic java.lang.Boolean shaded
null
, this property is copied from the parent Graph
objectpublic int fillColor
public float shadedStroke
public int shadedAlpha
public Node(Graph bb)
public Node(Graph bb, float sz, float rr)
public Node(Graph bb, float sz, float rr, int cc)
public Node(Graph bb, float xx, float yy, float sz, float rr, int cc)
public Node(float xx, float yy, float rr, float ra, int cc)
float
- xx, yy: position of the nodefloat
- rr: (display) radius of the nodefloat
- ra: (collision) range of the nodeint
- cc: color of the nodepublic Node(float xx, float yy, int cc)
float
- xx, yy: position of the nodeint
- cc: color of the nodepublic Node(float xx, float yy)
float
- xx, yy: position of the nodepublic void setColorAngle(float aa)
public void loadSVG(java.lang.String filename)
public Graph getGraph()
public float getColorAngle(float aa)
public Edge addEdge(Node nn, float vv)
Node
- nn: target nodefloat
- vv: edge weightpublic Edge addEdge(Node nn, float vv, int cc)
Node
- nn: target nodefloat
- vv: edge weightint
- cc: edge colorpublic Edge addEdge(java.lang.String nn, float lk, int cc)
String
- nn: name of the target nodefloat
- vv: edge weightint
- cc: edge colorpublic java.lang.String addProperty(java.lang.String key, java.lang.String value)
public java.lang.String removeProperty(java.lang.String key)
public boolean hasProperty(java.lang.String key)
public java.lang.Object addReference(java.lang.String key, java.lang.Object value)
public java.lang.Object removeReference(java.lang.String key)
public boolean hasReference(java.lang.String key)
public Edge getEdge(int i)
public processing.core.PVector getPosition()
public int getColor()
public processing.core.PVector getPosition(boolean listV)
public float getRadius()
public float getRange()
public Node setRadius(float ss)
public Node setRange(float rr)
public processing.core.PShape getShape()
public Node setPosition(float xx, float yy)
public Node setPosition(boolean relative, float xx, float yy)
public Node move(float xx, float yy)
public Node move(boolean relative, float xx, float yy)
public void keyEvent(java.awt.event.KeyEvent event)
public void mouseEvent(processing.event.MouseEvent event)
public Node enableColorPicker(boolean bool)