org.deegree_impl.clients.wmsclient2.control
Class PanListener

java.lang.Object
  extended byorg.deegree_impl.enterprise.control.AbstractListener
      extended byorg.deegree_impl.clients.wmsclient2.control.AbstractMapListener
          extended byorg.deegree_impl.clients.wmsclient2.control.PanListener
All Implemented Interfaces:
java.util.EventListener, WebListener

public class PanListener
extends AbstractMapListener

will be called if the client forces a pan action and performs it. A extending class can change the behavior of the response by overriding the modifyModel() and the modifySettings() methods.

----------------------------------------------------------------------

Version:
$Revision: 1.4 $ $Date: 2004/02/09 07:59:20 $
Author:
Andreas Poth

Field Summary
 
Fields inherited from class org.deegree_impl.enterprise.control.AbstractListener
 
Constructor Summary
PanListener()
           
 
Method Summary
 void actionPerformed(FormEvent event)
          the method will be called by the MapListener if a pan action/event occurs.
protected  double getScale(WMSGetMapRequest mrm)
          the method returns the scale of the map defined as diagonal size of a pixel at the center of the map.
private  WMSGetMapRequest modifyModel(WMSClientConfiguration config, java.util.HashMap model)
           
private  double[] pan(double minx, double miny, double maxx, double maxy, double delta, java.util.HashMap model)
          performs the panning of the map/bbox with the submitted factor 'delta'.
protected  java.util.HashMap toMap(java.lang.String request)
          maps a string representation of a request to a HashMap
 
Methods inherited from class org.deegree_impl.enterprise.control.AbstractListener
getAlternativeNextPage, getNextPage, getRequest, getReturnValue, gotoErrorPage, handle, setAlternativeNextPage, setDefaultAlternativeNextPage, setDefaultNextPage, setNextPage, setReturnValue, toModel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PanListener

public PanListener()
Method Detail

actionPerformed

public void actionPerformed(FormEvent event)
the method will be called by the MapListener if a pan action/event occurs.

Specified by:
actionPerformed in interface WebListener
Overrides:
actionPerformed in class AbstractMapListener
Parameters:
event -

modifyModel

private WMSGetMapRequest modifyModel(WMSClientConfiguration config,
                                     java.util.HashMap model)
                              throws InconsistentRequestException,
                                     XMLParsingException,
                                     java.net.MalformedURLException
Throws:
InconsistentRequestException
XMLParsingException
java.net.MalformedURLException

pan

private double[] pan(double minx,
                     double miny,
                     double maxx,
                     double maxy,
                     double delta,
                     java.util.HashMap model)
performs the panning of the map/bbox with the submitted factor 'delta'. the panning direction will be extracted from the submitted model.

Parameters:
minx -
miny -
maxx -
maxy -
delta -
model -
Returns:
moved bbox

toMap

protected java.util.HashMap toMap(java.lang.String request)
maps a string representation of a request to a HashMap


getScale

protected double getScale(WMSGetMapRequest mrm)
the method returns the scale of the map defined as diagonal size of a pixel at the center of the map.