|
|||||||||||
| 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
Provides both Click/Pan and Drap/Pan functionality. Processes MouseEvents on behalf of MapPanel and constructs a CordinateTransform for the map's Context.
| Field Summary | |
protected CoordinatePoint |
pressPoint
The Mouse button press down point in a click/drag operation |
protected CoordinatePoint |
releasePoint
The Mouse button release point in a click/drag operation |
| Fields inherited from class org.geotools.gui.tools.AbstractTool |
context |
| Constructor Summary | |
PanToolImpl()
Construct a PanTool. |
|
| 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)
|
protected void |
applyZoomTransform(CoordinatePoint midPoint,
double inverseZoomFactor)
Calculate a transform based on the new midpoint and zoomFactor. |
void |
mouseClicked(java.awt.event.MouseEvent e)
Process Click and Drag Pan. |
void |
mousePressed(java.awt.event.MouseEvent e)
Set the press point in a click-drag operation. |
void |
mouseReleased(java.awt.event.MouseEvent e)
Set the release point in a click-drag operation and process the drag operation. |
| 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 |
| Field Detail |
protected CoordinatePoint pressPoint
protected CoordinatePoint releasePoint
| Constructor Detail |
public PanToolImpl()
| Method Detail |
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked in interface java.awt.event.MouseListenermouseClicked in class AbstractToole - The mouse clicked event.
protected void applyZoomTransform(CoordinatePoint midPoint,
double inverseZoomFactor)
midPoint - The midPoint of the new AreaOfInterestinverseZoomFactor - The inverse of the zoomFactor to zoom by,
inverseZoomFactor=0.5 means zoom in.public void mousePressed(java.awt.event.MouseEvent e)
mousePressed in interface java.awt.event.MouseListenermousePressed in class AbstractToole - contains the mouse click.public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased in interface java.awt.event.MouseListenermouseReleased in class AbstractToole - contains the mouse click.
public void addMouseListener(java.awt.Component component,
MapContext context)
component.
addMouseListener in interface Toolcomponent - 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 Tooljava.lang.IllegalArgumentException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||