anl.aida.gis
Class PositionTool

java.lang.Object
  extended by edu.umd.cs.piccolo.event.PBasicInputEventHandler
      extended by anl.aida.gis.PositionTool
All Implemented Interfaces:
edu.umd.cs.piccolo.event.PInputEventListener, java.util.EventListener

public class PositionTool
extends edu.umd.cs.piccolo.event.PBasicInputEventHandler

GIS Tool for firing position changed events to a listener. This translates a mouse coordinate into a WGS 84 lon and lat location.


Field Summary
protected  boolean active
           
(package private)  simphony.util.messages.MessageCenter center
           
protected  org.opengis.referencing.crs.CoordinateReferenceSystem crs
           
protected  java.util.List<LocationChangedListener> listeners
           
protected  com.vividsolutions.jts.geom.Point pt
           
protected  org.opengis.referencing.operation.MathTransform transform
           
protected  org.opengis.referencing.crs.CoordinateReferenceSystem wgs84
           
 
Constructor Summary
PositionTool(org.opengis.referencing.crs.CoordinateReferenceSystem crs)
           
PositionTool(org.opengis.referencing.crs.CoordinateReferenceSystem crs, LocationChangedListener listener)
           
 
Method Summary
 void activate(PiccoloMapPanel panel)
           
 void addLocationChangedListener(LocationChangedListener listener)
           
 void cleanUp()
           
 void deactivate()
           
 void fireListeners(com.vividsolutions.jts.geom.Point pt)
           
 java.awt.Cursor getCursor()
           
 void mouseEntered(edu.umd.cs.piccolo.event.PInputEvent event)
           
 void mouseExited(edu.umd.cs.piccolo.event.PInputEvent event)
           
 void mouseMoved(edu.umd.cs.piccolo.event.PInputEvent event)
           
 
Methods inherited from class edu.umd.cs.piccolo.event.PBasicInputEventHandler
acceptsEvent, getEventFilter, keyboardFocusGained, keyboardFocusLost, keyPressed, keyReleased, keyTyped, mouseClicked, mouseDragged, mousePressed, mouseReleased, mouseWheelRotated, mouseWheelRotatedByBlock, paramString, processEvent, setEventFilter, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

center

simphony.util.messages.MessageCenter center

active

protected boolean active

listeners

protected java.util.List<LocationChangedListener> listeners

crs

protected org.opengis.referencing.crs.CoordinateReferenceSystem crs

wgs84

protected org.opengis.referencing.crs.CoordinateReferenceSystem wgs84

transform

protected org.opengis.referencing.operation.MathTransform transform

pt

protected com.vividsolutions.jts.geom.Point pt
Constructor Detail

PositionTool

public PositionTool(org.opengis.referencing.crs.CoordinateReferenceSystem crs,
                    LocationChangedListener listener)

PositionTool

public PositionTool(org.opengis.referencing.crs.CoordinateReferenceSystem crs)
Method Detail

cleanUp

public void cleanUp()

mouseEntered

public void mouseEntered(edu.umd.cs.piccolo.event.PInputEvent event)
Overrides:
mouseEntered in class edu.umd.cs.piccolo.event.PBasicInputEventHandler

mouseExited

public void mouseExited(edu.umd.cs.piccolo.event.PInputEvent event)
Overrides:
mouseExited in class edu.umd.cs.piccolo.event.PBasicInputEventHandler

fireListeners

public void fireListeners(com.vividsolutions.jts.geom.Point pt)

mouseMoved

public void mouseMoved(edu.umd.cs.piccolo.event.PInputEvent event)
Overrides:
mouseMoved in class edu.umd.cs.piccolo.event.PBasicInputEventHandler

activate

public void activate(PiccoloMapPanel panel)

deactivate

public void deactivate()

getCursor

public java.awt.Cursor getCursor()

addLocationChangedListener

public void addLocationChangedListener(LocationChangedListener listener)