1 package com.lamatek.tags.google; 2 3 import java.io.Serializable ; 4 import java.util.Vector ; 5 6 import javax.servlet.jsp.tagext.Tag ; 7 import javax.servlet.jsp.tagext.TagSupport ; 8 9 18 public class GoogleMapCircleTag extends TagSupport implements Serializable , GoogleMapEventListener { 19 20 String id = null; 21 String point = null; 22 double radius = 1.00d; 23 String color = "#ff0000"; 24 int weight = 2; 25 float opacity = 0.50f; 26 Vector events = null; 27 32 public int doStartTag() { 33 Tag tag = this; 34 while (tag.getParent() != null) { 35 if (tag.getParent() instanceof GoogleMapTag) { 36 ((GoogleMapTag) tag.getParent()).addCircle(this); 37 return SKIP_BODY; 38 } 39 tag = tag.getParent(); 40 } 41 return SKIP_BODY; 42 } 43 48 public void setColor(String color) { 49 this.color = color; 50 } 51 56 public void setOpacity(float opacity) { 57 this.opacity = opacity; 58 } 59 64 public void setRadius(double radius) { 65 this.radius = radius; 66 } 67 72 public double getRadius() { 73 return radius; 74 } 75 80 public void setWeight(int weight) { 81 this.weight = weight; 82 } 83 88 public String getPoint() { 89 return point; 90 } 91 96 public void setPoint(String point) { 97 this.point = point; 98 } 99 104 public String getColor() { 105 return color; 106 } 107 112 public float getOpacity() { 113 return opacity; 114 } 115 120 public int getWeight() { 121 return weight; 122 } 123 128 public String getId() { 129 return id; 130 } 131 136 public void setId(String id) { 137 this.id = id; 138 } 139 144 public void addEvent(GoogleMapEventTag event) { 145 if (events == null) 146 events = new Vector (); 147 events.add(event); 148 } 149 155 public Vector getEvents() { 156 return events; 157 } 158 } 159 | Popular Tags |