public class MapOverviewChangeZoomListener extends 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. |
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 MapOverview
public void rectangle(EnvelopeEvent event) throws BehaviorException
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.
rectangle
in interface RectangleListener
event
- mouse event and information about the rectangle definedBehaviorException
- will be thrown when fails the process of this toolpublic Image getImageCursor()
ToolListener
Gets the Cursor
associated to this tool.
getImageCursor
in interface ToolListener
public boolean cancelDrawing()
ToolListener
Determines if the drawing process that this tool executes on the MapControl
instance could be canceled or not.
cancelDrawing
in interface ToolListener
true
if is cancellable; otherwise returns false
public void move(MoveEvent event) throws BehaviorException
PanListener
Called 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 PanListener
event
- mouse event information about the initial and final positions of the movementBehaviorException
- will be thrown when fails the process of this tool