KickJava   Java API By Example, From Geeks To Geeks.

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


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.html.HTML;
19 import org.apache.myfaces.taglib.UIComponentBodyTagBase;
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: HtmlComponentBodyTagBase.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/03/30 13:24:59 manolito
37  * refactoring: HtmlComponentTag moved to share and renamed to HtmlComponentTagBase
38  *
39  */

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

45     //HTML universal attributes
46
private String JavaDoc _dir;
47     private String JavaDoc _lang;
48     private String JavaDoc _style;
49     private String JavaDoc _styleClass;
50     private String JavaDoc _title;
51
52     //HTML event handler attributes
53
private String JavaDoc _onclick;
54     private String JavaDoc _ondblclick;
55     private String JavaDoc _onkeydown;
56     private String JavaDoc _onkeypress;
57     private String JavaDoc _onkeyup;
58     private String JavaDoc _onmousedown;
59     private String JavaDoc _onmousemove;
60     private String JavaDoc _onmouseout;
61     private String JavaDoc _onmouseover;
62     private String JavaDoc _onmouseup;
63
64     public void release() {
65         super.release();
66         _dir=null;
67         _lang=null;
68         _style=null;
69         _styleClass=null;
70         _title=null;
71         _onclick=null;
72         _ondblclick=null;
73         _onkeydown=null;
74         _onkeypress=null;
75         _onkeyup=null;
76         _onmousedown=null;
77         _onmousemove=null;
78         _onmouseout=null;
79         _onmouseover=null;
80         _onmouseup=null;
81     }
82     
83     protected void setProperties(UIComponent component)
84     {
85         super.setProperties(component);
86         setStringProperty(component, HTML.DIR_ATTR, _dir);
87         setStringProperty(component, HTML.LANG_ATTR, _lang);
88         setStringProperty(component, HTML.STYLE_ATTR, _style);
89         setStringProperty(component, HTML.TITLE_ATTR, _title);
90         setStringProperty(component, HTML.STYLE_CLASS_ATTR, _styleClass);
91         setStringProperty(component, HTML.ONCLICK_ATTR, _onclick);
92         setStringProperty(component, HTML.ONDBLCLICK_ATTR, _ondblclick);
93         setStringProperty(component, HTML.ONMOUSEDOWN_ATTR, _onmousedown);
94         setStringProperty(component, HTML.ONMOUSEUP_ATTR, _onmouseup);
95         setStringProperty(component, HTML.ONMOUSEOVER_ATTR, _onmouseover);
96         setStringProperty(component, HTML.ONMOUSEMOVE_ATTR, _onmousemove);
97         setStringProperty(component, HTML.ONMOUSEOUT_ATTR, _onmouseout);
98         setStringProperty(component, HTML.ONKEYPRESS_ATTR, _onkeypress);
99         setStringProperty(component, HTML.ONKEYDOWN_ATTR, _onkeydown);
100         setStringProperty(component, HTML.ONKEYUP_ATTR, _onkeyup);
101     }
102
103     public void setStyleClass(String JavaDoc styleClass)
104     {
105         _styleClass = styleClass;
106     }
107
108     public void setDir(String JavaDoc dir)
109     {
110         _dir = dir;
111     }
112
113     public void setLang(String JavaDoc lang)
114     {
115         _lang = lang;
116     }
117
118     public void setStyle(String JavaDoc style)
119     {
120         _style = style;
121     }
122
123     public void setTitle(String JavaDoc title)
124     {
125         _title = title;
126     }
127
128     public void setOnclick(String JavaDoc onclick)
129     {
130         _onclick = onclick;
131     }
132
133     public void setOndblclick(String JavaDoc ondblclick)
134     {
135         _ondblclick = ondblclick;
136     }
137
138     public void setOnmousedown(String JavaDoc onmousedown)
139     {
140         _onmousedown = onmousedown;
141     }
142
143     public void setOnmouseup(String JavaDoc onmouseup)
144     {
145         _onmouseup = onmouseup;
146     }
147
148     public void setOnmouseover(String JavaDoc onmouseover)
149     {
150         _onmouseover = onmouseover;
151     }
152
153     public void setOnmousemove(String JavaDoc onmousemove)
154     {
155         _onmousemove = onmousemove;
156     }
157
158     public void setOnmouseout(String JavaDoc onmouseout)
159     {
160         _onmouseout = onmouseout;
161     }
162
163     public void setOnkeypress(String JavaDoc onkeypress)
164     {
165         _onkeypress = onkeypress;
166     }
167
168     public void setOnkeydown(String JavaDoc onkeydown)
169     {
170         _onkeydown = onkeydown;
171     }
172
173     public void setOnkeyup(String JavaDoc onkeyup)
174     {
175         _onkeyup = onkeyup;
176     }
177 }
178
Popular Tags