Package org.geotools.swing.tool
Class PanTool
- Object
- 
- MapMouseAdapter
- 
- CursorTool
- 
- PanTool
 
 
 
- 
- All Implemented Interfaces:
- MapMouseListener
 
 public class PanTool extends CursorTool A cursor tool to pan the map pane display.- Since:
- 2.6
- Author:
- Michael Bedward
 
- 
- 
Field SummaryFields Modifier and Type Field Description static PointCURSOR_HOTSPOTCursor hotspot coordinatesstatic StringCURSOR_IMAGECursorstatic StringICON_IMAGEIcon for the controlstatic StringTOOL_NAMETool namestatic StringTOOL_TIPTool tip text
 - 
Constructor SummaryConstructors Constructor Description PanTool()Constructor
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleandrawDragBox()Returns false to indicate that this tool does not draw a box on the map display when the mouse is being draggedCursorgetCursor()Get the mouse cursor for this toolvoidonMouseDragged(MapMouseEvent ev)Respond to a mouse dragged event.voidonMousePressed(MapMouseEvent ev)Respond to a mouse button press event from the map mapPane.voidonMouseReleased(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 CursorToolgetMapPane, setMapPane
 - 
Methods inherited from class MapMouseAdapteronMouseClicked, onMouseEntered, onMouseExited, onMouseMoved, onMouseWheelMoved
 
- 
 
- 
- 
- 
Field Detail- 
TOOL_NAMEpublic static final String TOOL_NAME Tool name
 - 
TOOL_TIPpublic static final String TOOL_TIP Tool tip text
 - 
CURSOR_IMAGEpublic static final String CURSOR_IMAGE Cursor- See Also:
- Constant Field Values
 
 - 
CURSOR_HOTSPOTpublic static final Point CURSOR_HOTSPOT Cursor hotspot coordinates
 - 
ICON_IMAGEpublic static final String ICON_IMAGE Icon for the control- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
onMousePressedpublic void onMousePressed(MapMouseEvent ev) 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 interface- MapMouseListener
- Overrides:
- onMousePressedin class- MapMouseAdapter
- Parameters:
- ev- the mouse event
 
 - 
onMouseDraggedpublic void onMouseDragged(MapMouseEvent ev) Respond to a mouse dragged event. CallsMapPane.moveImage(int, int)- Specified by:
- onMouseDraggedin interface- MapMouseListener
- Overrides:
- onMouseDraggedin class- MapMouseAdapter
- Parameters:
- ev- the mouse event
 
 - 
onMouseReleasedpublic void onMouseReleased(MapMouseEvent ev) If this button release is the end of a mouse dragged event, requests the map mapPane to repaint the display- Specified by:
- onMouseReleasedin interface- MapMouseListener
- Overrides:
- onMouseReleasedin class- MapMouseAdapter
- Parameters:
- ev- the mouse event
 
 - 
getCursorpublic Cursor getCursor() Get the mouse cursor for this tool- Overrides:
- getCursorin class- CursorTool
- Returns:
- the default cursor
 
 - 
drawDragBoxpublic 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 class- CursorTool
- Returns:
- true if this tool supports drawing a drag-box on the map; false otherwise
 
 
- 
 
-