|
||||||||||
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 JMapPane. Allows the user to drag the map with the mouse.
modules/unsupported/swing (gt-swing.jar)
Field Summary | |
---|---|
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 |
Constructor Summary | |
---|---|
PanTool()
Constructor |
Method Summary | |
---|---|
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 |
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, 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
public static final String CURSOR_IMAGE
public static final Point CURSOR_HOTSPOT
public static final String ICON_IMAGE
Constructor Detail |
---|
public 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 drawDragBox()
drawDragBox
in class CursorTool
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |