public class MapOverviewChangeZoomListener extends java.lang.Object implements RectangleListener, PanListener
Listener for changes of the zoom caused by selecting a rectangular area on the associated
MapOverview object with the first button of the mouse.
If the kind of action was a movement on the associated object, updates the extent of its rectangular area.
If the kind of action is the selection of a rectangular area, and is bigger than 3x3 pixels,
applies a zoom in operation centering its ViewPort according the equivalent extent
in map coordinates.
ViewPort| Modifier and Type | Field and Description |
|---|---|
protected MapControl |
mapControl
Reference to the
MapControl object that uses. |
| Constructor and Description |
|---|
MapOverviewChangeZoomListener(MapControl mapControl)
Creates a new listener for changes of zoom at the associated
MapOverview object. |
| 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 |
move(MoveEvent event)
Called when user drags the mouse on the view.
|
void |
rectangle(EnvelopeEvent event)
Called when user executes a double click with the mouse, finishing the
drawn of the rectangle.
|
protected MapControl mapControl
MapControl object that uses.public MapOverviewChangeZoomListener(MapControl mapControl)
Creates a new listener for changes of zoom at the associated MapOverview object.
mapControl - the MapControl object which represents the MapOverviewpublic void rectangle(EnvelopeEvent event) throws BehaviorException
RectangleListenerCalled 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.
rectangle in interface RectangleListenerevent - mouse event and information about the rectangle definedBehaviorException - will be thrown when fails the process of this toolpublic java.awt.Image getImageCursor()
ToolListenerGets the Cursor associated to this tool.
getImageCursor in interface ToolListenerpublic 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 move(MoveEvent event) throws BehaviorException
PanListenerCalled when user drags the mouse on the view.
Updates the extent coordinates according to the direction of the movement between the initial and final points of line determined by the move of the mouse.
move in interface PanListenerevent - mouse event information about the initial and final positions of the movementBehaviorException - will be thrown when fails the process of this tool