webmngr.web
Class MapPoint

java.lang.Object
  |
  +--webmngr.web.MapPoint

public class MapPoint
extends java.lang.Object

This class is used to manipulate points on the map with float coordinates


Field Summary
 float x
           
 float y
           
 
Constructor Summary
MapPoint()
          Default Constructor
MapPoint(float x, float y)
          Constructor
MapPoint(MapPoint mp)
          Constructor
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compares an object with this MapPoint
 MapPoint getLocation()
          Returns this MapPoint location
 float getX()
          Gets the X coordinate of this MapPoint
 float getY()
          Gets the Y coordinate of this MapPoint
static java.awt.Point pixelValue(MapPoint percent, java.awt.Dimension base)
          Returns a Pixel Value of percentual position, based on a base dimension
 void setX(float x)
          Sets the X coordinate of this MapPoint
 void setY(float y)
          Sets the Y coordinate of this MapPoint
 java.lang.String toString()
          Returns a string representing this MapPoint
static MapPoint valueOf(java.awt.Point p, java.awt.Dimension d)
          Returns the MapPoint value of a Point p with dimension d
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

x

public float x

y

public float y
Constructor Detail

MapPoint

public MapPoint()
Default Constructor

MapPoint

public MapPoint(MapPoint mp)
Constructor
Parameters:
mp - a MapPoint whose x and y coordinates will be used to initialize this mapPoint coordinates

MapPoint

public MapPoint(float x,
                float y)
Constructor
Parameters:
x - the x coordinate
y - the y coordinate
Method Detail

getX

public float getX()
Gets the X coordinate of this MapPoint
Returns:
the x coordinate of this MapPoint

getY

public float getY()
Gets the Y coordinate of this MapPoint
Returns:
the y coordinate of this MapPoint

getLocation

public MapPoint getLocation()
Returns this MapPoint location
Returns:
this object

equals

public boolean equals(java.lang.Object obj)
Compares an object with this MapPoint
Overrides:
equals in class java.lang.Object
Parameters:
obj - Object to be compared
Returns:
true if obj is equal to this and false otherwise

toString

public java.lang.String toString()
Returns a string representing this MapPoint
Overrides:
toString in class java.lang.Object
Returns:
this MapPoint string representation

valueOf

public static MapPoint valueOf(java.awt.Point p,
                               java.awt.Dimension d)
Returns the MapPoint value of a Point p with dimension d
Returns:
MapPoint that represents the point given as paramether

pixelValue

public static java.awt.Point pixelValue(MapPoint percent,
                                        java.awt.Dimension base)
Returns a Pixel Value of percentual position, based on a base dimension
Parameters:
percent - percentual position
base - Pixel based dimension

setX

public void setX(float x)
Sets the X coordinate of this MapPoint
Parameters:
the - x coordinate value

setY

public void setY(float y)
Sets the Y coordinate of this MapPoint
Parameters:
the - y coordinate value