public class MeasureListenerImpl extends java.lang.Object implements PolylineListener
Listener for calculating the length of the segments of a polyline, defined in
the associated MapControl object.
| Modifier and Type | Field and Description |
|---|---|
protected MapControl |
mapCtrl
Reference to the
MapControl object that uses. |
| Constructor and Description |
|---|
MeasureListenerImpl(MapControl mc)
Creates a new listener for calculating the length of a polyline.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
cancelDrawing()
Determines if the drawing process that this tool executes on the
MapControl
instance could be canceled or not. |
java.awt.Image |
getImageCursor()
Gets the
Cursor associated to this tool. |
void |
pointFixed(MeasureEvent event)
Called when user executes a mouse click and selects a vertex of the polyline.
|
void |
points(MeasureEvent event)
Called when user moves the mouse after selecting a vertex of the polyline.
|
void |
polylineFinished(MeasureEvent event)
Called when user executes a double click with the mouse, finishing the
drawn of the polyline.
|
protected MapControl mapCtrl
MapControl object that uses.public MeasureListenerImpl(MapControl mc)
Creates a new listener for calculating the length of a polyline.
mc - the MapControl where is calculated the lengthpublic void points(MeasureEvent event)
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.
points in interface PolylineListenerevent - information about the mouse event, and geometry data of the polylinepublic java.awt.Image getImageCursor()
ToolListenerGets the Cursor associated to this tool.
getImageCursor in interface ToolListenerpublic void pointFixed(MeasureEvent event)
PolylineListenerCalled when user executes a mouse click and selects a vertex of the polyline.
pointFixed in interface PolylineListenerevent - information about the mouse event, and geometry data of the polylinepublic boolean cancelDrawing()
ToolListenerDetermines if the drawing process that this tool executes on the MapControl
instance could be canceled or not.
cancelDrawing in interface ToolListenertrue if is cancellable; otherwise returns falsepublic void polylineFinished(MeasureEvent event)
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 MapControl object that
their area intersect with the polygonal area defined in the event, will be selected.
polylineFinished in interface PolylineListenerevent - information about the mouse event, and geometry data of the polyline