public class ZoomOutTool extends AbstractZoomTool
For mouse clicks, the display will be zoomed-out such that the map centre is the position of the mouse click and the map width and height are calculated as:
len = len.old * z
where z is the linear zoom increment (>= 1.0)| Modifier and Type | Field and Description |
|---|---|
static Point |
CURSOR_HOTSPOT
Cursor hotspot coordinates
|
static String |
CURSOR_IMAGE
Cursor
|
static String |
ICON_IMAGE
Icon for the control
|
static String |
TOOL_NAME
Tool name
|
static String |
TOOL_TIP
Tool tip text
|
DEFAULT_ZOOM_FACTOR, zoom| Constructor and Description |
|---|
ZoomOutTool()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
drawDragBox()
Returns false to indicate that this tool does not draw a box on the map display when the
mouse is being dragged
|
Cursor |
getCursor()
Get the mouse cursor for this tool
|
void |
onMouseClicked(MapMouseEvent ev)
Zoom out by the currently set increment, with the map centred at the location (in world
coords) of the mouse click
|
getZoom, setZoomgetMapPane, setMapPaneonMouseDragged, onMouseEntered, onMouseExited, onMouseMoved, onMousePressed, onMouseReleased, onMouseWheelMovedpublic static final String TOOL_NAME
public static final String TOOL_TIP
public static final String CURSOR_IMAGE
public static final Point CURSOR_HOTSPOT
public static final String ICON_IMAGE
public void onMouseClicked(MapMouseEvent ev)
onMouseClicked in interface MapMouseListeneronMouseClicked in class MapMouseAdapterev - the mouse eventpublic Cursor getCursor()
getCursor in class CursorToolpublic boolean drawDragBox()
drawDragBox in class CursorToolCopyright © 1996–2019 Geotools. All rights reserved.