Package org.gvsig.fmap.mapcontrol.tools
Class PointSelectionListener
java.lang.Object
org.gvsig.fmap.mapcontrol.tools.PointSelectionListener
- All Implemented Interfaces:
PointListener,ToolListener
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
FieldsModifier and TypeFieldDescriptionprotected MapControlReference to theMapControlobject that uses.static int -
Constructor Summary
ConstructorsConstructorDescriptionCreates a newPointSelectionListenerobject. -
Method Summary
Modifier and TypeMethodDescriptionbooleanDetermines if the drawing process that this tool executes on theMapControlinstance could be canceled or not.Gets theCursorassociated to this tool.protected org.gvsig.fmap.geom.Geometryvoidpoint(PointEvent event) Called when one click is pressed on the associatedMapControl, or the location of the cursor of the mouse has changed on it.voidpointDoubleClick(PointEvent event) Called when a double click is pressed on the associatedMapControl.
-
Field Details
-
PIXEL_TOLERANCE_FOR_QUERY_BY_POINT
public static int PIXEL_TOLERANCE_FOR_QUERY_BY_POINT -
mapCtrl
Reference to theMapControlobject that uses.
-
-
Constructor Details
-
PointSelectionListener
Creates a new
PointSelectionListenerobject.- Parameters:
mc- theMapControlwhere will be applied the changes
-
-
Method Details
-
point
Description copied from interface:PointListenerCalled when one click is pressed on the associated
MapControl, or the location of the cursor of the mouse has changed on it.- Specified by:
pointin interfacePointListener- Parameters:
event- mouse event with the coordinates of the point selected on the associatedMapControl- Throws:
BehaviorException- will be thrown when fails the process of this tool
-
getSelectedGeometry
protected org.gvsig.fmap.geom.Geometry getSelectedGeometry() -
getImageCursor
Description copied from interface:ToolListenerGets the
Cursorassociated to this tool.- Specified by:
getImageCursorin interfaceToolListener- Returns:
- component with the bitmap associated to this tool
-
cancelDrawing
public boolean cancelDrawing()Description copied from interface:ToolListenerDetermines if the drawing process that this tool executes on the
MapControlinstance could be canceled or not.- Specified by:
cancelDrawingin interfaceToolListener- Returns:
trueif is cancellable; otherwise returnsfalse
-
pointDoubleClick
Description copied from interface:PointListenerCalled when a double click is pressed on the associated
MapControl.- Specified by:
pointDoubleClickin interfacePointListener- Parameters:
event- mouse event and the coordinates of the point selected on the associatedMapControl- Throws:
BehaviorException- will be thrown when fails the process of this tool
-