1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 package org.apache.myfaces.trinidad.component.core.layout;
23
24 import java.util.Arrays;
25 import java.util.Collection;
26 import java.util.Collections;
27 import java.util.List;
28 import java.util.Map;
29 import javax.faces.component.UIComponent;
30 import javax.faces.component.behavior.ClientBehavior;
31 import javax.faces.component.behavior.ClientBehaviorHolder;
32 import org.apache.myfaces.trinidad.bean.FacesBean;
33 import org.apache.myfaces.trinidad.bean.PropertyKey;
34 import org.apache.myfaces.trinidad.component.UIXPanel;
35 import org.apache.myfaces.trinidad.util.ComponentUtils;
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59 public class CorePanelHorizontalLayout extends UIXPanel
60 implements ClientBehaviorHolder
61 {
62 static public final String VALIGN_MIDDLE = "middle";
63 static public final String VALIGN_TOP = "top";
64 static public final String VALIGN_BASELINE = "baseline";
65 static public final String VALIGN_BOTTOM = "bottom";
66 static public final String HALIGN_RIGHT = "right";
67 static public final String HALIGN_START = "start";
68 static public final String HALIGN_LEFT = "left";
69 static public final String HALIGN_END = "end";
70 static public final String HALIGN_CENTER = "center";
71 static public final FacesBean.Type TYPE = new FacesBean.Type(
72 UIXPanel.TYPE);
73 static public final PropertyKey INLINE_STYLE_KEY =
74 TYPE.registerKey("inlineStyle", String.class);
75 static public final PropertyKey STYLE_CLASS_KEY =
76 TYPE.registerKey("styleClass", String.class);
77 static public final PropertyKey SHORT_DESC_KEY =
78 TYPE.registerKey("shortDesc", String.class);
79 static public final PropertyKey PARTIAL_TRIGGERS_KEY =
80 TYPE.registerKey("partialTriggers", String[].class, null, 0, PropertyKey.Mutable.RARELY);
81 static public final PropertyKey ONCLICK_KEY =
82 TYPE.registerKey("onclick", String.class);
83 static public final PropertyKey ONDBLCLICK_KEY =
84 TYPE.registerKey("ondblclick", String.class);
85 static public final PropertyKey ONMOUSEDOWN_KEY =
86 TYPE.registerKey("onmousedown", String.class);
87 static public final PropertyKey ONMOUSEUP_KEY =
88 TYPE.registerKey("onmouseup", String.class);
89 static public final PropertyKey ONMOUSEOVER_KEY =
90 TYPE.registerKey("onmouseover", String.class);
91 static public final PropertyKey ONMOUSEMOVE_KEY =
92 TYPE.registerKey("onmousemove", String.class);
93 static public final PropertyKey ONMOUSEOUT_KEY =
94 TYPE.registerKey("onmouseout", String.class);
95 static public final PropertyKey ONKEYPRESS_KEY =
96 TYPE.registerKey("onkeypress", String.class);
97 static public final PropertyKey ONKEYDOWN_KEY =
98 TYPE.registerKey("onkeydown", String.class);
99 static public final PropertyKey ONKEYUP_KEY =
100 TYPE.registerKey("onkeyup", String.class);
101 static public final PropertyKey VALIGN_KEY =
102 TYPE.registerKey("valign", String.class);
103 static public final PropertyKey HALIGN_KEY =
104 TYPE.registerKey("halign", String.class);
105 static public final String SEPARATOR_FACET = "separator";
106
107 static public final String COMPONENT_FAMILY =
108 "org.apache.myfaces.trinidad.Panel";
109 static public final String COMPONENT_TYPE =
110 "org.apache.myfaces.trinidad.CorePanelHorizontalLayout";
111
112 private final static Collection<String> _EVENT_NAMES = Collections.unmodifiableCollection(
113 Arrays.asList(
114 "click", "dblclick", "mousedown", "mouseup", "mouseover", "mousemove",
115 "mouseout", "keypress", "keydown", "keyup"
116 ));
117
118
119
120
121 public CorePanelHorizontalLayout()
122 {
123 super("org.apache.myfaces.trinidad.HorizontalLayout");
124 }
125
126
127
128
129
130 final public UIComponent getSeparator()
131 {
132 return getFacet(SEPARATOR_FACET);
133 }
134
135
136
137
138
139 @SuppressWarnings("unchecked")
140 final public void setSeparator(UIComponent separatorFacet)
141 {
142 getFacets().put(SEPARATOR_FACET, separatorFacet);
143 }
144
145
146
147
148
149
150 final public String getInlineStyle()
151 {
152 return ComponentUtils.resolveString(getProperty(INLINE_STYLE_KEY));
153 }
154
155
156
157
158
159
160 final public void setInlineStyle(String inlineStyle)
161 {
162 setProperty(INLINE_STYLE_KEY, (inlineStyle));
163 }
164
165
166
167
168
169
170 final public String getStyleClass()
171 {
172 return ComponentUtils.resolveString(getProperty(STYLE_CLASS_KEY));
173 }
174
175
176
177
178
179
180 final public void setStyleClass(String styleClass)
181 {
182 setProperty(STYLE_CLASS_KEY, (styleClass));
183 }
184
185
186
187
188
189
190 final public String getShortDesc()
191 {
192 return ComponentUtils.resolveString(getProperty(SHORT_DESC_KEY));
193 }
194
195
196
197
198
199
200 final public void setShortDesc(String shortDesc)
201 {
202 setProperty(SHORT_DESC_KEY, (shortDesc));
203 }
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225 final public String[] getPartialTriggers()
226 {
227 return (String[])getProperty(PARTIAL_TRIGGERS_KEY);
228 }
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250 final public void setPartialTriggers(String[] partialTriggers)
251 {
252 setProperty(PARTIAL_TRIGGERS_KEY, (partialTriggers));
253 }
254
255
256
257
258
259
260 final public String getOnclick()
261 {
262 return ComponentUtils.resolveString(getProperty(ONCLICK_KEY));
263 }
264
265
266
267
268
269
270 final public void setOnclick(String onclick)
271 {
272 setProperty(ONCLICK_KEY, (onclick));
273 }
274
275
276
277
278
279
280 final public String getOndblclick()
281 {
282 return ComponentUtils.resolveString(getProperty(ONDBLCLICK_KEY));
283 }
284
285
286
287
288
289
290 final public void setOndblclick(String ondblclick)
291 {
292 setProperty(ONDBLCLICK_KEY, (ondblclick));
293 }
294
295
296
297
298
299
300 final public String getOnmousedown()
301 {
302 return ComponentUtils.resolveString(getProperty(ONMOUSEDOWN_KEY));
303 }
304
305
306
307
308
309
310 final public void setOnmousedown(String onmousedown)
311 {
312 setProperty(ONMOUSEDOWN_KEY, (onmousedown));
313 }
314
315
316
317
318
319
320 final public String getOnmouseup()
321 {
322 return ComponentUtils.resolveString(getProperty(ONMOUSEUP_KEY));
323 }
324
325
326
327
328
329
330 final public void setOnmouseup(String onmouseup)
331 {
332 setProperty(ONMOUSEUP_KEY, (onmouseup));
333 }
334
335
336
337
338
339
340 final public String getOnmouseover()
341 {
342 return ComponentUtils.resolveString(getProperty(ONMOUSEOVER_KEY));
343 }
344
345
346
347
348
349
350 final public void setOnmouseover(String onmouseover)
351 {
352 setProperty(ONMOUSEOVER_KEY, (onmouseover));
353 }
354
355
356
357
358
359
360 final public String getOnmousemove()
361 {
362 return ComponentUtils.resolveString(getProperty(ONMOUSEMOVE_KEY));
363 }
364
365
366
367
368
369
370 final public void setOnmousemove(String onmousemove)
371 {
372 setProperty(ONMOUSEMOVE_KEY, (onmousemove));
373 }
374
375
376
377
378
379
380 final public String getOnmouseout()
381 {
382 return ComponentUtils.resolveString(getProperty(ONMOUSEOUT_KEY));
383 }
384
385
386
387
388
389
390 final public void setOnmouseout(String onmouseout)
391 {
392 setProperty(ONMOUSEOUT_KEY, (onmouseout));
393 }
394
395
396
397
398
399
400 final public String getOnkeypress()
401 {
402 return ComponentUtils.resolveString(getProperty(ONKEYPRESS_KEY));
403 }
404
405
406
407
408
409
410 final public void setOnkeypress(String onkeypress)
411 {
412 setProperty(ONKEYPRESS_KEY, (onkeypress));
413 }
414
415
416
417
418
419
420 final public String getOnkeydown()
421 {
422 return ComponentUtils.resolveString(getProperty(ONKEYDOWN_KEY));
423 }
424
425
426
427
428
429
430 final public void setOnkeydown(String onkeydown)
431 {
432 setProperty(ONKEYDOWN_KEY, (onkeydown));
433 }
434
435
436
437
438
439
440 final public String getOnkeyup()
441 {
442 return ComponentUtils.resolveString(getProperty(ONKEYUP_KEY));
443 }
444
445
446
447
448
449
450 final public void setOnkeyup(String onkeyup)
451 {
452 setProperty(ONKEYUP_KEY, (onkeyup));
453 }
454
455
456
457
458
459
460 final public String getValign()
461 {
462 return ComponentUtils.resolveString(getProperty(VALIGN_KEY));
463 }
464
465
466
467
468
469
470 final public void setValign(String valign)
471 {
472 setProperty(VALIGN_KEY, (valign));
473 }
474
475
476
477
478
479
480
481 final public String getHalign()
482 {
483 return ComponentUtils.resolveString(getProperty(HALIGN_KEY));
484 }
485
486
487
488
489
490
491
492 final public void setHalign(String halign)
493 {
494 setProperty(HALIGN_KEY, (halign));
495 }
496
497 @Override
498 public String getDefaultEventName()
499 {
500 return "click";
501 }
502
503 @Override
504 public Collection<String> getEventNames()
505 {
506 return _EVENT_NAMES;
507 }
508
509 @Override
510 public Map<String, List<ClientBehavior>> getClientBehaviors()
511 {
512 return super.getClientBehaviors();
513 }
514
515 @Override
516 public void addClientBehavior(
517 String eventName,
518 ClientBehavior behavior)
519 {
520 super.addClientBehavior(eventName, behavior);
521 }
522
523 @Override
524 public String getFamily()
525 {
526 return COMPONENT_FAMILY;
527 }
528
529 @Override
530 protected FacesBean.Type getBeanType()
531 {
532 return TYPE;
533 }
534
535
536
537
538 protected CorePanelHorizontalLayout(
539 String rendererType
540 )
541 {
542 super(rendererType);
543 }
544
545 static
546 {
547 TYPE.lockAndRegister("org.apache.myfaces.trinidad.Panel","org.apache.myfaces.trinidad.HorizontalLayout");
548 }
549 }