1 package com.lamatek.tags.google; 2 3 import java.io.Serializable ; 4 5 import javax.servlet.jsp.tagext.Tag ; 6 import javax.servlet.jsp.tagext.TagSupport ; 7 8 16 public class GoogleMapIconTag extends TagSupport implements Serializable { 17 18 String icon = null; 19 String shadow = null; 20 int iconWidth = 0; 21 int iconHeight = 0; 22 int shadowWidth = 0; 23 int shadowHeight = 0; 24 int anchorX = 0; 25 int anchorY = 0; 26 int infoWindowAnchorX = 0; 27 int infoWindowAnchorY = 0; 28 31 public int doStartTag() { 32 Tag tag = this; 33 while (tag.getParent() != null) { 34 if (tag.getParent() instanceof GoogleMapMarkerTag) { 35 ((GoogleMapMarkerTag) tag.getParent()).setIcon(this); 36 return SKIP_BODY; 37 } 38 else if (tag.getParent() instanceof GoogleMapTrafficTag) { 39 ((GoogleMapTrafficTag) tag.getParent()).setIcon(this); 40 return SKIP_BODY; 41 } 42 else if (tag.getParent() instanceof GoogleMapClusterTag) { 43 ((GoogleMapClusterTag) tag.getParent()).setIcon(this); 44 return SKIP_BODY; 45 } 46 tag = tag.getParent(); 47 } 48 return SKIP_BODY; 49 } 50 55 public int getAnchorX() { 56 return anchorX; 57 } 58 64 public void setAnchorX(int anchorX) { 65 this.anchorX = anchorX; 66 } 67 72 public int getAnchorY() { 73 return anchorY; 74 } 75 81 public void setAnchorY(int anchorY) { 82 this.anchorY = anchorY; 83 } 84 90 public String getIcon() { 91 return icon; 92 } 93 99 public void setIcon(String icon) { 100 this.icon = icon; 101 } 102 107 public int getIconHeight() { 108 return iconHeight; 109 } 110 115 public void setIconHeight(int iconHeight) { 116 this.iconHeight = iconHeight; 117 } 118 123 public int getIconWidth() { 124 return iconWidth; 125 } 126 131 public void setIconWidth(int iconWidth) { 132 this.iconWidth = iconWidth; 133 } 134 139 public int getInfoWindowAnchorX() { 140 return infoWindowAnchorX; 141 } 142 147 public void setInfoWindowAnchorX(int infoWindowAnchorX) { 148 this.infoWindowAnchorX = infoWindowAnchorX; 149 } 150 155 public int getInfoWindowAnchorY() { 156 return infoWindowAnchorY; 157 } 158 163 public void setInfoWindowAnchorY(int infoWindowAnchorY) { 164 this.infoWindowAnchorY = infoWindowAnchorY; 165 } 166 172 public String getShadow() { 173 return shadow; 174 } 175 181 public void setShadow(String shadow) { 182 this.shadow = shadow; 183 } 184 189 public int getShadowHeight() { 190 return shadowHeight; 191 } 192 197 public void setShadowHeight(int shadowHeight) { 198 this.shadowHeight = shadowHeight; 199 } 200 205 public int getShadowWidth() { 206 return shadowWidth; 207 } 208 213 public void setShadowWidth(int shadowWidth) { 214 this.shadowWidth = shadowWidth; 215 } 216 } 217 | Popular Tags |