Package org.geotools.swing.tool
Class CursorTool
Object
MapMouseAdapter
CursorTool
- All Implemented Interfaces:
- MapMouseListener
- Direct Known Subclasses:
- AbstractZoomTool,- InfoTool,- PanTool
The base class for map pane cursor tools. Simply adds a getCursor method to the MapToolAdapter
- Since:
- 2.6
- Author:
- Michael Bedward
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleanQuery if the tool is one that draws a box on the map display when the mouse is being dragged (eg. to indicate a zoom area).Get the cursor for this tool.Get the map pane that this tool is servicingvoidsetMapPane(MapPane pane) Set the map pane that this cursor tool is associated withMethods inherited from class MapMouseAdapteronMouseClicked, onMouseDragged, onMouseEntered, onMouseExited, onMouseMoved, onMousePressed, onMouseReleased, onMouseWheelMoved
- 
Constructor Details- 
CursorToolpublic CursorTool()
 
- 
- 
Method Details- 
setMapPaneSet the map pane that this cursor tool is associated with- Parameters:
- pane- the map pane
- Throws:
- IllegalArgumentException- if mapPane is null
 
- 
getMapPaneGet the map pane that this tool is servicing- Returns:
- the map pane
 
- 
getCursorGet the cursor for this tool. Sub-classes should override this method to provide a custom cursor.- Returns:
- the default cursor
 
- 
drawDragBoxpublic boolean drawDragBox()Query if the tool is one that draws a box on the map display when the mouse is being dragged (eg. to indicate a zoom area).- Returns:
- true if this tool supports drawing a drag-box on the map; false otherwise
 
 
-