KickJava   Java API By Example, From Geeks To Geeks.

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


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.UIComponentTagBase;
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 17:19:29 $
26  * $Log: HtmlComponentTagBase.java,v $
27  * Revision 1.4 2005/02/18 17:19:29 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 HtmlComponentTagBase
41         extends UIComponentTagBase
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
67         _dir=null;
68         _lang=null;
69         _style=null;
70         _styleClass=null;
71         _title=null;
72         _onclick=null;
73         _ondblclick=null;
74         _onkeydown=null;
75         _onkeypress=null;
76         _onkeyup=null;
77         _onmousedown=null;
78         _onmousemove=null;
79         _onmouseout=null;
80         _onmouseover=null;
81         _onmouseup=null;
82
83     }
84
85     protected void setProperties(UIComponent component)
86     {
87         super.setProperties(component);
88         setStringProperty(component, HTML.DIR_ATTR, _dir);
89         setStringProperty(component, HTML.LANG_ATTR, _lang);
90         setStringProperty(component, HTML.STYLE_ATTR, _style);
91         setStringProperty(component, HTML.TITLE_ATTR, _title);
92         setStringProperty(component, HTML.STYLE_CLASS_ATTR, _styleClass);
93         setStringProperty(component, HTML.ONCLICK_ATTR, _onclick);
94         setStringProperty(component, HTML.ONDBLCLICK_ATTR, _ondblclick);
95         setStringProperty(component, HTML.ONMOUSEDOWN_ATTR, _onmousedown);
96         setStringProperty(component, HTML.ONMOUSEUP_ATTR, _onmouseup);
97         setStringProperty(component, HTML.ONMOUSEOVER_ATTR, _onmouseover);
98         setStringProperty(component, HTML.ONMOUSEMOVE_ATTR, _onmousemove);
99         setStringProperty(component, HTML.ONMOUSEOUT_ATTR, _onmouseout);
100         setStringProperty(component, HTML.ONKEYPRESS_ATTR, _onkeypress);
101         setStringProperty(component, HTML.ONKEYDOWN_ATTR, _onkeydown);
102         setStringProperty(component, HTML.ONKEYUP_ATTR, _onkeyup);
103     }
104
105     public void setStyleClass(String JavaDoc styleClass)
106     {
107         _styleClass = styleClass;
108     }
109
110     public void setDir(String JavaDoc dir)
111     {
112         _dir = dir;
113     }
114
115     public void setLang(String JavaDoc lang)
116     {
117         _lang = lang;
118     }
119
120     public void setStyle(String JavaDoc style)
121     {
122         _style = style;
123     }
124
125     public void setTitle(String JavaDoc title)
126     {
127         _title = title;
128     }
129
130     public void setOnclick(String JavaDoc onclick)
131     {
132         _onclick = onclick;
133     }
134
135     public void setOndblclick(String JavaDoc ondblclick)
136     {
137         _ondblclick = ondblclick;
138     }
139
140     public void setOnmousedown(String JavaDoc onmousedown)
141     {
142         _onmousedown = onmousedown;
143     }
144
145     public void setOnmouseup(String JavaDoc onmouseup)
146     {
147         _onmouseup = onmouseup;
148     }
149
150     public void setOnmouseover(String JavaDoc onmouseover)
151     {
152         _onmouseover = onmouseover;
153     }
154
155     public void setOnmousemove(String JavaDoc onmousemove)
156     {
157         _onmousemove = onmousemove;
158     }
159
160     public void setOnmouseout(String JavaDoc onmouseout)
161     {
162         _onmouseout = onmouseout;
163     }
164
165     public void setOnkeypress(String JavaDoc onkeypress)
166     {
167         _onkeypress = onkeypress;
168     }
169
170     public void setOnkeydown(String JavaDoc onkeydown)
171     {
172         _onkeydown = onkeydown;
173     }
174
175     public void setOnkeyup(String JavaDoc onkeyup)
176     {
177         _onkeyup = onkeyup;
178     }
179 }
180
Popular Tags