org.geotools.swing.tool
Class CursorTool

Object
  extended by MapMouseAdapter
      extended by CursorTool
All Implemented Interfaces:
MapMouseListener
Direct Known Subclasses:
AbstractZoomTool, InfoTool, PanTool

public abstract class CursorTool
extends MapMouseAdapter

The base class for map pane cursor tools. Simply adds a getCursor method to the MapToolAdapter

Since:
2.6
Author:
Michael Bedward
Module:
modules/unsupported/swing (gt-swing.jar)

Constructor Summary
CursorTool()
           
 
Method Summary
 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).
 Cursor getCursor()
          Get the cursor for this tool.
 JMapPane getMapPane()
          Get the map pane that this tool is servicing
 void setMapPane(JMapPane pane)
          Set the map pane that this cursor tool is associated with
 
Methods inherited from class MapMouseAdapter
onMouseClicked, onMouseDragged, onMouseEntered, onMouseExited, onMouseMoved, onMousePressed, onMouseReleased, onMouseWheelMoved
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CursorTool

public CursorTool()
Method Detail

setMapPane

public void setMapPane(JMapPane pane)
Set the map pane that this cursor tool is associated with

Parameters:
pane - the map pane
Throws:
IllegalArgumentException - if mapPane is null

getMapPane

public JMapPane getMapPane()
Get the map pane that this tool is servicing

Returns:
the map pane

getCursor

public Cursor getCursor()
Get the cursor for this tool. Sub-classes should override this method to provide a custom cursor.

Returns:
the default cursor

drawDragBox

public 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


Copyright © 1996-2010 Geotools. All Rights Reserved.