KickJava   Java API By Example, From Geeks To Geeks.

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


1 package com.lamatek.tags.google;
2
3 import java.io.Serializable JavaDoc;
4
5 import javax.servlet.jsp.tagext.Tag JavaDoc;
6 import javax.servlet.jsp.tagext.TagSupport JavaDoc;
7
8 /**
9  * GoogleMapWheelControlTag
10  *
11  * This class represents a <googlemaps;wheelControl> tag. Developers should not subclass or override this
12  * class or it's methods.
13  *
14  * @author Tom Cole
15  * @version 0.40
16  */

17 public class GoogleMapWheelControlTag extends TagSupport JavaDoc implements Serializable JavaDoc {
18     
19     boolean enable = false;
20     
21     public int doEndTag() {
22         Tag JavaDoc tag = this;
23         while (tag.getParent() != null) {
24             if (tag.getParent() instanceof GoogleMapTag) {
25                 ((GoogleMapTag) tag.getParent()).setWheelControl(this);
26                 return EVAL_PAGE;
27             }
28             tag = tag.getParent();
29         }
30         return EVAL_PAGE;
31     }
32     /**
33      * Denotes whether or not the map will allow the user to pan the map.
34      *
35      * @return True if users can pan the map, false if not.
36      */

37     public boolean isEnable() {
38         return enable;
39     }
40     /**
41      * Sets whether or not users should be allowed to pan the map. If set to
42      * false, users can only see the section of map currently displayed.
43      *
44      * @param enable True to let users pan, false otherwise.
45      */

46     public void setEnable(boolean enable) {
47         this.enable = enable;
48     }
49 }
50
Popular Tags