|
|||||||||||
| 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.ClickZoomToolImpl
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.
| Field Summary |
| Fields inherited from class org.geotools.gui.tools.AbstractTool |
context |
| Constructor Summary | |
ClickZoomToolImpl()
Construct a ZoomTool. |
|
ClickZoomToolImpl(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 |
setZoomFactor(double zoomFactor)
The factor to zoom in out by, zoomFactor=0.5 means zoom in, zoomFactor=2 means zoom out. |
| Methods inherited from class org.geotools.gui.tools.AbstractTool |
addMouseListener, addMouseMotionListener, destroy, getContext, getCursor, getName, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, 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 ClickZoomToolImpl()
public ClickZoomToolImpl(double zoomFactor)
| Method Detail |
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked in interface java.awt.event.MouseListenermouseClicked in class AbstractToole - The mouse clicked event.
public void addMouseListener(java.awt.Component component,
MapContext context)
component.
- Specified by:
addMouseListener in interface Tool
- Parameters:
component - The tool will process mouseEvents from this component.context - The Context that will be changed by this Tool.
- Throws:
java.lang.IllegalArgumentException - if an argument is null
or the tool is being assigned a different context to before.
public void setZoomFactor(double zoomFactor)
setZoomFactor in interface ClickZoomToolzoomFactor - the factor to zoom by.public double getZoomFactor()
getZoomFactor in interface ClickZoomTool
public void addMouseMotionListener(java.awt.Component component,
MapContext context)
throws java.lang.IllegalArgumentException
addMouseMotionListener in interface Tooljava.lang.IllegalArgumentException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||