com.ls.widgets.map.events
Class MapTouchedEvent

java.lang.Object
  extended by com.ls.widgets.map.events.MapTouchedEvent

public class MapTouchedEvent
extends java.lang.Object

Class Overview

MapTouchedEvent represents the touch event that occurs on the map widget. It contains the position of the touch in map coordinates, screen coordinates and a list of object touch events.


Constructor Summary
MapTouchedEvent()
           
 
Method Summary
 int getMapX()
          Returns the X coordinate of a point where user has touched in your original image coordinates.
 int getMapY()
          Returns the Y coordinate of a point where user has touched in your original image coordinates.
 int getScreenX()
          Returns the X coordinate of a point where user has touched in screen coordinates.
 int getScreenY()
          Returns the Y coordinate of a point where user has touched in screen coordinates.
 java.util.ArrayList<ObjectTouchEvent> getTouchedObjectEvents()
          Returns the list of ObjectTouchEvent objects.
 java.util.ArrayList<ObjectTouchEvent> getTouchedObjectIds()
          Deprecated. Use getTouchedObjectEvents() instead.
 void setMapX(int mapX)
           
 void setMapY(int mapY)
           
 void setScreenX(int screenX)
           
 void setScreenY(int screenY)
           
 void setTouchedObjectEvents(java.util.ArrayList<ObjectTouchEvent> touchedObjectIds)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapTouchedEvent

public MapTouchedEvent()
Method Detail

getScreenX

public int getScreenX()
Returns the X coordinate of a point where user has touched in screen coordinates. It means that you can use this value to display something on the screen without coordinate transformation.

Returns:
X coordinate of a point in screen coordinates.

setScreenX

public void setScreenX(int screenX)

getScreenY

public int getScreenY()
Returns the Y coordinate of a point where user has touched in screen coordinates. It means that you can use this value to display something on the screen without coordinate transformation.

Returns:
Y coordinate of a point in screen coordinates.

setScreenY

public void setScreenY(int screenY)

getMapX

public int getMapX()
Returns the X coordinate of a point where user has touched in your original image coordinates.

Returns:
X coordinate of a point in map coordinates.

setMapX

public void setMapX(int mapX)

getMapY

public int getMapY()
Returns the Y coordinate of a point where user has touched in your original image coordinates.

Returns:
Y coordinate of a point in map coordinates.

setMapY

public void setMapY(int mapY)

getTouchedObjectIds

public java.util.ArrayList<ObjectTouchEvent> getTouchedObjectIds()
Deprecated. Use getTouchedObjectEvents() instead.

Returns:
ArrayList of ObjectTouchEvent objects.

getTouchedObjectEvents

public java.util.ArrayList<ObjectTouchEvent> getTouchedObjectEvents()
Returns the list of ObjectTouchEvent objects. If user has touched the map where no map objects are located - this will be an empty list. If user touched on map object - array will contain ObjectTouchEvent for each touched object.

Returns:
ArrayList of ObjectTouchEvent objects.

setTouchedObjectEvents

public void setTouchedObjectEvents(java.util.ArrayList<ObjectTouchEvent> touchedObjectIds)