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 ChatTranscriptTag extends javax.servlet.jsp.tagext.TagSupport 17 { 18 19 20 private String width = "*"; 21 22 23 private String height = "300"; 24 25 26 private String bgcolor = "lightyellow"; 27 28 29 public ChatTranscriptTag() 30 { 31 } 32 33 public int doStartTag() 34 { 35 try 36 { 37 JspWriter out = pageContext.getOut(); 38 39 out.println("<div id=\"transcript\" style=\"width:" 40 + width 41 + ";height:" 42 + height 43 + ";background-color:" 44 + bgcolor 45 + ";overflow:scroll\"></div>"); 46 47 } 48 catch (IOException ex) 49 { 50 return SKIP_PAGE; 51 } 52 53 return EVAL_PAGE; 54 } 55 56 57 61 public String getWidth() 62 { 63 return this.width; 64 } 65 66 70 public void setWidth(String width) 71 { 72 this.width = width; 73 } 74 75 79 public String getHeight() 80 { 81 return this.height; 82 } 83 84 88 public void setHeight(String height) 89 { 90 this.height = height; 91 } 92 93 97 public String getBgcolor() 98 { 99 return this.bgcolor; 100 } 101 102 106 public void setBgcolor(String bgcolor) 107 { 108 this.bgcolor = bgcolor; 109 } 110 111 } 112 | Popular Tags |