| 1 6 7 package com.quikj.application.web.talk.jspbeans; 8 9 import javax.servlet.jsp.*; 10 import java.io.*; 11 12 16 public class ChatMediaBarTag extends javax.servlet.jsp.tagext.TagSupport  17 { 18 19 20 private String sendLabel = "Send"; 21 22 23 private String buzzLabel = "Buzz"; 24 25 26 private String webPageLabel = "Web Page"; 27 28 29 private String webPageSendLabel = "Send"; 30 31 32 private String bgcolor = "lightgrey"; 33 34 35 private String width = "100%"; 36 37 38 private String showBuzz = "yes"; 39 40 41 private String showWebPage = "yes"; 42 43 44 public ChatMediaBarTag() 45 { 46 } 47 48 public int doStartTag() 49 { 50 try 51 { 52 JspWriter out = pageContext.getOut(); 53 54 out.println("<div id=\"media_bar\" style=\"visibility:hidden\">" 55 + "<table border=\"1\" cellpadding=\"3\" width=\"" 56 + width 57 + "\" bgcolor=\"" 58 + bgcolor 59 + "\" style=\"border-style:solid;\">"); 60 61 out.println("<tr id=\"media_table\">"); 62 out.println("<td align=\"left\" style=\"border-width:0px;\"><b>" 63 + sendLabel + " </b></td>"); 64 65 if (showBuzz.equals("yes") == true) 66 { 67 out.println("<td align=\"center\" style=\"border-style:solid;\">" 68 + "<input type=\"submit\" name=\"buzz\" value=\"" 69 + buzzLabel + "\" onclick='return chat.sendMedia(\"buzz\")'></td>"); 70 } 71 72 if (showWebPage.equals("yes") == true) 73 { 74 out.println("<td align=\"center\" style=\"border-style:solid;\">" 75 + webPageLabel + " "); 76 out.println("<input type=\"text\" name=\"href\" size=\"30\" onkeypress=\"return chat.hrefKeyPressed(event)\"> "); 77 out.println("<input type=\"submit\" name=\"send_href\" value=\"" 78 + webPageSendLabel + "\" onclick='return chat.sendMedia(\"href\", document.chat_form.href.value)'></td>"); 79 } 80 81 out.println("</tr></table></div>"); 82 83 } 84 catch (IOException ex) 85 { 86 return SKIP_PAGE; 87 } 88 89 return EVAL_PAGE; 90 } 91 92 96 public String getSendLabel() 97 { 98 return this.sendLabel; 99 } 100 101 105 public void setSendLabel(String sendLabel) 106 { 107 this.sendLabel = sendLabel; 108 } 109 110 114 public String getBuzzLabel() 115 { 116 return this.buzzLabel; 117 } 118 119 123 public void setBuzzLabel(String buzzLabel) 124 { 125 this.buzzLabel = buzzLabel; 126 } 127 128 132 public String getWebPageLabel() 133 { 134 return this.webPageLabel; 135 } 136 137 141 public void setWebPageLabel(String webPageLabel) 142 { 143 this.webPageLabel = webPageLabel; 144 } 145 146 150 public String getWebPageSendLabel() 151 { 152 return this.webPageSendLabel; 153 } 154 155 159 public void setWebPageSendLabel(String webPageSendLabel) 160 { 161 this.webPageSendLabel = webPageSendLabel; 162 } 163 164 168 public String getBgcolor() 169 { 170 return this.bgcolor; 171 } 172 173 177 public void setBgcolor(String bgcolor) 178 { 179 this.bgcolor = bgcolor; 180 } 181 182 186 public String getWidth() 187 { 188 return this.width; 189 } 190 191 195 public void setWidth(String width) 196 { 197 this.width = width; 198 } 199 200 204 public String getShowBuzz() 205 { 206 return this.showBuzz; 207 } 208 209 213 public void setShowBuzz(String showBuzz) 214 { 215 this.showBuzz = showBuzz; 216 } 217 218 222 public String getShowWebPage() 223 { 224 return this.showWebPage; 225 } 226 227 231 public void setShowWebPage(String showWebPage) 232 { 233 this.showWebPage = showWebPage; 234 } 235 236 } 237 | Popular Tags |