main
Class Edge
java.lang.Object
main.MapComponent
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
Constructor Summary |
Edge(Position position1,
Position position2,
java.lang.Double weightColor,
java.lang.Double weightSize)
Creates a new Edge with the arguments. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
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
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 nodeposition2
- the Position
of the other nodeweightColor
- a Double
that contains the value to be
attributed to the node's colorweightSize
- a Double
that contains the value to be
attributed to the node's size
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)