| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.geotools.gui.tools.AbstractTool
org.geotools.gui.tools.PanToolImpl
org.geotools.gui.tools.ZoomToolImpl
Provides both Click/Zoom and Drag/Zoom functionality. Processes MouseEvents
 on behalf of MapPane and constructs a CordinateTransform for the map's Context.
 For Click/Zoom, pan the map so that the new extent has the click point in
 the middle of the map and then zoom in/out by the zoomFactor.
 For Drag/Zoom, pan to the center of the dragged area and zoom in to include
 that area.
| Field Summary | 
| Fields inherited from class org.geotools.gui.tools.PanToolImpl | 
| pressPoint, releasePoint | 
| Fields inherited from class org.geotools.gui.tools.AbstractTool | 
| context | 
| Constructor Summary | |
| ZoomToolImpl()Construct a ZoomTool. | |
| ZoomToolImpl(double zoomFactor)Construct a ZoomTool | |
| Method Summary | |
|  void | addMouseListener(java.awt.Component component,
                 MapContext context)Register this tool to receive MouseEvents from component. | 
|  void | addMouseMotionListener(java.awt.Component component,
                       MapContext context) | 
|  double | getZoomFactor()The factor to zoom in out by, zoomFactor=0.5 means zoom in, zoomFactor=2 means zoom out. | 
|  void | mouseClicked(java.awt.event.MouseEvent e)Set up Click/Zoom. | 
|  void | mouseReleased(java.awt.event.MouseEvent e)Set the release point in a click-drag operation and process the drag operation. | 
|  void | setZoomFactor(double zoomFactor)The factor to zoom in out by when processing mouseClicks. zoomFactor=0.5 means zoom in, zoomFactor=2 means zoom out. | 
| Methods inherited from class org.geotools.gui.tools.PanToolImpl | 
| applyZoomTransform, mousePressed | 
| Methods inherited from class org.geotools.gui.tools.AbstractTool | 
| addMouseListener, addMouseMotionListener, destroy, getContext, getCursor, getName, mouseDragged, mouseEntered, mouseExited, mouseMoved, paint, removeMouseListeners, setCursor, setName, toString | 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Methods inherited from interface org.geotools.gui.tools.Tool | 
| destroy, getContext, getCursor, getName, paint, removeMouseListeners, setCursor, setName | 
| Constructor Detail | 
public ZoomToolImpl()
public ZoomToolImpl(double zoomFactor)
zoomFactor - the factor to zoom in/out by, zoomFactor=2 means
        zoom in, zoomFactor=0.5 means zoom out.| Method Detail | 
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked in interface java.awt.event.MouseListenermouseClicked in class PanToolImple - The mouse clicked event.public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased in interface java.awt.event.MouseListenermouseReleased in class PanToolImple - contains the mouse click.
public void addMouseListener(java.awt.Component component,
                             MapContext context)
component.
addMouseListener in interface TooladdMouseListener in class PanToolImplcomponent - The tool will process mouseEvents from this component.context - The Context that will be changed by this Tool.
public void addMouseMotionListener(java.awt.Component component,
                                   MapContext context)
                            throws java.lang.IllegalArgumentException
addMouseMotionListener in interface TooladdMouseMotionListener in class PanToolImpljava.lang.IllegalArgumentExceptionpublic void setZoomFactor(double zoomFactor)
setZoomFactor in interface ZoomToolzoomFactor - The factor to zoom in/out by.public double getZoomFactor()
getZoomFactor in interface ZoomTool| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||