KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > faces > component > html > HtmlSelectBooleanCheckbox


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 javax.faces.component.html;
17
18 import javax.faces.component.UISelectBoolean;
19 import javax.faces.context.FacesContext;
20 import javax.faces.el.ValueBinding;
21
22 /**
23  * @author Thomas Spiegl (latest modification by $Author: mwessendorf $)
24  * @version $Revision: 1.2 $ $Date: 2004/07/01 22:01:16 $
25  */

26 public class HtmlSelectBooleanCheckbox extends UISelectBoolean
27 {
28     //------------------ GENERATED CODE BEGIN (do not modify!) --------------------
29

30     public static final String JavaDoc COMPONENT_TYPE = "javax.faces.HtmlSelectBooleanCheckbox";
31     private static final String JavaDoc DEFAULT_RENDERER_TYPE = "javax.faces.Checkbox";
32     private static final boolean DEFAULT_DISABLED = false;
33     private static final boolean DEFAULT_READONLY = false;
34
35     private String JavaDoc _accesskey = null;
36     private String JavaDoc _dir = null;
37     private Boolean JavaDoc _disabled = null;
38     private String JavaDoc _lang = null;
39     private String JavaDoc _onblur = null;
40     private String JavaDoc _onchange = null;
41     private String JavaDoc _onclick = null;
42     private String JavaDoc _ondblclick = null;
43     private String JavaDoc _onfocus = null;
44     private String JavaDoc _onkeydown = null;
45     private String JavaDoc _onkeypress = null;
46     private String JavaDoc _onkeyup = null;
47     private String JavaDoc _onmousedown = null;
48     private String JavaDoc _onmousemove = null;
49     private String JavaDoc _onmouseout = null;
50     private String JavaDoc _onmouseover = null;
51     private String JavaDoc _onmouseup = null;
52     private String JavaDoc _onselect = null;
53     private Boolean JavaDoc _readonly = null;
54     private String JavaDoc _style = null;
55     private String JavaDoc _styleClass = null;
56     private String JavaDoc _tabindex = null;
57     private String JavaDoc _title = null;
58
59     public HtmlSelectBooleanCheckbox()
60     {
61         setRendererType(DEFAULT_RENDERER_TYPE);
62     }
63
64
65     public void setAccesskey(String JavaDoc accesskey)
66     {
67         _accesskey = accesskey;
68     }
69
70     public String JavaDoc getAccesskey()
71     {
72         if (_accesskey != null) return _accesskey;
73         ValueBinding vb = getValueBinding("accesskey");
74         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
75     }
76
77     public void setDir(String JavaDoc dir)
78     {
79         _dir = dir;
80     }
81
82     public String JavaDoc getDir()
83     {
84         if (_dir != null) return _dir;
85         ValueBinding vb = getValueBinding("dir");
86         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
87     }
88
89     public void setDisabled(boolean disabled)
90     {
91         _disabled = Boolean.valueOf(disabled);
92     }
93
94     public boolean isDisabled()
95     {
96         if (_disabled != null) return _disabled.booleanValue();
97         ValueBinding vb = getValueBinding("disabled");
98         Boolean JavaDoc v = vb != null ? (Boolean JavaDoc)vb.getValue(getFacesContext()) : null;
99         return v != null ? v.booleanValue() : DEFAULT_DISABLED;
100     }
101
102     public void setLang(String JavaDoc lang)
103     {
104         _lang = lang;
105     }
106
107     public String JavaDoc getLang()
108     {
109         if (_lang != null) return _lang;
110         ValueBinding vb = getValueBinding("lang");
111         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
112     }
113
114     public void setOnblur(String JavaDoc onblur)
115     {
116         _onblur = onblur;
117     }
118
119     public String JavaDoc getOnblur()
120     {
121         if (_onblur != null) return _onblur;
122         ValueBinding vb = getValueBinding("onblur");
123         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
124     }
125
126     public void setOnchange(String JavaDoc onchange)
127     {
128         _onchange = onchange;
129     }
130
131     public String JavaDoc getOnchange()
132     {
133         if (_onchange != null) return _onchange;
134         ValueBinding vb = getValueBinding("onchange");
135         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
136     }
137
138     public void setOnclick(String JavaDoc onclick)
139     {
140         _onclick = onclick;
141     }
142
143     public String JavaDoc getOnclick()
144     {
145         if (_onclick != null) return _onclick;
146         ValueBinding vb = getValueBinding("onclick");
147         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
148     }
149
150     public void setOndblclick(String JavaDoc ondblclick)
151     {
152         _ondblclick = ondblclick;
153     }
154
155     public String JavaDoc getOndblclick()
156     {
157         if (_ondblclick != null) return _ondblclick;
158         ValueBinding vb = getValueBinding("ondblclick");
159         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
160     }
161
162     public void setOnfocus(String JavaDoc onfocus)
163     {
164         _onfocus = onfocus;
165     }
166
167     public String JavaDoc getOnfocus()
168     {
169         if (_onfocus != null) return _onfocus;
170         ValueBinding vb = getValueBinding("onfocus");
171         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
172     }
173
174     public void setOnkeydown(String JavaDoc onkeydown)
175     {
176         _onkeydown = onkeydown;
177     }
178
179     public String JavaDoc getOnkeydown()
180     {
181         if (_onkeydown != null) return _onkeydown;
182         ValueBinding vb = getValueBinding("onkeydown");
183         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
184     }
185
186     public void setOnkeypress(String JavaDoc onkeypress)
187     {
188         _onkeypress = onkeypress;
189     }
190
191     public String JavaDoc getOnkeypress()
192     {
193         if (_onkeypress != null) return _onkeypress;
194         ValueBinding vb = getValueBinding("onkeypress");
195         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
196     }
197
198     public void setOnkeyup(String JavaDoc onkeyup)
199     {
200         _onkeyup = onkeyup;
201     }
202
203     public String JavaDoc getOnkeyup()
204     {
205         if (_onkeyup != null) return _onkeyup;
206         ValueBinding vb = getValueBinding("onkeyup");
207         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
208     }
209
210     public void setOnmousedown(String JavaDoc onmousedown)
211     {
212         _onmousedown = onmousedown;
213     }
214
215     public String JavaDoc getOnmousedown()
216     {
217         if (_onmousedown != null) return _onmousedown;
218         ValueBinding vb = getValueBinding("onmousedown");
219         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
220     }
221
222     public void setOnmousemove(String JavaDoc onmousemove)
223     {
224         _onmousemove = onmousemove;
225     }
226
227     public String JavaDoc getOnmousemove()
228     {
229         if (_onmousemove != null) return _onmousemove;
230         ValueBinding vb = getValueBinding("onmousemove");
231         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
232     }
233
234     public void setOnmouseout(String JavaDoc onmouseout)
235     {
236         _onmouseout = onmouseout;
237     }
238
239     public String JavaDoc getOnmouseout()
240     {
241         if (_onmouseout != null) return _onmouseout;
242         ValueBinding vb = getValueBinding("onmouseout");
243         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
244     }
245
246     public void setOnmouseover(String JavaDoc onmouseover)
247     {
248         _onmouseover = onmouseover;
249     }
250
251     public String JavaDoc getOnmouseover()
252     {
253         if (_onmouseover != null) return _onmouseover;
254         ValueBinding vb = getValueBinding("onmouseover");
255         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
256     }
257
258     public void setOnmouseup(String JavaDoc onmouseup)
259     {
260         _onmouseup = onmouseup;
261     }
262
263     public String JavaDoc getOnmouseup()
264     {
265         if (_onmouseup != null) return _onmouseup;
266         ValueBinding vb = getValueBinding("onmouseup");
267         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
268     }
269
270     public void setOnselect(String JavaDoc onselect)
271     {
272         _onselect = onselect;
273     }
274
275     public String JavaDoc getOnselect()
276     {
277         if (_onselect != null) return _onselect;
278         ValueBinding vb = getValueBinding("onselect");
279         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
280     }
281
282     public void setReadonly(boolean readonly)
283     {
284         _readonly = Boolean.valueOf(readonly);
285     }
286
287     public boolean isReadonly()
288     {
289         if (_readonly != null) return _readonly.booleanValue();
290         ValueBinding vb = getValueBinding("readonly");
291         Boolean JavaDoc v = vb != null ? (Boolean JavaDoc)vb.getValue(getFacesContext()) : null;
292         return v != null ? v.booleanValue() : DEFAULT_READONLY;
293     }
294
295     public void setStyle(String JavaDoc style)
296     {
297         _style = style;
298     }
299
300     public String JavaDoc getStyle()
301     {
302         if (_style != null) return _style;
303         ValueBinding vb = getValueBinding("style");
304         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
305     }
306
307     public void setStyleClass(String JavaDoc styleClass)
308     {
309         _styleClass = styleClass;
310     }
311
312     public String JavaDoc getStyleClass()
313     {
314         if (_styleClass != null) return _styleClass;
315         ValueBinding vb = getValueBinding("styleClass");
316         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
317     }
318
319     public void setTabindex(String JavaDoc tabindex)
320     {
321         _tabindex = tabindex;
322     }
323
324     public String JavaDoc getTabindex()
325     {
326         if (_tabindex != null) return _tabindex;
327         ValueBinding vb = getValueBinding("tabindex");
328         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
329     }
330
331     public void setTitle(String JavaDoc title)
332     {
333         _title = title;
334     }
335
336     public String JavaDoc getTitle()
337     {
338         if (_title != null) return _title;
339         ValueBinding vb = getValueBinding("title");
340         return vb != null ? (String JavaDoc)vb.getValue(getFacesContext()) : null;
341     }
342
343
344     public Object JavaDoc saveState(FacesContext context)
345     {
346         Object JavaDoc values[] = new Object JavaDoc[24];
347         values[0] = super.saveState(context);
348         values[1] = _accesskey;
349         values[2] = _dir;
350         values[3] = _disabled;
351         values[4] = _lang;
352         values[5] = _onblur;
353         values[6] = _onchange;
354         values[7] = _onclick;
355         values[8] = _ondblclick;
356         values[9] = _onfocus;
357         values[10] = _onkeydown;
358         values[11] = _onkeypress;
359         values[12] = _onkeyup;
360         values[13] = _onmousedown;
361         values[14] = _onmousemove;
362         values[15] = _onmouseout;
363         values[16] = _onmouseover;
364         values[17] = _onmouseup;
365         values[18] = _onselect;
366         values[19] = _readonly;
367         values[20] = _style;
368         values[21] = _styleClass;
369         values[22] = _tabindex;
370         values[23] = _title;
371         return ((Object JavaDoc) (values));
372     }
373
374     public void restoreState(FacesContext context, Object JavaDoc state)
375     {
376         Object JavaDoc values[] = (Object JavaDoc[])state;
377         super.restoreState(context, values[0]);
378         _accesskey = (String JavaDoc)values[1];
379         _dir = (String JavaDoc)values[2];
380         _disabled = (Boolean JavaDoc)values[3];
381         _lang = (String JavaDoc)values[4];
382         _onblur = (String JavaDoc)values[5];
383         _onchange = (String JavaDoc)values[6];
384         _onclick = (String JavaDoc)values[7];
385         _ondblclick = (String JavaDoc)values[8];
386         _onfocus = (String JavaDoc)values[9];
387         _onkeydown = (String JavaDoc)values[10];
388         _onkeypress = (String JavaDoc)values[11];
389         _onkeyup = (String JavaDoc)values[12];
390         _onmousedown = (String JavaDoc)values[13];
391         _onmousemove = (String JavaDoc)values[14];
392         _onmouseout = (String JavaDoc)values[15];
393         _onmouseover = (String JavaDoc)values[16];
394         _onmouseup = (String JavaDoc)values[17];
395         _onselect = (String JavaDoc)values[18];
396         _readonly = (Boolean JavaDoc)values[19];
397         _style = (String JavaDoc)values[20];
398         _styleClass = (String JavaDoc)values[21];
399         _tabindex = (String JavaDoc)values[22];
400         _title = (String JavaDoc)values[23];
401     }
402     //------------------ GENERATED CODE END ---------------------------------------
403
}
404
Popular Tags