KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > quikj > application > web > talk > jspbeans > ChatStatusBarTag


1 /*
2  * ChatTranscriptTag.java
3  *
4  * Created on April 4, 2004, 8:42 AM
5  */

6
7 package com.quikj.application.web.talk.jspbeans;
8
9 import javax.servlet.jsp.*;
10 import java.io.*;
11
12 /**
13  *
14  * @author amit
15  */

16 public class ChatStatusBarTag extends javax.servlet.jsp.tagext.TagSupport JavaDoc
17 {
18     
19     /** Holds value of property width. */
20     private String JavaDoc width = "*";
21     
22     /** Holds value of property bgcolor. */
23     private String JavaDoc bgcolor = "lightgrey";
24     
25     /** Holds value of property label. */
26     private String JavaDoc label = "Please wait while we connect to an operator...";
27     
28     /** Creates a new instance of ChatTranscriptTag */
29     public ChatStatusBarTag()
30     {
31     }
32     
33     public int doStartTag()
34     {
35         try
36         {
37             JspWriter out = pageContext.getOut();
38  
39             out.println("<div id=\"status_bar\" style=\"width:"
40             + width
41             + ";height:30;"
42             + "background-color:"
43             + bgcolor + "\">");
44             out.println (label + "</div>");
45             
46         }
47         catch (IOException ex)
48         {
49             return SKIP_PAGE;
50         }
51         
52         return EVAL_PAGE;
53     }
54     
55     /** Getter for property width.
56      * @return Value of property width.
57      *
58      */

59     public String JavaDoc getWidth()
60     {
61         return this.width;
62     }
63     
64     /** Setter for property width.
65      * @param width New value of property width.
66      *
67      */

68     public void setWidth(String JavaDoc width)
69     {
70         this.width = width;
71     }
72     
73     /** Getter for property bgcolor.
74      * @return Value of property bgcolor.
75      *
76      */

77     public String JavaDoc getBgcolor()
78     {
79         return this.bgcolor;
80     }
81     
82     /** Setter for property bgcolor.
83      * @param bgcolor New value of property bgcolor.
84      *
85      */

86     public void setBgcolor(String JavaDoc bgcolor)
87     {
88         this.bgcolor = bgcolor;
89     }
90     
91     /** Getter for property label.
92      * @return Value of property label.
93      *
94      */

95     public String JavaDoc getLabel()
96     {
97         return this.label;
98     }
99     
100     /** Setter for property label.
101      * @param label New value of property label.
102      *
103      */

104     public void setLabel(String JavaDoc label)
105     {
106         this.label = label;
107     }
108     
109 }
110
Popular Tags