main
Class Edge

java.lang.Object
  extended by main.MapComponent
      extended by main.Edge
All Implemented Interfaces:
java.lang.Cloneable

public class Edge
extends MapComponent

The Edge class represents one edge between nodes on the PlanetLab network. The class contains only positions--enough to place the edge on a map, and values that are attributed to the color and size of the edge on a map.

See Also:
Node

Field Summary
private  java.awt.Color color
           
static java.awt.Color defaultColor
           
private  Position position1
           
private  Position position2
           
private  int size
           
static int sizeSmall
           
 
Constructor Summary
Edge(Position position1, Position position2, java.lang.Double weightColor, java.lang.Double weightSize)
          Creates a new Edge with the arguments.
 
Method Summary
 java.awt.Color getColor()
           
 Position getPosition1()
          Returns the GPS position of one end of the edge.
 Position getPosition2()
          Returns the GPS position of the other end of the edge.
 int getSize()
           
 void setColor(java.awt.Color color)
           
 void setSize(int size)
           
 java.lang.String toString()
          Returns a string representation of this Edge.
 
Methods inherited from class main.MapComponent
clone, getWeightColor, getWeightSize, setWeightColor, setWeightSize
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

position1

private Position position1

position2

private Position position2

color

private java.awt.Color color

size

private int size

defaultColor

public static final java.awt.Color defaultColor

sizeSmall

public static final int sizeSmall
See Also:
Constant Field Values
Constructor Detail

Edge

public Edge(Position position1,
            Position position2,
            java.lang.Double weightColor,
            java.lang.Double weightSize)
Creates a new Edge with the arguments.

Parameters:
position1 - the Position of one connecting node
position2 - the Position of the other node
weightColor - a Double that contains the value to be attributed to the node's color
weightSize - a Double that contains the value to be attributed to the node's size
Method Detail

getPosition1

public Position getPosition1()
Returns the GPS position of one end of the edge.

Returns:
the position

getPosition2

public Position getPosition2()
Returns the GPS position of the other end of the edge.

Returns:
the position

toString

public java.lang.String toString()
Returns a string representation of this Edge. This is for debugging purposes only.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of this Edge

getColor

public java.awt.Color getColor()

setColor

public void setColor(java.awt.Color color)

getSize

public int getSize()

setSize

public void setSize(int size)