KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas > webapp > taglib > GridTableBaseTag


1 /*
2  * JOnAS: Java(TM) Open Application Server
3  * Copyright (C) 1999 Bull S.A.
4  * Contact: jonas-team@objectweb.org
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19  * USA
20  *
21  * Initial developer(s): Michel-Ange ANTON
22  * --------------------------------------------------------------------------
23  * $Id: GridTableBaseTag.java,v 1.4 2004/03/26 16:16:12 benoitf Exp $
24  * --------------------------------------------------------------------------
25  */

26
27 package org.objectweb.jonas.webapp.taglib;
28
29 import javax.servlet.jsp.JspException JavaDoc;
30
31 public class GridTableBaseTag extends GridBaseTag {
32
33 // ----------------------------------------------------- Properties
34

35     private String JavaDoc align = null;
36     private String JavaDoc valign = null;
37     private String JavaDoc width = null;
38     private String JavaDoc height = null;
39
40     /**
41      * Return the Alignment
42      */

43     public String JavaDoc getAlign() {
44         return (this.align);
45     }
46
47     /**
48      * Set the Alignment
49      *
50      * @param Value for Alignment
51      */

52     public void setAlign(String JavaDoc align) {
53         this.align = align;
54     }
55
56     /**
57      * Return the Vertical Alignment
58      */

59     public String JavaDoc getValign() {
60         return (this.valign);
61     }
62
63     /**
64      * Set the Vertical Alignment
65      *
66      * @param Value for Vertical Alignment
67      */

68
69     public void setValign(String JavaDoc valign) {
70         this.valign = valign;
71     }
72
73     public String JavaDoc getWidth() {
74         return width;
75     }
76
77     public void setWidth(String JavaDoc width) {
78         this.width = width;
79     }
80
81     public String JavaDoc getHeight() {
82         return height;
83     }
84
85     public void setHeight(String JavaDoc height) {
86         this.height = height;
87     }
88
89 // ----------------------------------------------------- Protected Methods
90

91     /**
92      * Return the HTML element.
93      */

94     protected String JavaDoc getHtmlElement() {
95         return "table";
96     }
97
98     /**
99      * Prepare the attributes of the HTML element
100      */

101     protected String JavaDoc prepareAttributes() throws JspException JavaDoc {
102         StringBuffer JavaDoc sb = new StringBuffer JavaDoc();
103
104         // Append "width" parameter
105
sb.append(prepareAttribute("width", width));
106         // Append "height" parameter
107
sb.append(prepareAttribute("height", height));
108         // Append "align" parameter
109
sb.append(prepareAttribute("align", align));
110         // Append "valign" parameter
111
sb.append(prepareAttribute("valign", valign));
112
113         // Append Event Handler details
114
sb.append(super.prepareAttributes());
115
116         return sb.toString();
117
118     }
119
120 // ----------------------------------------------------- Public Methods
121

122     /**
123      * Release resources after Tag processing has finished.
124      */

125     public void release() {
126         super.release();
127         align = null;
128         valign = null;
129         width = null;
130         height = null;
131     }
132 }
Popular Tags