|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectMapMouseAdapter
CursorTool
AbstractZoomTool
ZoomOutTool
public class ZoomOutTool
A zoom-out tool for JMapPane.
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)
Field Summary | |
---|---|
static String |
TOOL_NAME
Tool name |
static String |
TOOL_TIP
Tool tip text |
Fields inherited from class AbstractZoomTool |
---|
DEFAULT_ZOOM_FACTOR, zoom |
Fields inherited from class CursorTool |
---|
ANY_BUTTON |
Constructor Summary | |
---|---|
ZoomOutTool()
Constructs a new zoom out tool which is triggered by any mouse button. |
|
ZoomOutTool(int triggerButtonMask)
Constructs a new zoom out tool. |
Method Summary | |
---|---|
boolean |
canDraw()
Checks if the tool can draw when dragging. |
boolean |
canMove()
Checks if the tool can move the map when dragging. |
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 |
Methods inherited from class AbstractZoomTool |
---|
getZoom, setZoom |
Methods inherited from class CursorTool |
---|
getMapPane, isDrawing, isTriggerMouseButton, setMapPane |
Methods inherited from class MapMouseAdapter |
---|
onMouseDragged, onMouseEntered, onMouseExited, onMouseMoved, onMousePressed, onMouseReleased, onMouseWheelMoved |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String TOOL_NAME
public static final String TOOL_TIP
Constructor Detail |
---|
public ZoomOutTool(int triggerButtonMask)
SWT.BUTTON1
, or
a combination of multiple SWT-masks.
triggerButtonMask
- Mouse button which triggers the tool's activation
or if the tool is to be triggered by any buttonpublic ZoomOutTool()
Method Detail |
---|
public void onMouseClicked(MapMouseEvent ev)
onMouseClicked
in interface MapMouseListener
onMouseClicked
in class MapMouseAdapter
ev
- the mouse eventpublic Cursor getCursor()
getCursor
in class CursorTool
public boolean canDraw()
CursorTool
canDraw
in class CursorTool
true
if the tool can draw.public boolean canMove()
CursorTool
canMove
in class CursorTool
true
if the tool can move the map while dragging.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |