1 package org.rcfaces.core.component;
2
3 import org.rcfaces.core.component.iterator.IMenuIterator;
4 import org.rcfaces.core.internal.component.Properties;
5 import org.rcfaces.core.component.capability.IAdditionalInformationContainer;
6 import org.rcfaces.core.internal.capability.IAsyncRenderComponent;
7 import org.rcfaces.core.component.capability.IUserEventCapability;
8 import org.apache.commons.logging.LogFactory;
9 import org.rcfaces.core.component.capability.ILoadEventCapability;
10 import org.rcfaces.core.internal.tools.MarginTools;
11 import org.rcfaces.core.component.IMenuComponent;
12 import org.apache.commons.logging.Log;
13 import java.util.Set;
14 import org.rcfaces.core.component.capability.IInitEventCapability;
15 import org.rcfaces.core.component.capability.IBackgroundImageCapability;
16 import java.lang.String;
17 import org.rcfaces.core.component.capability.IWAIRoleCapability;
18 import org.rcfaces.core.component.capability.IForegroundBackgroundColorCapability;
19 import org.rcfaces.core.component.capability.ILookAndFeelCapability;
20 import org.rcfaces.core.component.capability.IPropertyChangeEventCapability;
21 import org.rcfaces.core.internal.tools.MenuTools;
22 import org.rcfaces.core.component.capability.IHeightCapability;
23 import org.rcfaces.core.internal.component.CameliaColumnComponent;
24 import org.rcfaces.core.component.capability.IErrorEventCapability;
25 import org.rcfaces.core.component.capability.IMouseEventCapability;
26 import javax.el.ValueExpression;
27 import java.util.HashSet;
28 import org.rcfaces.core.component.capability.IStyleClassCapability;
29 import java.util.Arrays;
30 import org.rcfaces.core.internal.capability.IVariableScopeCapability;
31 import org.rcfaces.core.component.capability.IMenuCapability;
32 import org.rcfaces.core.component.capability.IMarginCapability;
33
34 public class AdditionalInformationComponent extends CameliaColumnComponent implements
35 IPropertyChangeEventCapability,
36 IUserEventCapability,
37 IErrorEventCapability,
38 IWAIRoleCapability,
39 IMarginCapability,
40 IForegroundBackgroundColorCapability,
41 IBackgroundImageCapability,
42 ILookAndFeelCapability,
43 IStyleClassCapability,
44 IHeightCapability,
45 IMouseEventCapability,
46 IInitEventCapability,
47 ILoadEventCapability,
48 IMenuCapability,
49 IVariableScopeCapability,
50 IAdditionalInformationContainer,
51 IAsyncRenderComponent {
52
53 private static final Log LOG = LogFactory.getLog(AdditionalInformationComponent.class);
54
55 public static final String COMPONENT_TYPE="org.rcfaces.core.additionalInformation";
56
57 protected static final Set CAMELIA_ATTRIBUTES=new HashSet(CameliaColumnComponent.CAMELIA_ATTRIBUTES);
58 static {
59 CAMELIA_ATTRIBUTES.addAll(Arrays.asList(new String[] {"backgroundColor","marginLeft","errorListener","backgroundImageVerticalPosition","propertyChangeListener","backgroundImageHorizontalPosition","loadListener","ariaLevel","height","mouseOverListener","scopeValue","backgroundImageURL","foregroundColor","waiRole","mouseOutListener","lookId","backgroundImageVerticalRepeat","userEventListener","marginTop","marginRight","styleClass","backgroundImageHorizontalRepeat","ariaLabel","initListener","marginBottom","scopeSaveValue","scopeVar","margins"}));
60 }
61
62 public AdditionalInformationComponent() {
63 setRendererType(COMPONENT_TYPE);
64 }
65
66 public AdditionalInformationComponent(String componentId) {
67 this();
68 setId(componentId);
69 }
70
71 public void setMargins(String margins) {
72
73
74 MarginTools.setMargins(this, margins);
75
76 }
77
78 public final void addPropertyChangeListener(org.rcfaces.core.event.IPropertyChangeListener listener) {
79 addFacesListener(listener);
80 }
81
82 public final void removePropertyChangeListener(org.rcfaces.core.event.IPropertyChangeListener listener) {
83 removeFacesListener(listener);
84 }
85
86 public final javax.faces.event.FacesListener [] listPropertyChangeListeners() {
87 return getFacesListeners(org.rcfaces.core.event.IPropertyChangeListener.class);
88 }
89
90 public final void addUserEventListener(org.rcfaces.core.event.IUserEventListener listener) {
91 addFacesListener(listener);
92 }
93
94 public final void removeUserEventListener(org.rcfaces.core.event.IUserEventListener listener) {
95 removeFacesListener(listener);
96 }
97
98 public final javax.faces.event.FacesListener [] listUserEventListeners() {
99 return getFacesListeners(org.rcfaces.core.event.IUserEventListener.class);
100 }
101
102 public final void addErrorListener(org.rcfaces.core.event.IErrorListener listener) {
103 addFacesListener(listener);
104 }
105
106 public final void removeErrorListener(org.rcfaces.core.event.IErrorListener listener) {
107 removeFacesListener(listener);
108 }
109
110 public final javax.faces.event.FacesListener [] listErrorListeners() {
111 return getFacesListeners(org.rcfaces.core.event.IErrorListener.class);
112 }
113
114 public java.lang.String getAriaLabel() {
115 return getAriaLabel(null);
116 }
117
118
119
120
121 public java.lang.String getAriaLabel(javax.faces.context.FacesContext facesContext) {
122 return engine.getStringProperty(Properties.ARIA_LABEL, facesContext);
123 }
124
125
126
127
128
129 public final boolean isAriaLabelSetted() {
130 return engine.isPropertySetted(Properties.ARIA_LABEL);
131 }
132
133 public void setAriaLabel(java.lang.String ariaLabel) {
134 engine.setProperty(Properties.ARIA_LABEL, ariaLabel);
135 }
136
137 public int getAriaLevel() {
138 return getAriaLevel(null);
139 }
140
141
142
143
144 public int getAriaLevel(javax.faces.context.FacesContext facesContext) {
145 return engine.getIntProperty(Properties.ARIA_LEVEL,0, facesContext);
146 }
147
148
149
150
151
152 public final boolean isAriaLevelSetted() {
153 return engine.isPropertySetted(Properties.ARIA_LEVEL);
154 }
155
156 public void setAriaLevel(int ariaLevel) {
157 engine.setProperty(Properties.ARIA_LEVEL, ariaLevel);
158 }
159
160 public java.lang.String getWaiRole() {
161 return getWaiRole(null);
162 }
163
164
165
166
167 public java.lang.String getWaiRole(javax.faces.context.FacesContext facesContext) {
168 return engine.getStringProperty(Properties.WAI_ROLE, facesContext);
169 }
170
171
172
173
174
175 public final boolean isWaiRoleSetted() {
176 return engine.isPropertySetted(Properties.WAI_ROLE);
177 }
178
179 public void setWaiRole(java.lang.String waiRole) {
180 engine.setProperty(Properties.WAI_ROLE, waiRole);
181 }
182
183 public java.lang.String getMarginBottom() {
184 return getMarginBottom(null);
185 }
186
187
188
189
190 public java.lang.String getMarginBottom(javax.faces.context.FacesContext facesContext) {
191 return engine.getStringProperty(Properties.MARGIN_BOTTOM, facesContext);
192 }
193
194
195
196
197
198 public final boolean isMarginBottomSetted() {
199 return engine.isPropertySetted(Properties.MARGIN_BOTTOM);
200 }
201
202 public void setMarginBottom(java.lang.String marginBottom) {
203 engine.setProperty(Properties.MARGIN_BOTTOM, marginBottom);
204 }
205
206 public java.lang.String getMarginLeft() {
207 return getMarginLeft(null);
208 }
209
210
211
212
213 public java.lang.String getMarginLeft(javax.faces.context.FacesContext facesContext) {
214 return engine.getStringProperty(Properties.MARGIN_LEFT, facesContext);
215 }
216
217
218
219
220
221 public final boolean isMarginLeftSetted() {
222 return engine.isPropertySetted(Properties.MARGIN_LEFT);
223 }
224
225 public void setMarginLeft(java.lang.String marginLeft) {
226 engine.setProperty(Properties.MARGIN_LEFT, marginLeft);
227 }
228
229 public java.lang.String getMarginRight() {
230 return getMarginRight(null);
231 }
232
233
234
235
236 public java.lang.String getMarginRight(javax.faces.context.FacesContext facesContext) {
237 return engine.getStringProperty(Properties.MARGIN_RIGHT, facesContext);
238 }
239
240
241
242
243
244 public final boolean isMarginRightSetted() {
245 return engine.isPropertySetted(Properties.MARGIN_RIGHT);
246 }
247
248 public void setMarginRight(java.lang.String marginRight) {
249 engine.setProperty(Properties.MARGIN_RIGHT, marginRight);
250 }
251
252 public java.lang.String getMarginTop() {
253 return getMarginTop(null);
254 }
255
256
257
258
259 public java.lang.String getMarginTop(javax.faces.context.FacesContext facesContext) {
260 return engine.getStringProperty(Properties.MARGIN_TOP, facesContext);
261 }
262
263
264
265
266
267 public final boolean isMarginTopSetted() {
268 return engine.isPropertySetted(Properties.MARGIN_TOP);
269 }
270
271 public void setMarginTop(java.lang.String marginTop) {
272 engine.setProperty(Properties.MARGIN_TOP, marginTop);
273 }
274
275 public java.lang.String getBackgroundColor() {
276 return getBackgroundColor(null);
277 }
278
279
280
281
282 public java.lang.String getBackgroundColor(javax.faces.context.FacesContext facesContext) {
283 return engine.getStringProperty(Properties.BACKGROUND_COLOR, facesContext);
284 }
285
286
287
288
289
290 public final boolean isBackgroundColorSetted() {
291 return engine.isPropertySetted(Properties.BACKGROUND_COLOR);
292 }
293
294 public void setBackgroundColor(java.lang.String backgroundColor) {
295 engine.setProperty(Properties.BACKGROUND_COLOR, backgroundColor);
296 }
297
298 public java.lang.String getForegroundColor() {
299 return getForegroundColor(null);
300 }
301
302
303
304
305 public java.lang.String getForegroundColor(javax.faces.context.FacesContext facesContext) {
306 return engine.getStringProperty(Properties.FOREGROUND_COLOR, facesContext);
307 }
308
309
310
311
312
313 public final boolean isForegroundColorSetted() {
314 return engine.isPropertySetted(Properties.FOREGROUND_COLOR);
315 }
316
317 public void setForegroundColor(java.lang.String foregroundColor) {
318 engine.setProperty(Properties.FOREGROUND_COLOR, foregroundColor);
319 }
320
321 public java.lang.String getBackgroundImageHorizontalPosition() {
322 return getBackgroundImageHorizontalPosition(null);
323 }
324
325
326
327
328 public java.lang.String getBackgroundImageHorizontalPosition(javax.faces.context.FacesContext facesContext) {
329 return engine.getStringProperty(Properties.BACKGROUND_IMAGE_HORIZONTAL_POSITION, facesContext);
330 }
331
332
333
334
335
336 public final boolean isBackgroundImageHorizontalPositionSetted() {
337 return engine.isPropertySetted(Properties.BACKGROUND_IMAGE_HORIZONTAL_POSITION);
338 }
339
340 public void setBackgroundImageHorizontalPosition(java.lang.String backgroundImageHorizontalPosition) {
341 engine.setProperty(Properties.BACKGROUND_IMAGE_HORIZONTAL_POSITION, backgroundImageHorizontalPosition);
342 }
343
344 public boolean isBackgroundImageHorizontalRepeat() {
345 return isBackgroundImageHorizontalRepeat(null);
346 }
347
348
349
350
351 public boolean isBackgroundImageHorizontalRepeat(javax.faces.context.FacesContext facesContext) {
352 return engine.getBoolProperty(Properties.BACKGROUND_IMAGE_HORIZONTAL_REPEAT, false, facesContext);
353 }
354
355
356
357
358
359 public final boolean isBackgroundImageHorizontalRepeatSetted() {
360 return engine.isPropertySetted(Properties.BACKGROUND_IMAGE_HORIZONTAL_REPEAT);
361 }
362
363 public void setBackgroundImageHorizontalRepeat(boolean backgroundImageHorizontalRepeat) {
364 engine.setProperty(Properties.BACKGROUND_IMAGE_HORIZONTAL_REPEAT, backgroundImageHorizontalRepeat);
365 }
366
367 public java.lang.String getBackgroundImageURL() {
368 return getBackgroundImageURL(null);
369 }
370
371
372
373
374 public java.lang.String getBackgroundImageURL(javax.faces.context.FacesContext facesContext) {
375 return engine.getStringProperty(Properties.BACKGROUND_IMAGE_URL, facesContext);
376 }
377
378
379
380
381
382 public final boolean isBackgroundImageURLSetted() {
383 return engine.isPropertySetted(Properties.BACKGROUND_IMAGE_URL);
384 }
385
386 public void setBackgroundImageURL(java.lang.String backgroundImageURL) {
387 engine.setProperty(Properties.BACKGROUND_IMAGE_URL, backgroundImageURL);
388 }
389
390 public java.lang.String getBackgroundImageVerticalPosition() {
391 return getBackgroundImageVerticalPosition(null);
392 }
393
394
395
396
397 public java.lang.String getBackgroundImageVerticalPosition(javax.faces.context.FacesContext facesContext) {
398 return engine.getStringProperty(Properties.BACKGROUND_IMAGE_VERTICAL_POSITION, facesContext);
399 }
400
401
402
403
404
405 public final boolean isBackgroundImageVerticalPositionSetted() {
406 return engine.isPropertySetted(Properties.BACKGROUND_IMAGE_VERTICAL_POSITION);
407 }
408
409 public void setBackgroundImageVerticalPosition(java.lang.String backgroundImageVerticalPosition) {
410 engine.setProperty(Properties.BACKGROUND_IMAGE_VERTICAL_POSITION, backgroundImageVerticalPosition);
411 }
412
413 public boolean isBackgroundImageVerticalRepeat() {
414 return isBackgroundImageVerticalRepeat(null);
415 }
416
417
418
419
420 public boolean isBackgroundImageVerticalRepeat(javax.faces.context.FacesContext facesContext) {
421 return engine.getBoolProperty(Properties.BACKGROUND_IMAGE_VERTICAL_REPEAT, false, facesContext);
422 }
423
424
425
426
427
428 public final boolean isBackgroundImageVerticalRepeatSetted() {
429 return engine.isPropertySetted(Properties.BACKGROUND_IMAGE_VERTICAL_REPEAT);
430 }
431
432 public void setBackgroundImageVerticalRepeat(boolean backgroundImageVerticalRepeat) {
433 engine.setProperty(Properties.BACKGROUND_IMAGE_VERTICAL_REPEAT, backgroundImageVerticalRepeat);
434 }
435
436 public java.lang.String getLookId() {
437 return getLookId(null);
438 }
439
440
441
442
443 public java.lang.String getLookId(javax.faces.context.FacesContext facesContext) {
444 return engine.getStringProperty(Properties.LOOK_ID, facesContext);
445 }
446
447
448
449
450
451 public final boolean isLookIdSetted() {
452 return engine.isPropertySetted(Properties.LOOK_ID);
453 }
454
455 public void setLookId(java.lang.String lookId) {
456 engine.setProperty(Properties.LOOK_ID, lookId);
457 }
458
459 public java.lang.String getStyleClass() {
460 return getStyleClass(null);
461 }
462
463
464
465
466 public java.lang.String getStyleClass(javax.faces.context.FacesContext facesContext) {
467 return engine.getStringProperty(Properties.STYLE_CLASS, facesContext);
468 }
469
470
471
472
473
474 public final boolean isStyleClassSetted() {
475 return engine.isPropertySetted(Properties.STYLE_CLASS);
476 }
477
478 public void setStyleClass(java.lang.String styleClass) {
479 engine.setProperty(Properties.STYLE_CLASS, styleClass);
480 }
481
482 public java.lang.String getHeight() {
483 return getHeight(null);
484 }
485
486
487
488
489 public java.lang.String getHeight(javax.faces.context.FacesContext facesContext) {
490 return engine.getStringProperty(Properties.HEIGHT, facesContext);
491 }
492
493
494
495
496
497 public final boolean isHeightSetted() {
498 return engine.isPropertySetted(Properties.HEIGHT);
499 }
500
501 public void setHeight(java.lang.String height) {
502 engine.setProperty(Properties.HEIGHT, height);
503 }
504
505 public final void addMouseOutListener(org.rcfaces.core.event.IMouseOutListener listener) {
506 addFacesListener(listener);
507 }
508
509 public final void removeMouseOutListener(org.rcfaces.core.event.IMouseOutListener listener) {
510 removeFacesListener(listener);
511 }
512
513 public final javax.faces.event.FacesListener [] listMouseOutListeners() {
514 return getFacesListeners(org.rcfaces.core.event.IMouseOutListener.class);
515 }
516
517 public final void addMouseOverListener(org.rcfaces.core.event.IMouseOverListener listener) {
518 addFacesListener(listener);
519 }
520
521 public final void removeMouseOverListener(org.rcfaces.core.event.IMouseOverListener listener) {
522 removeFacesListener(listener);
523 }
524
525 public final javax.faces.event.FacesListener [] listMouseOverListeners() {
526 return getFacesListeners(org.rcfaces.core.event.IMouseOverListener.class);
527 }
528
529 public final void addInitListener(org.rcfaces.core.event.IInitListener listener) {
530 addFacesListener(listener);
531 }
532
533 public final void removeInitListener(org.rcfaces.core.event.IInitListener listener) {
534 removeFacesListener(listener);
535 }
536
537 public final javax.faces.event.FacesListener [] listInitListeners() {
538 return getFacesListeners(org.rcfaces.core.event.IInitListener.class);
539 }
540
541 public final void addLoadListener(org.rcfaces.core.event.ILoadListener listener) {
542 addFacesListener(listener);
543 }
544
545 public final void removeLoadListener(org.rcfaces.core.event.ILoadListener listener) {
546 removeFacesListener(listener);
547 }
548
549 public final javax.faces.event.FacesListener [] listLoadListeners() {
550 return getFacesListeners(org.rcfaces.core.event.ILoadListener.class);
551 }
552
553 public IMenuComponent getMenu() {
554
555
556 return MenuTools.getMenu(this);
557
558 }
559
560 public IMenuComponent getMenu(String menuId) {
561
562
563 return MenuTools.getMenu(this, menuId);
564
565 }
566
567 public IMenuIterator listMenus() {
568
569
570 return MenuTools.listMenus(this);
571
572 }
573
574 public boolean isScopeSaveValue() {
575 return isScopeSaveValue(null);
576 }
577
578
579
580
581 public boolean isScopeSaveValue(javax.faces.context.FacesContext facesContext) {
582 return engine.getBoolProperty(Properties.SCOPE_SAVE_VALUE, false, facesContext);
583 }
584
585
586
587
588
589 public final boolean isScopeSaveValueSetted() {
590 return engine.isPropertySetted(Properties.SCOPE_SAVE_VALUE);
591 }
592
593 public void setScopeSaveValue(boolean scopeSaveValue) {
594 engine.setProperty(Properties.SCOPE_SAVE_VALUE, scopeSaveValue);
595 }
596
597 public java.lang.Object getScopeValue() {
598 return getScopeValue(null);
599 }
600
601
602
603
604 public java.lang.Object getScopeValue(javax.faces.context.FacesContext facesContext) {
605 return engine.getProperty(Properties.SCOPE_VALUE, facesContext);
606 }
607
608
609
610
611
612 public final boolean isScopeValueSetted() {
613 return engine.isPropertySetted(Properties.SCOPE_VALUE);
614 }
615
616 public void setScopeValue(java.lang.Object scopeValue) {
617 engine.setProperty(Properties.SCOPE_VALUE, scopeValue);
618 }
619
620 public java.lang.String getScopeVar() {
621 return getScopeVar(null);
622 }
623
624
625
626
627 public java.lang.String getScopeVar(javax.faces.context.FacesContext facesContext) {
628 return engine.getStringProperty(Properties.SCOPE_VAR, facesContext);
629 }
630
631
632
633
634
635 public final boolean isScopeVarSetted() {
636 return engine.isPropertySetted(Properties.SCOPE_VAR);
637 }
638
639 public void setScopeVar(java.lang.String scopeVar) {
640 engine.setProperty(Properties.SCOPE_VAR, scopeVar);
641 }
642
643 protected Set getCameliaFields() {
644 return CAMELIA_ATTRIBUTES;
645 }
646 }