org.deegree_impl.clients.wmsclient2.control
Class ZoomInListener

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.ZoomInListener
All Implemented Interfaces:
java.util.EventListener, WebListener

public class ZoomInListener
extends AbstractMapListener

will be called if the client forces a zoomin action. the zoomin will be performed by setting the map boundaries to the rectangle selected by the client or centering the map onto the point the user had mouse-clicked to. the point or the rectangle is defined within the settings that are contained within the MapClientEvent.

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

Version:
$Revision: 1.7 $ $Date: 2004/02/09 07:59:22 $
Author:
Andreas Poth, Katharina Lupp

Field Summary
 
Fields inherited from class org.deegree_impl.enterprise.control.AbstractListener
 
Constructor Summary
ZoomInListener()
           
 
Method Summary
 void actionPerformed(FormEvent event)
          the method will be called by the MapListener if a zoomin 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 modifyModelToPointZoom(WMSClientConfiguration config, java.util.HashMap model)
           
private  WMSGetMapRequest modifyModelToZoomInByRect(WMSClientConfiguration config, java.util.HashMap model)
          The method performs a "zoom in by rectangle" to the map model.
protected  java.util.HashMap toMap(java.lang.String request)
          maps a string representation of a request to a HashMap
private  void zoomIn(FormEvent event)
          the method perfomrs a "zoom in" on the map model.
 
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

ZoomInListener

public ZoomInListener()
Method Detail

actionPerformed

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

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

zoomIn

private void zoomIn(FormEvent event)
the method perfomrs a "zoom in" on the map model. This means the map will be zoomed and recentered onto a specified point or rectangle . Usually this will be the point the user clicked on the map or a rectangle he had drag with the mouse.


modifyModelToPointZoom

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

modifyModelToZoomInByRect

private WMSGetMapRequest modifyModelToZoomInByRect(WMSClientConfiguration config,
                                                   java.util.HashMap model)
                                            throws InconsistentRequestException,
                                                   XMLParsingException,
                                                   java.net.MalformedURLException
The method performs a "zoom in by rectangle" to the map model. This means that the map is set to a new bounding box that is smaller then the previous one. Usually the user defines the new bounding box by dragging a rectangle on the map.

Throws:
InconsistentRequestException
XMLParsingException
java.net.MalformedURLException

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.