Package org.geotools.swing.tool
Class PanTool
Object
MapMouseAdapter
CursorTool
PanTool
- All Implemented Interfaces:
MapMouseListener
A cursor tool to pan the map pane display.
- Since:
- 2.6
- Author:
- Michael Bedward
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns false to indicate that this tool does not draw a box on the map display when the mouse is being draggedGet the mouse cursor for this toolvoidRespond to a mouse dragged event.voidRespond to a mouse button press event from the map mapPane.voidIf this button release is the end of a mouse dragged event, requests the map mapPane to repaint the displayMethods inherited from class CursorTool
getMapPane, setMapPaneMethods inherited from class MapMouseAdapter
onMouseClicked, onMouseEntered, onMouseExited, onMouseMoved, onMouseWheelMoved
-
Field Details
-
TOOL_NAME
Tool name -
TOOL_TIP
Tool tip text -
CURSOR_IMAGE
Cursor- See Also:
-
CURSOR_HOTSPOT
Cursor hotspot coordinates -
ICON_IMAGE
Icon for the control- See Also:
-
-
Constructor Details
-
PanTool
public PanTool()Constructor
-
-
Method Details
-
onMousePressed
Respond to a mouse button press event from the map mapPane. This may signal the start of a mouse drag. Records the event's window position.- Specified by:
onMousePressedin interfaceMapMouseListener- Overrides:
onMousePressedin classMapMouseAdapter- Parameters:
ev- the mouse event
-
onMouseDragged
Respond to a mouse dragged event. CallsMapPane.moveImage(int, int)- Specified by:
onMouseDraggedin interfaceMapMouseListener- Overrides:
onMouseDraggedin classMapMouseAdapter- Parameters:
ev- the mouse event
-
onMouseReleased
If this button release is the end of a mouse dragged event, requests the map mapPane to repaint the display- Specified by:
onMouseReleasedin interfaceMapMouseListener- Overrides:
onMouseReleasedin classMapMouseAdapter- Parameters:
ev- the mouse event
-
getCursor
Get the mouse cursor for this tool- Overrides:
getCursorin classCursorTool- Returns:
- the default cursor
-
drawDragBox
public boolean drawDragBox()Returns false to indicate that this tool does not draw a box on the map display when the mouse is being dragged- Overrides:
drawDragBoxin classCursorTool- Returns:
- true if this tool supports drawing a drag-box on the map; false otherwise
-