bass.visualisation.graph
Class BassEdge

java.lang.Object
  extended by bass.visualisation.graph.BassGraphElement
      extended by bass.visualisation.graph.BassEdge

public class BassEdge
extends BassGraphElement

A BassEdge is an Object that describe the relation between two nodes. It stores the startNode (Band) and the endNode of a realtionship. Since mySpace only allow undirected graphs (a band/user can only be on another friendlist if that other band/user is on the own list) The Edge itself has a startNode a endNode and a vector who describes the direction of the edge. The Vector is calculated after the Layout algorithm did it's work.

Version:
0.1
Author:
Patrick Mai

Field Summary
private  BassNode end
           
private  BassNode start
           
private  javax.vecmath.Vector3f vector
           
 
Fields inherited from class bass.visualisation.graph.BassGraphElement
id, name, owner
 
Constructor Summary
BassEdge()
          empty constructor
BassEdge(BassNode start, BassNode end)
          Sets up an edge with the start node and the end node.
 
Method Summary
 void delete()
          delete the specific element, removing all references to it.
 BassNode getEnd()
           
 BassNode getStart()
           
 javax.vecmath.Vector3f getVector()
          get the vector of this edge
 void setEnd(BassNode newEnd)
          Sets the endNode to an 'empty' bassedge object
 void setStart(BassNode newStart)
          Sets the startNode to an 'empty' bassedge object
 void setVector(javax.vecmath.Vector3f v)
          Set the vector for this edge to v
 
Methods inherited from class bass.visualisation.graph.BassGraphElement
getID, getName, getOwner, setID, setName, setOwner
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

start

private BassNode start

end

private BassNode end

vector

private javax.vecmath.Vector3f vector
Constructor Detail

BassEdge

public BassEdge()
empty constructor


BassEdge

public BassEdge(BassNode start,
                BassNode end)
Sets up an edge with the start node and the end node. Calls the setStart, setEnd methods. Those will add the edge to the node's internal edgelist

Parameters:
start -
end -
Method Detail

delete

public void delete()
Description copied from class: BassGraphElement
delete the specific element, removing all references to it. That is forever and can't be undone!

Specified by:
delete in class BassGraphElement

setStart

public void setStart(BassNode newStart)
Sets the startNode to an 'empty' bassedge object

Parameters:
newStart -

setEnd

public void setEnd(BassNode newEnd)
Sets the endNode to an 'empty' bassedge object

Parameters:
newEnd -

getStart

public BassNode getStart()
Returns:
the start node for this edge

getEnd

public BassNode getEnd()
Returns:
the end node for this edge

setVector

public void setVector(javax.vecmath.Vector3f v)
Set the vector for this edge to v

Parameters:
v -

getVector

public javax.vecmath.Vector3f getVector()
get the vector of this edge

Returns:
the vector of this edge