Class MeasureListenerImpl
- All Implemented Interfaces:
PolylineListener,ToolListener
Listener for calculating the length of the segments of a polyline, defined in
the associated MapControl object.
- Author:
- Vicente Caballero Navarro
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected MapControlReference to theMapControlobject that uses. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new listener for calculating the length of a polyline. -
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.voidpointFixed(MeasureEvent event) Called when user executes a mouse click and selects a vertex of the polyline.voidpoints(MeasureEvent event) Called when user moves the mouse after selecting a vertex of the polyline.voidpolylineFinished(MeasureEvent event) Called when user executes a double click with the mouse, finishing the drawn of the polyline.
-
Field Details
-
mapCtrl
Reference to theMapControlobject that uses.
-
-
Constructor Details
-
MeasureListenerImpl
Creates a new listener for calculating the length of a polyline.
- Parameters:
mc- theMapControlwhere is calculated the length
-
-
Method Details
-
points
Description copied from interface:PolylineListenerCalled 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:
pointsin interfacePolylineListener- Parameters:
event- information about the mouse event, and geometry data of the polyline
-
getImageCursor
Description copied from interface:ToolListenerGets the
Cursorassociated to this tool.- Specified by:
getImageCursorin interfaceToolListener- Returns:
- component with the bitmap associated to this tool
-
pointFixed
Description copied from interface:PolylineListenerCalled when user executes a mouse click and selects a vertex of the polyline.
- Specified by:
pointFixedin interfacePolylineListener- Parameters:
event- information about the mouse event, and geometry data of the polyline
-
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
-
polylineFinished
Description copied from interface:PolylineListenerCalled 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
MapControlobject that their area intersect with the polygonal area defined in the event, will be selected.- Specified by:
polylineFinishedin interfacePolylineListener- Parameters:
event- information about the mouse event, and geometry data of the polyline
-