main
Class ImageMapCity

java.lang.Object
  extended by main.Position
      extended by main.City
          extended by main.ImageMapCity

public class ImageMapCity
extends City

The ImageMapCity class contains all of the necessary information to plot a city on an image map.


Field Summary
private  java.awt.geom.Ellipse2D.Double circle
           
private  java.lang.Integer id
           
 
Constructor Summary
ImageMapCity(Position cityPos, java.lang.String cityName, int x, int y, java.lang.Integer cityID, int size)
          Constructs a new ImageMapCity with the point and name indicated by the arguments.
 
Method Summary
 boolean cityEquals(City other)
          is other City equal to this one?
 boolean equals(ImageMapCity other)
          is other object equal to this one?
 java.lang.Integer getCityID()
          Returns the city id.
 java.awt.geom.Ellipse2D.Double getCityLocation()
          Returns the location and size of the node at city as an Ellipse2D.Double.
 void setCityID(java.lang.Integer cityID)
          Sets the city id
 java.lang.String toString()
          Returns a string representation of this City.
 
Methods inherited from class main.City
equals, getCityName, setCityName
 
Methods inherited from class main.Position
coordinateDistanceTo, distanceTo, equals, getLatitude, getLongitude, isDefined, setLatitude, setLongitude
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

id

private java.lang.Integer id

circle

private java.awt.geom.Ellipse2D.Double circle
Constructor Detail

ImageMapCity

public ImageMapCity(Position cityPos,
                    java.lang.String cityName,
                    int x,
                    int y,
                    java.lang.Integer cityID,
                    int size)
Constructs a new ImageMapCity with the point and name indicated by the arguments.

Parameters:
cityPos - the position of the city
cityName - a String
x - - the x-coordinate an int
y - - the y-coordinate an int
cityID - - the id of the city an Integer
size - an int
Method Detail

setCityID

public void setCityID(java.lang.Integer cityID)
Sets the city id

Parameters:
cityID - an Integer

getCityID

public java.lang.Integer getCityID()
Returns the city id.

Returns:
the city id

getCityLocation

public java.awt.geom.Ellipse2D.Double getCityLocation()
Returns the location and size of the node at city as an Ellipse2D.Double.

Returns:
the location of the city

toString

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

Overrides:
toString in class City
Returns:
a string representation of this City

cityEquals

public boolean cityEquals(City other)
is other City equal to this one?

Parameters:
other -
Returns:
true if they are equal

equals

public boolean equals(ImageMapCity other)
is other object equal to this one?

Parameters:
other -
Returns:
true if they are equal