KickJava   Java API By Example, From Geeks To Geeks.

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


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.UISelectMany;
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.3 $ $Date: 2004/07/01 22:01:16 $
25  */

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

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