|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectMapMouseAdapter
CursorTool
PanTool
public class PanTool
A map panning tool for SwtMapPane
.
Allows the user to drag the map with the mouse.
Field Summary | |
---|---|
static String |
TOOL_NAME
Tool name |
static String |
TOOL_TIP
Tool tip text |
Fields inherited from class CursorTool |
---|
ANY_BUTTON |
Constructor Summary | |
---|---|
PanTool()
Constructs a new pan tool which is triggered by any mouse button. |
|
PanTool(int triggerButtonMask)
Constructs a new pan 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 |
onMouseDragged(MapMouseEvent ev)
Respond to a mouse dragged event. |
void |
onMousePressed(MapMouseEvent ev)
Respond to a mouse button press event from the map mapPane. |
void |
onMouseReleased(MapMouseEvent ev)
If this button release is the end of a mouse dragged event, requests the map mapPane to repaint the display |
Methods inherited from class CursorTool |
---|
getMapPane, isDrawing, isTriggerMouseButton, setMapPane |
Methods inherited from class MapMouseAdapter |
---|
onMouseClicked, onMouseEntered, onMouseExited, onMouseMoved, 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 PanTool(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 PanTool()
Method Detail |
---|
public void onMousePressed(MapMouseEvent ev)
onMousePressed
in interface MapMouseListener
onMousePressed
in class MapMouseAdapter
ev
- the mouse eventpublic void onMouseDragged(MapMouseEvent ev)
org.geotools.swing.JMapPane#moveImage()
onMouseDragged
in interface MapMouseListener
onMouseDragged
in class MapMouseAdapter
ev
- the mouse eventpublic void onMouseReleased(MapMouseEvent ev)
onMouseReleased
in interface MapMouseListener
onMouseReleased
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 |