KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > myfaces > taglib > html > HtmlPanelGridTagBase


1 /*
2  * Copyright 2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.myfaces.taglib.html;
17
18 import org.apache.myfaces.renderkit.JSFAttr;
19 import org.apache.myfaces.renderkit.html.HTML;
20
21 import javax.faces.component.UIComponent;
22
23 /**
24  * @author Manfred Geiler (latest modification by $Author: matzew $)
25  * @version $Revision: 1.4 $ $Date: 2005/02/18 18:24:35 $
26  * $Log: HtmlPanelGridTagBase.java,v $
27  * Revision 1.4 2005/02/18 18:24:35 matzew
28  * added release() to tag clazzes.
29  *
30  * Revision 1.3 2004/10/13 11:51:01 matze
31  * renamed packages to org.apache
32  *
33  * Revision 1.2 2004/07/01 22:01:11 mwessendorf
34  * ASF switch
35  *
36  * Revision 1.1 2004/04/01 12:57:44 manolito
37  * additional extended component classes for user role support
38  *
39  */

40 public abstract class HtmlPanelGridTagBase
41         extends HtmlComponentBodyTagBase
42 {
43     //private static final Log log = LogFactory.getLog(HtmlPanelGridTag.class);
44

45     // UIComponent attributes --> already implemented in UIComponentTagBase
46

47     // user role attributes --> already implemented in UIComponentTagBase
48

49     // HTML universal attributes --> already implemented in HtmlComponentTagBase
50

51     // HTML event handler attributes --> already implemented in HtmlComponentTagBase
52

53     // HTML table attributes relevant for Grid
54
private String JavaDoc _align;
55     private String JavaDoc _border;
56     private String JavaDoc _bgcolor;
57     private String JavaDoc _cellpadding;
58     private String JavaDoc _cellspacing;
59     private String JavaDoc _datafld;
60     private String JavaDoc _datasrc;
61     private String JavaDoc _dataformatas;
62     private String JavaDoc _frame;
63     private String JavaDoc _rules;
64     private String JavaDoc _summary;
65     private String JavaDoc _width;
66
67     // UIPanel attributes
68
// value and converterId --> already implemented in UIComponentTagBase
69

70     // HtmlPanelGrid attributes
71
private String JavaDoc _columnClasses;
72     private String JavaDoc _columns;
73     private String JavaDoc _footerClass;
74     private String JavaDoc _headerClass;
75     private String JavaDoc _rowClasses;
76
77     public void release() {
78         super.release();
79         _align=null;
80         _border=null;
81         _bgcolor=null;
82         _cellpadding=null;
83         _cellspacing=null;
84         _datafld=null;
85         _datasrc=null;
86         _dataformatas=null;
87         _frame=null;
88         _rules=null;
89         _summary=null;
90         _width=null;
91         _columnClasses=null;
92         _columns=null;
93         _footerClass=null;
94         _headerClass=null;
95         _rowClasses=null;
96     }
97     
98     protected void setProperties(UIComponent component)
99     {
100         super.setProperties(component);
101
102         setStringProperty(component, HTML.ALIGN_ATTR, _align);
103         setIntegerProperty(component, HTML.BORDER_ATTR, _border);
104         setStringProperty(component, HTML.BGCOLOR_ATTR, _bgcolor);
105         setStringProperty(component, HTML.CELLPADDING_ATTR, _cellpadding);
106         setStringProperty(component, HTML.CELLSPACING_ATTR, _cellspacing);
107         setStringProperty(component, HTML.DATAFLD_ATTR, _datafld);
108         setStringProperty(component, HTML.DATASRC_ATTR, _datasrc);
109         setStringProperty(component, HTML.DATAFORMATAS_ATTR, _dataformatas);
110         setStringProperty(component, HTML.FRAME_ATTR, _frame);
111         setStringProperty(component, HTML.RULES_ATTR, _rules);
112         setStringProperty(component, HTML.SUMMARY_ATTR, _summary);
113         setStringProperty(component, HTML.WIDTH_ATTR, _width);
114
115         setStringProperty(component, JSFAttr.COLUMN_CLASSES_ATTR, _columnClasses);
116         setIntegerProperty(component, JSFAttr.COLUMNS_ATTR, _columns);
117         setStringProperty(component, JSFAttr.FOOTER_CLASS_ATTR, _footerClass);
118         setStringProperty(component, JSFAttr.HEADER_CLASS_ATTR, _headerClass);
119         setStringProperty(component, JSFAttr.ROW_CLASSES_ATTR, _rowClasses);
120     }
121
122
123     public void setAlign(String JavaDoc align)
124     {
125         _align = align;
126     }
127
128     public void setBorder(String JavaDoc border)
129     {
130         _border = border;
131     }
132
133     public void setBgcolor(String JavaDoc bgcolor)
134     {
135         _bgcolor = bgcolor;
136     }
137
138     public void setCellpadding(String JavaDoc cellpadding)
139     {
140         _cellpadding = cellpadding;
141     }
142
143     public void setCellspacing(String JavaDoc cellspacing)
144     {
145         _cellspacing = cellspacing;
146     }
147
148     public void setDatafld(String JavaDoc datafld)
149     {
150         _datafld = datafld;
151     }
152
153     public void setDatasrc(String JavaDoc datasrc)
154     {
155         _datasrc = datasrc;
156     }
157
158     public void setDataformatas(String JavaDoc dataformatas)
159     {
160         _dataformatas = dataformatas;
161     }
162
163     public void setFrame(String JavaDoc frame)
164     {
165         _frame = frame;
166     }
167
168     public void setRules(String JavaDoc rules)
169     {
170         _rules = rules;
171     }
172
173     public void setSummary(String JavaDoc summary)
174     {
175         _summary = summary;
176     }
177
178     public void setWidth(String JavaDoc width)
179     {
180         _width = width;
181     }
182
183     public void setColumnClasses(String JavaDoc columnClasses)
184     {
185         _columnClasses = columnClasses;
186     }
187
188     public void setColumns(String JavaDoc columns)
189     {
190         _columns = columns;
191     }
192
193     public void setFooterClass(String JavaDoc footerClass)
194     {
195         _footerClass = footerClass;
196     }
197
198     public void setHeaderClass(String JavaDoc headerClass)
199     {
200         _headerClass = headerClass;
201     }
202
203     public void setRowClasses(String JavaDoc rowClasses)
204     {
205         _rowClasses = rowClasses;
206     }
207 }
208
Popular Tags