Class PointSelectionListener

java.lang.Object
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 Details

    • PIXEL_TOLERANCE_FOR_QUERY_BY_POINT

      public static int PIXEL_TOLERANCE_FOR_QUERY_BY_POINT
    • mapCtrl

      protected MapControl mapCtrl
      Reference to the MapControl object that uses.
  • Constructor Details

    • PointSelectionListener

      public PointSelectionListener(MapControl mc)

      Creates a new PointSelectionListener object.

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

    • 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
    • getSelectedGeometry

      protected org.gvsig.fmap.geom.Geometry getSelectedGeometry()
    • 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