org.gvsig.fmap.mapcontrol.tools
Class PointSelectionListener

java.lang.Object
  extended by org.gvsig.fmap.mapcontrol.tools.PointSelectionListener
All Implemented Interfaces:
PointListener, ToolListener

public class PointSelectionListener
extends Object
implements PointListener

Listener that selects all features of the active, and vector layers of the associated MapControl that their area intersects with the point selected by a single click of any button of the mouse.

Author:
Vicente Caballero Navarro

Field Summary
protected  MapControl mapCtrl
          Reference to the MapControl object that uses.
 
Constructor Summary
PointSelectionListener(MapControl mc)
          Creates a new PointSelectionListener object.
 
Method Summary
 boolean cancelDrawing()
          Determines if the drawing process that this tool executes on the MapControl instance could be canceled or not.
 Image getImageCursor()
          Gets the Cursor associated to this tool.
 void point(PointEvent event)
          Called when one click is pressed on the associated MapControl, or the location of the cursor of the mouse has changed on it.
 void pointDoubleClick(PointEvent event)
          Called when a double click is pressed on the associated MapControl.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mapCtrl

protected MapControl mapCtrl
Reference to the MapControl object that uses.

Constructor Detail

PointSelectionListener

public PointSelectionListener(MapControl mc)

Creates a new PointSelectionListener object.

Parameters:
mc - the MapControl where will be applied the changes
Method Detail

point

public void point(PointEvent event)
           throws BehaviorException
Description copied from interface: PointListener

Called when one click is pressed on the associated MapControl, or the location of the cursor of the mouse has changed on it.

Specified by:
point in interface PointListener
Parameters:
event - mouse event with the coordinates of the point selected on the associated MapControl
Throws:
BehaviorException - will be thrown when fails the process of this tool

getImageCursor

public Image getImageCursor()
Description copied from interface: ToolListener

Gets the Cursor associated to this tool.

Specified by:
getImageCursor in interface ToolListener
Returns:
component with the bitmap associated to this tool

cancelDrawing

public boolean cancelDrawing()
Description copied from interface: ToolListener

Determines if the drawing process that this tool executes on the MapControl instance could be canceled or not.

Specified by:
cancelDrawing in interface ToolListener
Returns:
true if is cancellable; otherwise returns false

pointDoubleClick

public void pointDoubleClick(PointEvent event)
                      throws BehaviorException
Description copied from interface: PointListener

Called when a double click is pressed on the associated MapControl.

Specified by:
pointDoubleClick in interface PointListener
Parameters:
event - mouse event and the coordinates of the point selected on the associated MapControl
Throws:
BehaviorException - will be thrown when fails the process of this tool


Copyright © 2004-2013 gvSIG. All Rights Reserved.