|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.wilmascope.graph.GraphElement
org.wilmascope.graph.Node
public class Node
Definition of a graph Node or Vertex. Nodes (or Vertices) in the graph may be:
Field Summary |
---|
Fields inherited from class org.wilmascope.graph.GraphElement |
---|
layout, owner, view, visible |
Constructor Summary | |
---|---|
Node()
|
|
Node(NodeView view)
|
Method Summary | |
---|---|
void |
addEdge(Edge edge)
add an edge to the node's list of edges to which it is connected |
void |
delete()
delete the node forever, removing all references to it and all edges that are attached to it |
Cluster |
getCommonAncestor(Node node)
return the common ancestor cluster of this node and the argument, ie recurse up the heirarchy of clusters until we meet a cluster to which both nodes are members or sub-members |
EdgeList |
getCommonEdges(Node node)
return a list of edges common to this node and the argument |
int |
getDegree()
|
EdgeList |
getEdges()
|
int |
getInDegree()
|
EdgeList |
getInEdges()
|
NodeLayout |
getLayout()
get the layout properties of the node |
float |
getMass()
get the mass of this node |
java.util.ArrayList<Node> |
getNeighbours()
|
int |
getOutDegree()
|
EdgeList |
getOutEdges()
|
javax.vecmath.Point3f |
getPosition()
get the position of the node in space |
java.util.Properties |
getProperties()
Any properties loaded or saved in files con be stored in a Properties object. |
NodeView |
getView()
get the view representing the node |
boolean |
isNeighbour(Node node)
Checks if there is an edge between this node and the argument |
protected void |
removeEdge(Edge edge)
remove a reference to an edge from this node |
void |
reposition(javax.vecmath.Vector3f delta)
adjust the node's position by delta |
void |
setEdges(EdgeList edges)
set the edges by which this node is connected to other nodes copies the values in to preserve external references to the original list |
void |
setLayout(NodeLayout layout)
set the layout properties of the node |
void |
setMass(float mass)
set the Mass of this node |
void |
setPosition(javax.vecmath.Point3f newPosition)
set the position of the node in space |
void |
setProperties(java.util.Properties p)
|
void |
setView(NodeView view)
set the view representing all visual aspects of the node and make the node visible |
Methods inherited from class org.wilmascope.graph.GraphElement |
---|
draw, getOwner, getUserData, hide, isVisible, setOwner, show, storeUserData |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Node()
public Node(NodeView view)
Method Detail |
---|
public void addEdge(Edge edge)
protected void removeEdge(Edge edge)
public Cluster getCommonAncestor(Node node)
public EdgeList getCommonEdges(Node node)
public void delete()
delete
in class GraphElement
public EdgeList getEdges()
public EdgeList getInEdges()
public EdgeList getOutEdges()
public void setEdges(EdgeList edges)
public void setView(NodeView view)
public NodeView getView()
public void setLayout(NodeLayout layout)
public NodeLayout getLayout()
public void setPosition(javax.vecmath.Point3f newPosition)
public void reposition(javax.vecmath.Vector3f delta)
delta
- the adjustment to make to the node's positionpublic javax.vecmath.Point3f getPosition()
public void setMass(float mass)
public float getMass()
public int getDegree()
public int getOutDegree()
public int getInDegree()
public java.util.Properties getProperties()
GraphElement
getProperties
in class GraphElement
public void setProperties(java.util.Properties p)
setProperties
in class GraphElement
public boolean isNeighbour(Node node)
node
- possible neighbour of this node
public java.util.ArrayList<Node> getNeighbours()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |