Class RectangleSelectionListener

java.lang.Object
org.gvsig.fmap.mapcontrol.tools.RectangleSelectionListener
All Implemented Interfaces:
RectangleListener, ToolListener

public class RectangleSelectionListener extends Object implements RectangleListener

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

Author:
Vicente Caballero Navarro
  • Constructor Details

    • RectangleSelectionListener

      public RectangleSelectionListener(MapControl mc)

      Creates a new RectangleSelectionListener object.

      Parameters:
      mc - the MapControl where is defined the rectangle
  • Method Details

    • rectangle

      public void rectangle(EnvelopeEvent event) throws BehaviorException
      Description copied from interface: RectangleListener

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

      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:
      rectangle in interface RectangleListener
      Parameters:
      event - mouse event and information about the rectangle defined
      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