Class PolygonSelectionListener

java.lang.Object
org.gvsig.fmap.mapcontrol.tools.PolygonSelectionListener
All Implemented Interfaces:
PolylineListener, ToolListener

public class PolygonSelectionListener extends Object implements PolylineListener

Listener that selects all features of the active and vector layers which intersect with the defined polygon area in the associated MapControl object.

The selection will be produced after user finishes the creation of the polyline.

Author:
Vicente Caballero Navarro
  • Constructor Details

    • PolygonSelectionListener

      public PolygonSelectionListener(MapControl mc)

      Creates a new PolygonSelectionListener object.

      Parameters:
      mc - the MapControl where is drawn the polyline
  • Method Details

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

      public void points(MeasureEvent event) throws BehaviorException
      Description copied from interface: PolylineListener

      Called when user moves the mouse after selecting a vertex of the polyline.

      Each kind of polyline listener calculates different information with the data of the MeasureEvent, according its nature.

      Specified by:
      points in interface PolylineListener
      Parameters:
      event - information about the mouse event, and geometry data of the polyline
      Throws:
      BehaviorException - will be thrown when fails the process of this tool
    • pointFixed

      public void pointFixed(MeasureEvent event) throws BehaviorException
      Description copied from interface: PolylineListener

      Called when user executes a mouse click and selects a vertex of the polyline.

      Specified by:
      pointFixed in interface PolylineListener
      Parameters:
      event - information about the mouse event, and geometry data of the polyline
      Throws:
      BehaviorException - will be thrown when fails the process of this tool
    • polylineFinished

      public void polylineFinished(MeasureEvent event) throws BehaviorException
      Description copied from interface: PolylineListener

      Called when user executes a double click with the mouse, finishing the drawn of the polyline.

      All features of the active and vector layers of the associated MapControl object that their area intersect with the polygonal area defined in the event, will be selected.

      Specified by:
      polylineFinished in interface PolylineListener
      Parameters:
      event - information about the mouse event, and geometry data of the polyline
      Throws:
      BehaviorException - will be thrown when fails the process of this tool