org.graffiti.managers
Class ViewportEventDispatcher

java.lang.Object
  extended by org.graffiti.managers.ViewportEventDispatcher
All Implemented Interfaces:
ViewportListener

public class ViewportEventDispatcher
extends Object
implements ViewportListener

Dispatches the change events of viewports to registered listeners.

Version:
$Revision$ $Date$
Author:
Andreas Gleißner
See Also:
Viewport, ViewportListener

Constructor Summary
ViewportEventDispatcher()
           
 
Method Summary
 void addListener(ViewportListener viewportListener)
           
 void onViewportChange(Viewport viewport)
          Invoked when a Viewport has changed its zoom, rotation or pan.
 void onZoomChange(Zoomable zoomable)
           
 void removeListener(ViewportListener viewportListener)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ViewportEventDispatcher

public ViewportEventDispatcher()
Method Detail

addListener

public void addListener(ViewportListener viewportListener)

removeListener

public void removeListener(ViewportListener viewportListener)

onViewportChange

public void onViewportChange(Viewport viewport)
Invoked when a Viewport has changed its zoom, rotation or pan. From within this method, calls to Zoomable.setZoom(double), Viewport.setRotation(double) and Viewport.setTranslation(java.awt.geom.Point2D) are discouraged as it may cause deadlocks.

Specified by:
onViewportChange in interface ViewportListener
Parameters:
viewport - the Viewport that has changed its zoom, rotation or pan.

onZoomChange

public void onZoomChange(Zoomable zoomable)


Generated at 2012-05-30 11:00:36 PM CEST