org.gvsig.fmap.mapcontrol.tools
Class RectangleSelectionListener

java.lang.Object
  extended by 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 Summary
RectangleSelectionListener(MapControl mc)
          Creates a new RectangleSelectionListener 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 rectangle(EnvelopeEvent event)
          Called when user executes a double click with the mouse, finishing the drawn of the rectangle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RectangleSelectionListener

public RectangleSelectionListener(MapControl mc)

Creates a new RectangleSelectionListener object.

Parameters:
mc - the MapControl where is defined the rectangle
Method Detail

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


Copyright © 2004-2013 gvSIG. All Rights Reserved.