main
Class DrawableNode

java.lang.Object
  extended by main.DrawableMapComponent
      extended by main.DrawableNode

public class DrawableNode
extends DrawableMapComponent

The DrawableNode class represents one node between nodes on the PlanetLab network and specifies how it will be drawn on a map.

See Also:
DrawableEdge

Field Summary
private  City city
           
private  java.lang.Integer id
           
private  java.awt.Point point
           
 
Constructor Summary
DrawableNode(java.lang.Integer id, java.awt.Point point, java.awt.Color color, int size)
          Creates a new DrawableNode with the arguments.
DrawableNode(java.lang.Integer id, java.awt.Point point, java.awt.Color color, int size, City city)
          Creates a new DrawableNode with the arguments.
 
Method Summary
 City getCity()
          Returns the location of the node.
 java.lang.Integer getID()
          Returns the id of the node.
 java.awt.Point getPoint()
          Returns the pixel-coordinate point of the node.
 java.lang.String toString()
          Returns a string representation of this DrawableNode.
 
Methods inherited from class main.DrawableMapComponent
getColor, getSize, setColor, setSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

point

private java.awt.Point point

id

private java.lang.Integer id

city

private City city
Constructor Detail

DrawableNode

public DrawableNode(java.lang.Integer id,
                    java.awt.Point point,
                    java.awt.Color color,
                    int size)
Creates a new DrawableNode with the arguments.

Parameters:
id - an Integer representing the node's id
point - a Point representing the pixel coordinates of the node
color - a Color representing the color of the node
size - an int representing the size of the node

DrawableNode

public DrawableNode(java.lang.Integer id,
                    java.awt.Point point,
                    java.awt.Color color,
                    int size,
                    City city)
Creates a new DrawableNode with the arguments.

Parameters:
id - an Integer representing the node's id
point - a Point representing the pixel coordinates of the node
color - a Color representing the color of the node
size - an int representing the size of the node
city - a City representing the location of the node
Method Detail

getPoint

public java.awt.Point getPoint()
Returns the pixel-coordinate point of the node.

Returns:
the point

getID

public java.lang.Integer getID()
Returns the id of the node.

Returns:
the node id

getCity

public City getCity()
Returns the location of the node.

Returns:
the node's city

toString

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

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