framework
Class POIObject

java.lang.Object
  extended by framework.POIObject

public class POIObject
extends java.lang.Object

POIObject.java

Contains all POI information.

A POI is selectable by default. Use setNotSelectable() if the POI is not supposed to be selectable.

This is originally POIObject.java in no.tellu.commonplatform.serviceframe.common.map, Methods for finding x and y coordinates to a POI in a map, variables 'id', 'selected', 'info', and 'selectable' have been added and the variables 'longitude' and 'latitude' have been changed to 'easting' and 'northing'. Redundant code from no.tellu.commonplatform.serviceframe.common.map.POIObject has been removed from this file.


Constructor Summary
POIObject(java.lang.String easting, java.lang.String northing, java.lang.String id, POIInformation info)
          Constructor POIObject
 
Method Summary
 java.lang.String getEasting()
           
 java.lang.String getId()
           
 POIInformation getInfo()
          Gets the POI information not coordinate related.
 java.lang.String getNorthing()
           
 java.lang.String getPoiImage()
           
 int getXCoordinate(int startX, int width, no.tellu.commonplatform.serviceframe.common.map.MapBoundingBox mbb)
          Finds the x coordinate of a POI within a given area
 int getYCoordinate(int startY, int height, no.tellu.commonplatform.serviceframe.common.map.MapBoundingBox mbb)
          Finds the y coordinate of a POI within a given area
 boolean isSelectable()
           
 boolean isSelected()
           
 void setEasting(java.lang.String easting)
          Sets the easting coordinate of the POI.
 void setId(java.lang.String id)
          Sets the ID of the POI.
 void setInfo(POIInformation info)
          Sets the POI information not coordinate related.
 void setNorthing(java.lang.String northing)
          Sets the northing coordinate of the POI.
 void setNotSelectable()
          Sets the POI to not be possible to select.
 void setPoiImage(java.lang.String poiImage)
          Sets the POI icon.
 void setSelected(boolean selected)
          Sets the POI to be selected or unselects it.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

POIObject

public POIObject(java.lang.String easting,
                 java.lang.String northing,
                 java.lang.String id,
                 POIInformation info)
Constructor POIObject

Parameters:
easting - The easting coordinate
northing - The northing coordinate
id - ID of the POI
info - A POIInformation object containing general location information not related to coordinates
Method Detail

getEasting

public java.lang.String getEasting()
Returns:
the easting coordinate of the POI

setEasting

public void setEasting(java.lang.String easting)
Sets the easting coordinate of the POI.

Parameters:
easting - the easting coordinate of the POI

getNorthing

public java.lang.String getNorthing()
Returns:
the northing coordinate of the POI

setNorthing

public void setNorthing(java.lang.String northing)
Sets the northing coordinate of the POI.

Parameters:
northing - the northing coordinate of the POI

getInfo

public POIInformation getInfo()
Gets the POI information not coordinate related.

Returns:
information about the POI not coordinate related

setInfo

public void setInfo(POIInformation info)
Sets the POI information not coordinate related.

Parameters:
info - the object with POI information

getPoiImage

public java.lang.String getPoiImage()
Returns:
the POI icon

setPoiImage

public void setPoiImage(java.lang.String poiImage)
Sets the POI icon.

Parameters:
poiImage - the icon ofthe POI

setSelected

public void setSelected(boolean selected)
Sets the POI to be selected or unselects it.

Parameters:
selected - true if the POI shoud be selected, false if not

isSelected

public boolean isSelected()
Returns:
true if the POI is selected, false if not

setNotSelectable

public void setNotSelectable()
Sets the POI to not be possible to select.


isSelectable

public boolean isSelectable()
Returns:
true if the POI is selectable, false if not

getXCoordinate

public int getXCoordinate(int startX,
                          int width,
                          no.tellu.commonplatform.serviceframe.common.map.MapBoundingBox mbb)
Finds the x coordinate of a POI within a given area

Parameters:
startX - The area's leftmost x coordinate
width - The width of the area
mbb - The area's coordinates
Returns:
The x coordinate

getYCoordinate

public int getYCoordinate(int startY,
                          int height,
                          no.tellu.commonplatform.serviceframe.common.map.MapBoundingBox mbb)
Finds the y coordinate of a POI within a given area

Parameters:
startY - The area's upper coordinate
height - The area's height
mbb - The area's coordinates
Returns:
The y coordinate

getId

public java.lang.String getId()
Returns:
the ID of the POI

setId

public void setId(java.lang.String id)
Sets the ID of the POI.

Parameters:
id - the ID of the POI