Package org.geotools.swing.tool
Class ScrollWheelTool
- Object
-
- MapMouseAdapter
-
- CursorTool
-
- AbstractZoomTool
-
- ScrollWheelTool
-
- All Implemented Interfaces:
MapMouseListener
public class ScrollWheelTool extends AbstractZoomTool
Allow scrolling with the mouse wheel.- Since:
- 2.15
- Author:
- Ian Turton
-
-
Field Summary
-
Fields inherited from class AbstractZoomTool
DEFAULT_ZOOM_FACTOR, zoom
-
-
Constructor Summary
Constructors Constructor Description ScrollWheelTool(JMapPane mapPane)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Cursor
getCursor()
Get the cursor for this tool.void
onMouseWheelMoved(MapMouseEvent ev)
Respond to a mouse wheel scroll event received from the map pane-
Methods inherited from class AbstractZoomTool
getZoom, setZoom
-
Methods inherited from class CursorTool
drawDragBox, getMapPane, setMapPane
-
Methods inherited from class MapMouseAdapter
onMouseClicked, onMouseDragged, onMouseEntered, onMouseExited, onMouseMoved, onMousePressed, onMouseReleased
-
-
-
-
Constructor Detail
-
ScrollWheelTool
public ScrollWheelTool(JMapPane mapPane)
-
-
Method Detail
-
getCursor
public Cursor getCursor()
Description copied from class:CursorTool
Get the cursor for this tool. Sub-classes should override this method to provide a custom cursor.- Overrides:
getCursor
in classCursorTool
- Returns:
- the default cursor
-
onMouseWheelMoved
public void onMouseWheelMoved(MapMouseEvent ev)
Description copied from class:MapMouseAdapter
Respond to a mouse wheel scroll event received from the map pane- Specified by:
onMouseWheelMoved
in interfaceMapMouseListener
- Overrides:
onMouseWheelMoved
in classMapMouseAdapter
- Parameters:
ev
- the mouse event
-
-