| |
|
| java.awt.event.MouseEvent org.geotools.gui.swing.event.GeoMouseEvent
GeoMouseEvent | final public class GeoMouseEvent extends MouseEvent (Code) | | A MouseEvent which contains methods to obtain coordinates in real world
CoordinateSystem as well as Screen Coordinates.
All
MouseListener s that have registered for
org.geotools.gui.swing.MapPaneImpl mouseEvents will receive
events of this class.
Listeners implementations can implements their code as below:
public void mouseClicked(MouseEvent e) {
GeoMouseEvent event = (GeoMouseEvent) e;
// Process event here...
}
version: $Id: GeoMouseEvent.java 25694 2007-05-30 23:33:52Z ianturton $ author: Cameron Shorter |
Field Summary | |
final MathTransform | transform The transform which will convert screenCoordinates
to CoordinateSystem coordinates. |
Constructor Summary | |
public | GeoMouseEvent(MouseEvent event, MathTransform transform) A mouseClick event which also contains methods to transform from
pixels to the Coordinate System of the Renderer. |
transform | final MathTransform transform(Code) | | The transform which will convert screenCoordinates
to CoordinateSystem coordinates.
|
GeoMouseEvent | public GeoMouseEvent(MouseEvent event, MathTransform transform)(Code) | | A mouseClick event which also contains methods to transform from
pixels to the Coordinate System of the Renderer.
Parameters: event - The original mouse event. Parameters: transform - The transform which will convert screenCoordinatesto CoordinateSystem coordinates. |
getMapCoordinate | public GeneralDirectPosition getMapCoordinate(GeneralDirectPosition dest) throws TransformException(Code) | | Returns the "real world" mouse's position. The coordinates are expressed
in Context's CoordinateSystem.
Parameters: dest - A pre-allocated variable to store the mouse's locationin CoordinateSystems, can be set to null . The mouse's location in CoordinateSystem coordinates. throws: TransformException - when transform is invalid. |
|
|
|