schmitzm.geotools.map.event
Class MapContextSynchronizer

java.lang.Object
  extended by schmitzm.geotools.map.event.MapContextSynchronizer

public class MapContextSynchronizer
extends Object

This MapBoundsListener listens to MapBoundsEvents and transfers the change of CoordinateReferenceSystem and "AreaOfInterest" to the connected MapContext, so this MapContext has always the same CRS and AreaOfInterest like the MapContex this Listener is added to.

Author:
Martin Schmitz

Field Summary
protected  MapContext mapContext
          MapContext the changes by a MapBoundsEvent are transfered to.
 
Constructor Summary
MapContextSynchronizer(MapContext mapContext)
          Creates a new synchronizer.
 
Method Summary
 void mapBoundsChanged(MapBoundsEvent e)
          Invoked when the CRS or AreaOfInterest of a connected MapContext changes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mapContext

protected MapContext mapContext
MapContext the changes by a MapBoundsEvent are transfered to.

Constructor Detail

MapContextSynchronizer

public MapContextSynchronizer(MapContext mapContext)
Creates a new synchronizer.

Parameters:
mapContext - the MapContext the changes by a MapBoundsEvent are transfered to
Method Detail

mapBoundsChanged

public void mapBoundsChanged(MapBoundsEvent e)
Invoked when the CRS or AreaOfInterest of a connected MapContext changes.

Parameters:
e - an event