1 package com.lamatek.tags.google; 2 3 import java.io.Serializable ; 4 import java.util.Vector ; 5 6 import javax.servlet.jsp.tagext.BodyTagSupport ; 7 import javax.servlet.jsp.tagext.Tag ; 8 9 20 public class GoogleMapInfoWindowTabbedTag extends BodyTagSupport implements Serializable , InfoWindow { 21 22 boolean display = false; 23 Vector tabs = null; 24 String style = null; 25 String css_class = null; 26 29 public int doStartTag() { 30 return EVAL_BODY_INCLUDE; 31 } 32 35 public int doEndTag() { 36 Tag tag = this; 37 while (tag.getParent() != null) { 38 if (tag.getParent() instanceof GoogleMapMarkerTag) { 39 ((GoogleMapMarkerTag) tag.getParent()).setInfoWindow(this); 40 return EVAL_PAGE; 41 } 42 tag = tag.getParent(); 43 } 44 return EVAL_PAGE; 45 } 46 51 public void addTab(GoogleMapTabTag tab) { 52 if (tabs == null) 53 tabs = new Vector (); 54 tabs.addElement(tab); 55 } 56 61 public int getTabCount() { 62 if (tabs == null) 63 return 0; 64 else 65 return tabs.size(); 66 } 67 72 public GoogleMapTabTag getTab(int i) { 73 if (tabs == null) 74 return null; 75 else 76 return (GoogleMapTabTag) tabs.elementAt(i); 77 } 78 83 public boolean isTabbed() { 84 return true; 85 } 86 93 public boolean isDisplay() { 94 return display; 95 } 96 103 public void setDisplay(boolean display) { 104 this.display = display; 105 } 106 111 public String getStyle() { 112 return style; 113 } 114 119 public void setStyle(String style) { 120 this.style = style; 121 } 122 127 public String getCss_class() { 128 return css_class; 129 } 130 135 public void setCss_class(String css_class) { 136 this.css_class = css_class; 137 } 138 } 139 | Popular Tags |