es.prodevelop.gvsig.mobile.gui.tool.listener
Class PointSelectionPointListener

java.lang.Object
  extended byes.prodevelop.gvsig.mobile.gui.tool.listener.PointSelectionPointListener
All Implemented Interfaces:
PointToolListener, ToolListener

public class PointSelectionPointListener
extends java.lang.Object
implements PointToolListener

This listener is associated with the select-by-point tool. It will set as selected the feature(s) that intersect with the point indicated by the user. Only one layer has to be checked as infobale in the TOC to perform this operation.

Author:
jldominguez
See Also:
PointBehavior, FLyrVect, SelectionSupport

Constructor Summary
PointSelectionPointListener()
           
 
Method Summary
 boolean cancelDrawing()
          This method asks the listener to cancel the current drawing process (currently unsued)
 java.awt.Cursor getCursor()
          Gets the cursor that should be used while this tool is active.
 void point(PointEvent event)
          This method will be called when the user clicks on the map and the select-by-point tool is active.
 void setMapControl(MapControl mc)
          Sets the MapControl object that will be updated by this listener.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PointSelectionPointListener

public PointSelectionPointListener()
Method Detail

point

public void point(PointEvent event)
This method will be called when the user clicks on the map and the select-by-point tool is active. It checks that there is excatly one vector layer checked as infobale in the TOC, and sets its intersecting features as selected. Then requests a map refresh.

Specified by:
point in interface PointToolListener
Parameters:
event - the point event that indicates the point of interest

getCursor

public java.awt.Cursor getCursor()
Gets the cursor that should be used while this tool is active.

Specified by:
getCursor in interface ToolListener
Returns:
the cursor that should be used while this tool is active.

cancelDrawing

public boolean cancelDrawing()
This method asks the listener to cancel the current drawing process (currently unsued)

Specified by:
cancelDrawing in interface ToolListener
Returns:
whether it was possible to cancel the drawing

setMapControl

public void setMapControl(MapControl mc)
Sets the MapControl object that will be updated by this listener.

Specified by:
setMapControl in interface ToolListener
Parameters:
mc - the MapControl object to be used by this listener.