KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > lamatek > tags > google > GoogleMapEventHandler


1 package com.lamatek.tags.google;
2
3 import javax.servlet.ServletRequest JavaDoc;
4
5 /**
6  * GoogleMapEventHandler
7  *
8  * This interface defines the behaviour of classes that receive GoogleMaps events.
9  * Developers should not override this interface, but Objects that are used to
10  * handle events should either implement this interface or (better yet) extend
11  * the DefaultEventListenerBean or DefaultEventListenerServlet.
12  *
13  * @author Tom Cole
14  * @version 0.40
15  */

16 public interface GoogleMapEventHandler {
17     
18     /**
19      * This method is called after all the event based methods have been called.
20      * Developers can use this method to handle non-event based requests.
21      *
22      * The default implementation is empty to there is no need to call
23      * super.process().
24      *
25      * @param map The GoogleMapTag that generated the event.
26      * @param request The original ServletRequest.
27      */

28     public void process(GoogleMapTag map, ServletRequest JavaDoc request);
29     /**
30      * This method is called if a click event is detected that was generated
31      * by an overlay (box, circle, marker, polygon, polyline).
32      *
33      * The default implementation is empty so there is no need to call
34      * super.processMarkerClickEvent().
35      *
36      * @param map The GoogleMapTag parent of the marker clicked.
37      * @param id The id of the overlay that was clicked.
38      * @param type The type of overlay clicked (marker, box, circle, polygon, polyline)
39      */

40     public void processOverlayClickEvent(GoogleMapTag map, String JavaDoc id, String JavaDoc type);
41     /**
42      * This method is called when a click event is detected that was generated
43      * by a GoogleMapTag (<googlemaps:map>).
44      *
45      * The default implementation of this method is empty so there is no need
46      * to call super.processClickEvent().
47      *
48      * @param map The GoogleMapTag that generated the event.
49      * @param longitude The longitude (in decimal form) where the click occured.
50      * @param latitude The latitude (in decimal form) where the click occured.
51      */

52     public void processClickEvent(GoogleMapTag map, double longitude, double latitude);
53     /**
54      * This method is called when a double-click event is detected that was
55      * generated by an overlay (box, circle, marker, polygon, polyline).
56      *
57      * The default implementation of this method is empty so there is no need
58      * to call super.processMarkerDoubleClickEvent().
59      *
60      * @param map The GoogleMapTag parent of the marker double-clicked.
61      * @param id The id of the overlay double-clicked.
62      * @param type The type of overlay double-clicked (marker, circle, box, polygon, polyline)
63      */

64     public void processOverlayDoubleClickEvent(GoogleMapTag map, String JavaDoc id, String JavaDoc type);
65     /**
66      * This method is called when a double-click event is detected that was
67      * generated by a GoogleMapTag (<googlemaps:map>).
68      *
69      * The default implementation of this method is empty so there is no
70      * need to call super.processDoubleClickEvent().
71      *
72      * @param map The GoogleMapTag that generated the event.
73      * @param longitude The longitude (in decimal form) where the double-click occured.
74      * @param latitude The latitude (in decimal form) where the double-click occured.
75      */

76     public void processDoubleClickEvent(GoogleMapTag map, double longitude, double latitude);
77     /**
78      * This method is called when a zoom event is detected.
79      *
80      * The default implementation of this method simulates the default behaviour of
81      * a Google Map and any subclasses should call super.processZoomEvent() to
82      * ensure consistent behaviour.
83      *
84      * @param map The GoogleMapTag that generated the event.
85      * @param zoom The new requested zoom level.
86      */

87     public void processZoomEvent(GoogleMapTag map, int zoom);
88     /**
89      * This method is called when a moveend event is detected.
90      *
91      * The default implementation of this method simulates the default behaviour of
92      * a Google Map and any subclasses should call super.processMoveEndEvent() to
93      * ensure consistent behaviour.
94      *
95      * @param map The GoogleMapTag that generated the event.
96      * @param longitude The new center longitude (in decimal form).
97      * @param latitude The new center latitude (in decimal form).
98      */

99     public void processMoveEndEvent(GoogleMapTag map, double longitude, double latitude);
100     /**
101      * This method is called when a maptypechanged event is detected.
102      *
103      * The default implementation of this method simulates the default behaviour of
104      * a Google Map and any subclasses should call super.processMapTypeChangedEvent() to
105      * ensure consistent behaviour.
106      *
107      * @param map The GoogleMapTag that generated the event.
108      * @param type The new requested map type (map | satellite | hybrid).
109      */

110     public void processMapTypeChangedEvent(GoogleMapTag map, String JavaDoc type);
111
112 }
113
Popular Tags