1 package org.rcfaces.core.component;
2
3 import org.rcfaces.core.internal.tools.CollectionTools.IComponentValueType;
4 import org.rcfaces.core.internal.converter.DragDropEffectsConverter;
5 import org.rcfaces.core.internal.component.Properties;
6 import javax.faces.component.UISelectItem;
7 import org.rcfaces.core.component.capability.IOverStyleClassCapability;
8 import org.rcfaces.core.component.capability.ISelectableCapability;
9 import org.rcfaces.core.internal.tools.SelectionTools;
10 import org.rcfaces.core.component.capability.ILoadEventCapability;
11 import org.rcfaces.core.component.capability.IBorderCapability;
12 import org.rcfaces.core.internal.tools.CollectionTools.IComponentValueTypeCapability;
13 import org.rcfaces.core.component.capability.IPreSelectionEventCapability;
14 import org.rcfaces.core.component.capability.ISelectionCardinalityCapability;
15 import javax.faces.context.FacesContext;
16 import org.rcfaces.core.component.capability.IDragEventCapability;
17 import org.rcfaces.core.internal.util.ComponentIterators;
18 import org.rcfaces.core.component.IMenuComponent;
19 import org.rcfaces.core.component.capability.IReadOnlyCapability;
20 import org.rcfaces.core.component.capability.IExpandEventCapability;
21 import org.rcfaces.core.internal.capability.ICheckComponent;
22 import org.rcfaces.core.component.capability.IDroppableCapability;
23 import org.rcfaces.core.internal.capability.ISelectionComponent;
24 import org.rcfaces.core.internal.converter.CheckCardinalityConverter;
25 import org.rcfaces.core.internal.tools.ComponentTools;
26 import org.rcfaces.core.internal.tools.CheckTools;
27 import org.rcfaces.core.component.capability.IScrollableCapability;
28 import org.rcfaces.core.component.capability.ISelectionEventCapability;
29 import org.rcfaces.core.component.capability.ICheckedValuesCapability;
30 import org.rcfaces.core.internal.tools.MenuTools;
31 import org.rcfaces.core.component.capability.IDraggableCapability;
32 import org.rcfaces.core.component.capability.IClientSelectionFullStateCapability;
33 import org.rcfaces.core.component.capability.IShowValueCapability;
34 import org.rcfaces.core.component.capability.IDropCompleteEventCapability;
35 import org.rcfaces.core.component.capability.IFilterCapability;
36 import java.util.Arrays;
37 import org.rcfaces.core.component.capability.IMenuCapability;
38 import org.rcfaces.core.component.iterator.IMenuIterator;
39 import org.rcfaces.core.component.capability.ICheckCardinalityCapability;
40 import org.apache.commons.logging.LogFactory;
41 import org.rcfaces.core.component.capability.IClientCheckFullStateCapability;
42 import org.rcfaces.core.internal.tools.TreeTools;
43 import org.rcfaces.core.component.capability.IRequiredCapability;
44 import org.rcfaces.core.component.capability.ISelectedValuesCapability;
45 import org.rcfaces.core.component.capability.IDragAndDropEffects;
46 import org.rcfaces.core.component.capability.IExpandableCapability;
47 import org.rcfaces.core.component.capability.ICheckableCapability;
48 import org.rcfaces.core.internal.converter.FilterPropertiesConverter;
49 import org.rcfaces.core.internal.converter.SelectionCardinalityConverter;
50 import org.apache.commons.logging.Log;
51 import org.rcfaces.core.internal.tools.ExpansionTools;
52 import org.rcfaces.core.internal.converter.DragDropTypesConverter;
53 import java.util.Set;
54 import org.rcfaces.core.component.capability.IDoubleClickEventCapability;
55 import org.rcfaces.core.component.capability.IExpandedValuesCapability;
56 import org.rcfaces.core.component.capability.IDropEventCapability;
57 import java.lang.String;
58 import org.rcfaces.core.internal.converter.ClientFullStateConverter;
59 import org.rcfaces.core.component.capability.ICheckEventCapability;
60 import org.rcfaces.core.component.capability.IPreloadedLevelDepthCapability;
61 import javax.el.ValueExpression;
62 import java.util.HashSet;
63 import org.rcfaces.core.model.IFilterProperties;
64 import org.rcfaces.core.component.AbstractInputComponent;
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143 public class TreeComponent extends AbstractInputComponent implements
144 IDoubleClickEventCapability,
145 IRequiredCapability,
146 IScrollableCapability,
147 IBorderCapability,
148 IReadOnlyCapability,
149 IMenuCapability,
150 IShowValueCapability,
151 IOverStyleClassCapability,
152 IFilterCapability,
153 ILoadEventCapability,
154 IExpandEventCapability,
155 IPreSelectionEventCapability,
156 IDragEventCapability,
157 IDraggableCapability,
158 IDropEventCapability,
159 IDropCompleteEventCapability,
160 IDroppableCapability,
161 ICheckableCapability,
162 ICheckCardinalityCapability,
163 ICheckEventCapability,
164 ICheckedValuesCapability,
165 IClientCheckFullStateCapability,
166 ISelectableCapability,
167 ISelectionCardinalityCapability,
168 ISelectionEventCapability,
169 ISelectedValuesCapability,
170 IClientSelectionFullStateCapability,
171 IPreloadedLevelDepthCapability,
172 IExpandableCapability,
173 IExpandedValuesCapability,
174 ICheckComponent,
175 ISelectionComponent,
176 IComponentValueTypeCapability {
177
178 private static final Log LOG = LogFactory.getLog(TreeComponent.class);
179
180 public static final String COMPONENT_TYPE="org.rcfaces.core.tree";
181
182 protected static final Set CAMELIA_ATTRIBUTES=new HashSet(AbstractInputComponent.CAMELIA_ATTRIBUTES);
183 static {
184 CAMELIA_ATTRIBUTES.addAll(Arrays.asList(new String[] {"checkListener","preloadedLevelDepth","selectionCardinality","droppable","defaultDisabledLeafImageURL","dragListener","dragTypes","checkable","checkCardinality","dropListener","dropEffects","overStyleClass","loadListener","checkedValues","selectionListener","defaultLeafImageURL","showValue","verticalScrollPosition","defaultSelectedLeafImageURL","cursorValue","border","required","clientSelectionFullState","preSelectionListener","bodyDroppable","defaultCollapsedImageURL","defaultExpandedImageURL","filterProperties","defaultDisabledImageURL","defaultImageURL","dragEffects","clientCheckFullState","expandListener","doubleClickListener","selectedValues","horizontalScrollPosition","dropCompleteListener","dropTypes","expansionUseValue","readOnly","selectable","expandedValues","hideRootExpandSign","defaultSelectedImageURL","defaultExpandedLeafImageURL","draggable","expandable"}));
185 }
186 protected static final String CAMELIA_VALUE_ALIAS="value";
187
188 public TreeComponent() {
189 setRendererType(COMPONENT_TYPE);
190 }
191
192 public TreeComponent(String componentId) {
193 this();
194 setId(componentId);
195 }
196
197 public void setDragEffects(String dragEffects) {
198
199
200 setDragEffects(((Integer)DragDropEffectsConverter.SINGLETON.getAsObject(null, this, dragEffects)).intValue());
201
202 }
203
204 public void setDragTypes(String dragTypes) {
205
206
207 setDragTypes((String[])DragDropTypesConverter.SINGLETON.getAsObject(null, this, dragTypes));
208
209 }
210
211 public void setDropEffects(String dropEffects) {
212
213
214 setDropEffects(((Integer)DragDropEffectsConverter.SINGLETON.getAsObject(null, this, dropEffects)).intValue());
215
216 }
217
218 public void setDropTypes(String dropTypes) {
219
220
221 setDropTypes((String[])DragDropTypesConverter.SINGLETON.getAsObject(null, this, dropTypes));
222
223 }
224
225 public void setClientSelectionFullState(String state) {
226
227
228 setClientSelectionFullState(((Integer)ClientFullStateConverter.SINGLETON.getAsObject(null, this, state)).intValue());
229
230 }
231
232 public void setClientCheckFullState(String state) {
233
234
235 setClientCheckFullState(((Integer)ClientFullStateConverter.SINGLETON.getAsObject(null, this, state)).intValue());
236
237 }
238
239 public void setFilterProperties(String properties) {
240
241
242 IFilterProperties filterProperties=(IFilterProperties)FilterPropertiesConverter.SINGLETON.getAsObject(null, this, properties);
243
244 setFilterProperties(filterProperties);
245
246 }
247
248 public IComponentValueType getComponentValueType() {
249
250
251 return TreeTools.TREE_VALUE_TYPE;
252
253 }
254
255 public void setSelectionCardinality(String cardinality) {
256
257
258 setSelectionCardinality(((Integer)SelectionCardinalityConverter.SINGLETON.getAsObject(null, this, cardinality)).intValue());
259
260 }
261
262 public void setCheckCardinality(String cardinality) {
263
264
265 setCheckCardinality(((Integer)CheckCardinalityConverter.SINGLETON.getAsObject(null, this, cardinality)).intValue());
266
267 }
268
269 public void removeAllTreeNodes() {
270
271
272 ComponentIterators.removeAll(this, UISelectItem.class);
273
274 }
275
276 public void select(Object rowValue) {
277
278
279 SelectionTools.select(null, this, rowValue);
280
281 }
282
283 public void selectAll() {
284
285
286 SelectionTools.selectAll(null, this);
287
288 }
289
290 public void deselect(Object rowValue) {
291
292
293 SelectionTools.deselect(null, this, rowValue);
294
295 }
296
297 public void deselectAll() {
298
299
300 SelectionTools.deselectAll(null, this);
301
302 }
303
304 public void check(Object rowValue) {
305
306
307 CheckTools.check(null, this, rowValue);
308
309 }
310
311 public void checkAll() {
312
313
314 CheckTools.checkAll(null, this);
315
316 }
317
318 public void uncheck(Object rowValue) {
319
320
321 CheckTools.uncheck(null, this, rowValue);
322
323 }
324
325 public void uncheckAll() {
326
327
328 CheckTools.uncheckAll(null, this);
329
330 }
331
332 public void collapseAll() {
333
334
335 collapseAll(null);
336
337 }
338
339 public void collapseAll(FacesContext context) {
340
341
342 ExpansionTools.collapseAll(context, this);
343
344 }
345
346 public void expandAll() {
347
348
349 expandAll(null);
350
351 }
352
353 public void expandAll(FacesContext context) {
354
355
356 ExpansionTools.expandAll(context, this);
357
358 }
359
360 public void setExpanded(FacesContext context, Object value, boolean expanded) {
361
362
363 TreeTools.setExpanded(context, this, value, expanded);
364
365 }
366
367 public void expand(Object value) {
368
369
370 ExpansionTools.expand(null, this, value);
371
372 }
373
374 public void collapse(Object value) {
375
376
377 ExpansionTools.collapse(null, this, value);
378
379 }
380
381 public void setExpanded(Object value, boolean expanded) {
382
383
384 setExpanded(null, value, expanded);
385
386 }
387
388 public boolean isExpanded(FacesContext context, Object value) {
389
390
391 return TreeTools.isExpanded(context, this, value);
392
393 }
394
395 public Object getCursorValue(FacesContext facesContext) {
396
397
398 if (engine.isPropertySetted(Properties.CURSOR_VALUE)) {
399 return engine.getValue(Properties.CURSOR_VALUE, facesContext);
400 }
401
402 Object cursorValue=ComponentTools.getCursorValue(getValue(), this, facesContext);
403
404 return cursorValue;
405
406 }
407
408 public Object getSelectedValues(FacesContext facesContext) {
409
410
411 if (engine.isPropertySetted(Properties.SELECTED_VALUES)) {
412 return engine.getValue(Properties.SELECTED_VALUES, facesContext);
413 }
414
415 boolean mainValue=isSelectable(facesContext) && isCheckable(facesContext)==false;
416
417 return SelectionTools.getAdaptedValues(getValue(), mainValue);
418
419 }
420
421 public void setSelectedValues(Object selectedValues) {
422
423
424 if (engine.isPropertySetted(Properties.SELECTED_VALUES)==false) {
425 if (SelectionTools.setAdaptedValues(getValue(), selectedValues)) {
426 return;
427 }
428
429 boolean mainValue=isSelectable() && isCheckable()==false;
430 if (mainValue) {
431 setValue(selectedValues);
432 return;
433 }
434 }
435
436 engine.setValue(Properties.SELECTED_VALUES, selectedValues);
437
438 }
439
440 public Object getCheckedValues(FacesContext facesContext) {
441
442
443 if (engine.isPropertySetted(Properties.CHECKED_VALUES)) {
444 return engine.getValue(Properties.CHECKED_VALUES, facesContext);
445 }
446
447 boolean mainValue=isCheckable(facesContext);
448
449 return CheckTools.getAdaptedValues(getValue(), mainValue);
450
451 }
452
453 public void setCheckedValues(Object checkedValues) {
454
455
456 if (engine.isPropertySetted(Properties.CHECKED_VALUES)==false) {
457 if (CheckTools.setAdaptedValues(getValue(), checkedValues)) {
458 return;
459 }
460
461 boolean mainValue=isCheckable();
462 if (mainValue) {
463 setValue(checkedValues);
464 return;
465 }
466 }
467
468 engine.setValue(Properties.CHECKED_VALUES, checkedValues);
469
470 }
471
472 public Object getExpandedValues(FacesContext facesContext) {
473
474
475 if (engine.isPropertySetted(Properties.EXPANDED_VALUES)) {
476 return engine.getValue(Properties.EXPANDED_VALUES, facesContext);
477 }
478
479 boolean mainValue=this.isExpandable(facesContext) && this.isSelectable(facesContext)==false && this.isCheckable(facesContext)==false;
480
481 return ExpansionTools.getAdaptedValues(getValue(), mainValue);
482
483 }
484
485 public void setExpandedValues(Object expandedValues) {
486
487
488 if (engine.isPropertySetted(Properties.EXPANDED_VALUES)==false) {
489 if (ExpansionTools.setAdaptedValues(getValue(), expandedValues)) {
490 return;
491 }
492
493 boolean mainValue=this.isExpandable() && this.isSelectable()==false && this.isCheckable()==false;
494 if (mainValue) {
495 setValue(expandedValues);
496 return;
497 }
498 }
499
500 engine.setValue(Properties.EXPANDED_VALUES, expandedValues);
501
502 }
503
504 public final void addDoubleClickListener(org.rcfaces.core.event.IDoubleClickListener listener) {
505 addFacesListener(listener);
506 }
507
508 public final void removeDoubleClickListener(org.rcfaces.core.event.IDoubleClickListener listener) {
509 removeFacesListener(listener);
510 }
511
512 public final javax.faces.event.FacesListener [] listDoubleClickListeners() {
513 return getFacesListeners(org.rcfaces.core.event.IDoubleClickListener.class);
514 }
515
516 public int getHorizontalScrollPosition() {
517 return getHorizontalScrollPosition(null);
518 }
519
520
521
522
523 public int getHorizontalScrollPosition(javax.faces.context.FacesContext facesContext) {
524 return engine.getIntProperty(Properties.HORIZONTAL_SCROLL_POSITION,0, facesContext);
525 }
526
527
528
529
530
531 public final boolean isHorizontalScrollPositionSetted() {
532 return engine.isPropertySetted(Properties.HORIZONTAL_SCROLL_POSITION);
533 }
534
535 public void setHorizontalScrollPosition(int horizontalScrollPosition) {
536 engine.setProperty(Properties.HORIZONTAL_SCROLL_POSITION, horizontalScrollPosition);
537 }
538
539 public int getVerticalScrollPosition() {
540 return getVerticalScrollPosition(null);
541 }
542
543
544
545
546 public int getVerticalScrollPosition(javax.faces.context.FacesContext facesContext) {
547 return engine.getIntProperty(Properties.VERTICAL_SCROLL_POSITION,0, facesContext);
548 }
549
550
551
552
553
554 public final boolean isVerticalScrollPositionSetted() {
555 return engine.isPropertySetted(Properties.VERTICAL_SCROLL_POSITION);
556 }
557
558 public void setVerticalScrollPosition(int verticalScrollPosition) {
559 engine.setProperty(Properties.VERTICAL_SCROLL_POSITION, verticalScrollPosition);
560 }
561
562 public boolean isBorder() {
563 return isBorder(null);
564 }
565
566
567
568
569 public boolean isBorder(javax.faces.context.FacesContext facesContext) {
570 return engine.getBoolProperty(Properties.BORDER, true, facesContext);
571 }
572
573
574
575
576
577 public final boolean isBorderSetted() {
578 return engine.isPropertySetted(Properties.BORDER);
579 }
580
581 public void setBorder(boolean border) {
582 engine.setProperty(Properties.BORDER, border);
583 }
584
585 public boolean isReadOnly() {
586 return isReadOnly(null);
587 }
588
589
590
591
592 public boolean isReadOnly(javax.faces.context.FacesContext facesContext) {
593 return engine.getBoolProperty(Properties.READ_ONLY, false, facesContext);
594 }
595
596
597
598
599
600 public final boolean isReadOnlySetted() {
601 return engine.isPropertySetted(Properties.READ_ONLY);
602 }
603
604 public void setReadOnly(boolean readOnly) {
605 engine.setProperty(Properties.READ_ONLY, readOnly);
606 }
607
608 public IMenuComponent getMenu() {
609
610
611 return MenuTools.getMenu(this);
612
613 }
614
615 public IMenuComponent getMenu(String menuId) {
616
617
618 return MenuTools.getMenu(this, menuId);
619
620 }
621
622 public IMenuIterator listMenus() {
623
624
625 return MenuTools.listMenus(this);
626
627 }
628
629 public java.lang.Object getShowValue() {
630 return getShowValue(null);
631 }
632
633
634
635
636 public java.lang.Object getShowValue(javax.faces.context.FacesContext facesContext) {
637 return engine.getProperty(Properties.SHOW_VALUE, facesContext);
638 }
639
640
641
642
643
644 public final boolean isShowValueSetted() {
645 return engine.isPropertySetted(Properties.SHOW_VALUE);
646 }
647
648 public void setShowValue(java.lang.Object showValue) {
649 engine.setProperty(Properties.SHOW_VALUE, showValue);
650 }
651
652 public java.lang.String getOverStyleClass() {
653 return getOverStyleClass(null);
654 }
655
656
657
658
659 public java.lang.String getOverStyleClass(javax.faces.context.FacesContext facesContext) {
660 return engine.getStringProperty(Properties.OVER_STYLE_CLASS, facesContext);
661 }
662
663
664
665
666
667 public final boolean isOverStyleClassSetted() {
668 return engine.isPropertySetted(Properties.OVER_STYLE_CLASS);
669 }
670
671 public void setOverStyleClass(java.lang.String overStyleClass) {
672 engine.setProperty(Properties.OVER_STYLE_CLASS, overStyleClass);
673 }
674
675 public org.rcfaces.core.model.IFilterProperties getFilterProperties() {
676 return getFilterProperties(null);
677 }
678
679
680
681
682 public org.rcfaces.core.model.IFilterProperties getFilterProperties(javax.faces.context.FacesContext facesContext) {
683 return (org.rcfaces.core.model.IFilterProperties)engine.getProperty(Properties.FILTER_PROPERTIES, facesContext);
684 }
685
686
687
688
689
690 public final boolean isFilterPropertiesSetted() {
691 return engine.isPropertySetted(Properties.FILTER_PROPERTIES);
692 }
693
694 public void setFilterProperties(org.rcfaces.core.model.IFilterProperties filterProperties) {
695 engine.setProperty(Properties.FILTER_PROPERTIES, filterProperties);
696 }
697
698 public final void addLoadListener(org.rcfaces.core.event.ILoadListener listener) {
699 addFacesListener(listener);
700 }
701
702 public final void removeLoadListener(org.rcfaces.core.event.ILoadListener listener) {
703 removeFacesListener(listener);
704 }
705
706 public final javax.faces.event.FacesListener [] listLoadListeners() {
707 return getFacesListeners(org.rcfaces.core.event.ILoadListener.class);
708 }
709
710 public final void addExpandListener(org.rcfaces.core.event.IExpandListener listener) {
711 addFacesListener(listener);
712 }
713
714 public final void removeExpandListener(org.rcfaces.core.event.IExpandListener listener) {
715 removeFacesListener(listener);
716 }
717
718 public final javax.faces.event.FacesListener [] listExpandListeners() {
719 return getFacesListeners(org.rcfaces.core.event.IExpandListener.class);
720 }
721
722 public final void addPreSelectionListener(org.rcfaces.core.event.IPreSelectionListener listener) {
723 addFacesListener(listener);
724 }
725
726 public final void removePreSelectionListener(org.rcfaces.core.event.IPreSelectionListener listener) {
727 removeFacesListener(listener);
728 }
729
730 public final javax.faces.event.FacesListener [] listPreSelectionListeners() {
731 return getFacesListeners(org.rcfaces.core.event.IPreSelectionListener.class);
732 }
733
734 public final void addDragListener(org.rcfaces.core.event.IDragListener listener) {
735 addFacesListener(listener);
736 }
737
738 public final void removeDragListener(org.rcfaces.core.event.IDragListener listener) {
739 removeFacesListener(listener);
740 }
741
742 public final javax.faces.event.FacesListener [] listDragListeners() {
743 return getFacesListeners(org.rcfaces.core.event.IDragListener.class);
744 }
745
746 public int getDragEffects() {
747 return getDragEffects(null);
748 }
749
750
751
752
753 public int getDragEffects(javax.faces.context.FacesContext facesContext) {
754 return engine.getIntProperty(Properties.DRAG_EFFECTS,IDragAndDropEffects.UNKNOWN_DND_EFFECT, facesContext);
755 }
756
757
758
759
760
761 public final boolean isDragEffectsSetted() {
762 return engine.isPropertySetted(Properties.DRAG_EFFECTS);
763 }
764
765 public void setDragEffects(int dragEffects) {
766 engine.setProperty(Properties.DRAG_EFFECTS, dragEffects);
767 }
768
769 public java.lang.String[] getDragTypes() {
770 return getDragTypes(null);
771 }
772
773
774
775
776 public java.lang.String[] getDragTypes(javax.faces.context.FacesContext facesContext) {
777 return (java.lang.String[])engine.getProperty(Properties.DRAG_TYPES, facesContext);
778 }
779
780
781
782
783
784 public final boolean isDragTypesSetted() {
785 return engine.isPropertySetted(Properties.DRAG_TYPES);
786 }
787
788 public void setDragTypes(java.lang.String[] dragTypes) {
789 engine.setProperty(Properties.DRAG_TYPES, dragTypes);
790 }
791
792 public boolean isDraggable() {
793 return isDraggable(null);
794 }
795
796
797
798
799 public boolean isDraggable(javax.faces.context.FacesContext facesContext) {
800 return engine.getBoolProperty(Properties.DRAGGABLE, false, facesContext);
801 }
802
803
804
805
806
807 public final boolean isDraggableSetted() {
808 return engine.isPropertySetted(Properties.DRAGGABLE);
809 }
810
811 public void setDraggable(boolean draggable) {
812 engine.setProperty(Properties.DRAGGABLE, draggable);
813 }
814
815 public final void addDropListener(org.rcfaces.core.event.IDropListener listener) {
816 addFacesListener(listener);
817 }
818
819 public final void removeDropListener(org.rcfaces.core.event.IDropListener listener) {
820 removeFacesListener(listener);
821 }
822
823 public final javax.faces.event.FacesListener [] listDropListeners() {
824 return getFacesListeners(org.rcfaces.core.event.IDropListener.class);
825 }
826
827 public final void addDropCompleteListener(org.rcfaces.core.event.IDropCompleteListener listener) {
828 addFacesListener(listener);
829 }
830
831 public final void removeDropCompleteListener(org.rcfaces.core.event.IDropCompleteListener listener) {
832 removeFacesListener(listener);
833 }
834
835 public final javax.faces.event.FacesListener [] listDropCompleteListeners() {
836 return getFacesListeners(org.rcfaces.core.event.IDropCompleteListener.class);
837 }
838
839 public int getDropEffects() {
840 return getDropEffects(null);
841 }
842
843
844
845
846 public int getDropEffects(javax.faces.context.FacesContext facesContext) {
847 return engine.getIntProperty(Properties.DROP_EFFECTS,IDragAndDropEffects.UNKNOWN_DND_EFFECT, facesContext);
848 }
849
850
851
852
853
854 public final boolean isDropEffectsSetted() {
855 return engine.isPropertySetted(Properties.DROP_EFFECTS);
856 }
857
858 public void setDropEffects(int dropEffects) {
859 engine.setProperty(Properties.DROP_EFFECTS, dropEffects);
860 }
861
862 public java.lang.String[] getDropTypes() {
863 return getDropTypes(null);
864 }
865
866
867
868
869 public java.lang.String[] getDropTypes(javax.faces.context.FacesContext facesContext) {
870 return (java.lang.String[])engine.getProperty(Properties.DROP_TYPES, facesContext);
871 }
872
873
874
875
876
877 public final boolean isDropTypesSetted() {
878 return engine.isPropertySetted(Properties.DROP_TYPES);
879 }
880
881 public void setDropTypes(java.lang.String[] dropTypes) {
882 engine.setProperty(Properties.DROP_TYPES, dropTypes);
883 }
884
885 public boolean isDroppable() {
886 return isDroppable(null);
887 }
888
889
890
891
892 public boolean isDroppable(javax.faces.context.FacesContext facesContext) {
893 return engine.getBoolProperty(Properties.DROPPABLE, false, facesContext);
894 }
895
896
897
898
899
900 public final boolean isDroppableSetted() {
901 return engine.isPropertySetted(Properties.DROPPABLE);
902 }
903
904 public void setDroppable(boolean droppable) {
905 engine.setProperty(Properties.DROPPABLE, droppable);
906 }
907
908 public boolean isCheckable() {
909 return isCheckable(null);
910 }
911
912
913
914
915 public boolean isCheckable(javax.faces.context.FacesContext facesContext) {
916 return engine.getBoolProperty(Properties.CHECKABLE, false, facesContext);
917 }
918
919
920
921
922
923 public final boolean isCheckableSetted() {
924 return engine.isPropertySetted(Properties.CHECKABLE);
925 }
926
927 public void setCheckable(boolean checkable) {
928 engine.setProperty(Properties.CHECKABLE, checkable);
929 }
930
931 public int getCheckCardinality() {
932 return getCheckCardinality(null);
933 }
934
935
936
937
938 public int getCheckCardinality(javax.faces.context.FacesContext facesContext) {
939 return engine.getIntProperty(Properties.CHECK_CARDINALITY,0, facesContext);
940 }
941
942
943
944
945
946 public final boolean isCheckCardinalitySetted() {
947 return engine.isPropertySetted(Properties.CHECK_CARDINALITY);
948 }
949
950 public void setCheckCardinality(int checkCardinality) {
951 engine.setProperty(Properties.CHECK_CARDINALITY, checkCardinality);
952 }
953
954 public final void addCheckListener(org.rcfaces.core.event.ICheckListener listener) {
955 addFacesListener(listener);
956 }
957
958 public final void removeCheckListener(org.rcfaces.core.event.ICheckListener listener) {
959 removeFacesListener(listener);
960 }
961
962 public final javax.faces.event.FacesListener [] listCheckListeners() {
963 return getFacesListeners(org.rcfaces.core.event.ICheckListener.class);
964 }
965
966 public java.lang.Object getCheckedValues() {
967 return getCheckedValues(null);
968 }
969
970
971
972
973
974 public final boolean isCheckedValuesSetted() {
975 return engine.isPropertySetted(Properties.CHECKED_VALUES);
976 }
977
978
979
980
981 public Class getCheckedValuesType(javax.faces.context.FacesContext facesContext) {
982 ValueExpression valueExpression=engine.getValueExpressionProperty(Properties.CHECKED_VALUES);
983 if (valueExpression==null) {
984 return null;
985 }
986 if (facesContext==null) {
987 facesContext=javax.faces.context.FacesContext.getCurrentInstance();
988 }
989 return valueExpression.getType(facesContext.getELContext());
990 }
991
992 public Object getFirstCheckedValue() {
993
994
995 return CheckTools.getFirst(getCheckedValues(), getValue());
996
997 }
998
999 public int getCheckedValuesCount() {
1000
1001
1002 return CheckTools.getCount(getCheckedValues());
1003
1004 }
1005
1006 public Object[] listCheckedValues() {
1007
1008
1009 return CheckTools.listValues(getCheckedValues(), getValue());
1010
1011 }
1012
1013 public int getClientCheckFullState() {
1014 return getClientCheckFullState(null);
1015 }
1016
1017
1018
1019
1020 public int getClientCheckFullState(javax.faces.context.FacesContext facesContext) {
1021 return engine.getIntProperty(Properties.CLIENT_CHECK_FULL_STATE,0, facesContext);
1022 }
1023
1024
1025
1026
1027
1028 public final boolean isClientCheckFullStateSetted() {
1029 return engine.isPropertySetted(Properties.CLIENT_CHECK_FULL_STATE);
1030 }
1031
1032 public void setClientCheckFullState(int clientCheckFullState) {
1033 engine.setProperty(Properties.CLIENT_CHECK_FULL_STATE, clientCheckFullState);
1034 }
1035
1036 public boolean isSelectable() {
1037 return isSelectable(null);
1038 }
1039
1040
1041
1042
1043 public boolean isSelectable(javax.faces.context.FacesContext facesContext) {
1044 return engine.getBoolProperty(Properties.SELECTABLE, false, facesContext);
1045 }
1046
1047
1048
1049
1050
1051 public final boolean isSelectableSetted() {
1052 return engine.isPropertySetted(Properties.SELECTABLE);
1053 }
1054
1055 public void setSelectable(boolean selectable) {
1056 engine.setProperty(Properties.SELECTABLE, selectable);
1057 }
1058
1059 public int getSelectionCardinality() {
1060 return getSelectionCardinality(null);
1061 }
1062
1063
1064
1065
1066 public int getSelectionCardinality(javax.faces.context.FacesContext facesContext) {
1067 return engine.getIntProperty(Properties.SELECTION_CARDINALITY,0, facesContext);
1068 }
1069
1070
1071
1072
1073
1074 public final boolean isSelectionCardinalitySetted() {
1075 return engine.isPropertySetted(Properties.SELECTION_CARDINALITY);
1076 }
1077
1078 public void setSelectionCardinality(int selectionCardinality) {
1079 engine.setProperty(Properties.SELECTION_CARDINALITY, selectionCardinality);
1080 }
1081
1082 public final void addSelectionListener(org.rcfaces.core.event.ISelectionListener listener) {
1083 addFacesListener(listener);
1084 }
1085
1086 public final void removeSelectionListener(org.rcfaces.core.event.ISelectionListener listener) {
1087 removeFacesListener(listener);
1088 }
1089
1090 public final javax.faces.event.FacesListener [] listSelectionListeners() {
1091 return getFacesListeners(org.rcfaces.core.event.ISelectionListener.class);
1092 }
1093
1094 public java.lang.Object getSelectedValues() {
1095 return getSelectedValues(null);
1096 }
1097
1098
1099
1100
1101
1102 public final boolean isSelectedValuesSetted() {
1103 return engine.isPropertySetted(Properties.SELECTED_VALUES);
1104 }
1105
1106
1107
1108
1109 public Class getSelectedValuesType(javax.faces.context.FacesContext facesContext) {
1110 ValueExpression valueExpression=engine.getValueExpressionProperty(Properties.SELECTED_VALUES);
1111 if (valueExpression==null) {
1112 return null;
1113 }
1114 if (facesContext==null) {
1115 facesContext=javax.faces.context.FacesContext.getCurrentInstance();
1116 }
1117 return valueExpression.getType(facesContext.getELContext());
1118 }
1119
1120 public Object getFirstSelectedValue() {
1121
1122
1123 return SelectionTools.getFirst(getSelectedValues(), getValue());
1124
1125 }
1126
1127 public int getSelectedValuesCount() {
1128
1129
1130 return SelectionTools.getCount(getSelectedValues());
1131
1132 }
1133
1134 public Object[] listSelectedValues() {
1135
1136
1137 return SelectionTools.listValues(getSelectedValues(), getValue());
1138
1139 }
1140
1141 public int getClientSelectionFullState() {
1142 return getClientSelectionFullState(null);
1143 }
1144
1145
1146
1147
1148 public int getClientSelectionFullState(javax.faces.context.FacesContext facesContext) {
1149 return engine.getIntProperty(Properties.CLIENT_SELECTION_FULL_STATE,0, facesContext);
1150 }
1151
1152
1153
1154
1155
1156 public final boolean isClientSelectionFullStateSetted() {
1157 return engine.isPropertySetted(Properties.CLIENT_SELECTION_FULL_STATE);
1158 }
1159
1160 public void setClientSelectionFullState(int clientSelectionFullState) {
1161 engine.setProperty(Properties.CLIENT_SELECTION_FULL_STATE, clientSelectionFullState);
1162 }
1163
1164 public int getPreloadedLevelDepth() {
1165 return getPreloadedLevelDepth(null);
1166 }
1167
1168
1169
1170
1171 public int getPreloadedLevelDepth(javax.faces.context.FacesContext facesContext) {
1172 return engine.getIntProperty(Properties.PRELOADED_LEVEL_DEPTH,-1, facesContext);
1173 }
1174
1175
1176
1177
1178
1179 public final boolean isPreloadedLevelDepthSetted() {
1180 return engine.isPropertySetted(Properties.PRELOADED_LEVEL_DEPTH);
1181 }
1182
1183 public void setPreloadedLevelDepth(int preloadedLevelDepth) {
1184 engine.setProperty(Properties.PRELOADED_LEVEL_DEPTH, preloadedLevelDepth);
1185 }
1186
1187 public boolean isExpandable() {
1188 return isExpandable(null);
1189 }
1190
1191
1192
1193
1194 public boolean isExpandable(javax.faces.context.FacesContext facesContext) {
1195 return engine.getBoolProperty(Properties.EXPANDABLE, true, facesContext);
1196 }
1197
1198
1199
1200
1201
1202 public final boolean isExpandableSetted() {
1203 return engine.isPropertySetted(Properties.EXPANDABLE);
1204 }
1205
1206 public void setExpandable(boolean expandable) {
1207 engine.setProperty(Properties.EXPANDABLE, expandable);
1208 }
1209
1210 public java.lang.Object getExpandedValues() {
1211 return getExpandedValues(null);
1212 }
1213
1214
1215
1216
1217
1218 public final boolean isExpandedValuesSetted() {
1219 return engine.isPropertySetted(Properties.EXPANDED_VALUES);
1220 }
1221
1222
1223
1224
1225 public Class getExpandedValuesType(javax.faces.context.FacesContext facesContext) {
1226 ValueExpression valueExpression=engine.getValueExpressionProperty(Properties.EXPANDED_VALUES);
1227 if (valueExpression==null) {
1228 return null;
1229 }
1230 if (facesContext==null) {
1231 facesContext=javax.faces.context.FacesContext.getCurrentInstance();
1232 }
1233 return valueExpression.getType(facesContext.getELContext());
1234 }
1235
1236 public Object[] listExpandedValues() {
1237
1238
1239 return ExpansionTools.listValues(this, getExpandedValues(), getValue());
1240
1241 }
1242
1243 public int getExpandedValuesCount() {
1244
1245
1246 return ExpansionTools.getCount(this, getExpandedValues());
1247
1248 }
1249
1250
1251
1252
1253
1254 public String getDefaultImageURL() {
1255 return getDefaultImageURL(null);
1256 }
1257
1258
1259
1260
1261
1262 public String getDefaultImageURL(javax.faces.context.FacesContext facesContext) {
1263 return engine.getStringProperty(Properties.DEFAULT_IMAGE_URL, facesContext);
1264 }
1265
1266
1267
1268
1269
1270 public void setDefaultImageURL(String defaultImageURL) {
1271 engine.setProperty(Properties.DEFAULT_IMAGE_URL, defaultImageURL);
1272 }
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282 public boolean isDefaultImageURLSetted() {
1283 return engine.isPropertySetted(Properties.DEFAULT_IMAGE_URL);
1284 }
1285
1286
1287
1288
1289
1290 public String getDefaultSelectedImageURL() {
1291 return getDefaultSelectedImageURL(null);
1292 }
1293
1294
1295
1296
1297
1298 public String getDefaultSelectedImageURL(javax.faces.context.FacesContext facesContext) {
1299 return engine.getStringProperty(Properties.DEFAULT_SELECTED_IMAGE_URL, facesContext);
1300 }
1301
1302
1303
1304
1305
1306 public void setDefaultSelectedImageURL(String defaultSelectedImageURL) {
1307 engine.setProperty(Properties.DEFAULT_SELECTED_IMAGE_URL, defaultSelectedImageURL);
1308 }
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318 public boolean isDefaultSelectedImageURLSetted() {
1319 return engine.isPropertySetted(Properties.DEFAULT_SELECTED_IMAGE_URL);
1320 }
1321
1322
1323
1324
1325
1326 public String getDefaultExpandedImageURL() {
1327 return getDefaultExpandedImageURL(null);
1328 }
1329
1330
1331
1332
1333
1334 public String getDefaultExpandedImageURL(javax.faces.context.FacesContext facesContext) {
1335 return engine.getStringProperty(Properties.DEFAULT_EXPANDED_IMAGE_URL, facesContext);
1336 }
1337
1338
1339
1340
1341
1342 public void setDefaultExpandedImageURL(String defaultExpandedImageURL) {
1343 engine.setProperty(Properties.DEFAULT_EXPANDED_IMAGE_URL, defaultExpandedImageURL);
1344 }
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354 public boolean isDefaultExpandedImageURLSetted() {
1355 return engine.isPropertySetted(Properties.DEFAULT_EXPANDED_IMAGE_URL);
1356 }
1357
1358 public String getDefaultCollapsedImageURL() {
1359 return getDefaultCollapsedImageURL(null);
1360 }
1361
1362 public String getDefaultCollapsedImageURL(javax.faces.context.FacesContext facesContext) {
1363 return engine.getStringProperty(Properties.DEFAULT_COLLAPSED_IMAGE_URL, facesContext);
1364 }
1365
1366 public void setDefaultCollapsedImageURL(String defaultCollapsedImageURL) {
1367 engine.setProperty(Properties.DEFAULT_COLLAPSED_IMAGE_URL, defaultCollapsedImageURL);
1368 }
1369
1370
1371
1372
1373
1374 public boolean isDefaultCollapsedImageURLSetted() {
1375 return engine.isPropertySetted(Properties.DEFAULT_COLLAPSED_IMAGE_URL);
1376 }
1377
1378
1379
1380
1381
1382 public String getDefaultDisabledImageURL() {
1383 return getDefaultDisabledImageURL(null);
1384 }
1385
1386
1387
1388
1389
1390 public String getDefaultDisabledImageURL(javax.faces.context.FacesContext facesContext) {
1391 return engine.getStringProperty(Properties.DEFAULT_DISABLED_IMAGE_URL, facesContext);
1392 }
1393
1394
1395
1396
1397
1398 public void setDefaultDisabledImageURL(String defaultDisabledImageURL) {
1399 engine.setProperty(Properties.DEFAULT_DISABLED_IMAGE_URL, defaultDisabledImageURL);
1400 }
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410 public boolean isDefaultDisabledImageURLSetted() {
1411 return engine.isPropertySetted(Properties.DEFAULT_DISABLED_IMAGE_URL);
1412 }
1413
1414
1415
1416
1417
1418 public String getDefaultLeafImageURL() {
1419 return getDefaultLeafImageURL(null);
1420 }
1421
1422
1423
1424
1425
1426 public String getDefaultLeafImageURL(javax.faces.context.FacesContext facesContext) {
1427 return engine.getStringProperty(Properties.DEFAULT_LEAF_IMAGE_URL, facesContext);
1428 }
1429
1430
1431
1432
1433
1434 public void setDefaultLeafImageURL(String defaultLeafImageURL) {
1435 engine.setProperty(Properties.DEFAULT_LEAF_IMAGE_URL, defaultLeafImageURL);
1436 }
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446 public boolean isDefaultLeafImageURLSetted() {
1447 return engine.isPropertySetted(Properties.DEFAULT_LEAF_IMAGE_URL);
1448 }
1449
1450 public String getDefaultSelectedLeafImageURL() {
1451 return getDefaultSelectedLeafImageURL(null);
1452 }
1453
1454 public String getDefaultSelectedLeafImageURL(javax.faces.context.FacesContext facesContext) {
1455 return engine.getStringProperty(Properties.DEFAULT_SELECTED_LEAF_IMAGE_URL, facesContext);
1456 }
1457
1458 public void setDefaultSelectedLeafImageURL(String defaultSelectedLeafImageURL) {
1459 engine.setProperty(Properties.DEFAULT_SELECTED_LEAF_IMAGE_URL, defaultSelectedLeafImageURL);
1460 }
1461
1462
1463
1464
1465
1466 public boolean isDefaultSelectedLeafImageURLSetted() {
1467 return engine.isPropertySetted(Properties.DEFAULT_SELECTED_LEAF_IMAGE_URL);
1468 }
1469
1470 public String getDefaultExpandedLeafImageURL() {
1471 return getDefaultExpandedLeafImageURL(null);
1472 }
1473
1474 public String getDefaultExpandedLeafImageURL(javax.faces.context.FacesContext facesContext) {
1475 return engine.getStringProperty(Properties.DEFAULT_EXPANDED_LEAF_IMAGE_URL, facesContext);
1476 }
1477
1478 public void setDefaultExpandedLeafImageURL(String defaultExpandedLeafImageURL) {
1479 engine.setProperty(Properties.DEFAULT_EXPANDED_LEAF_IMAGE_URL, defaultExpandedLeafImageURL);
1480 }
1481
1482
1483
1484
1485
1486 public boolean isDefaultExpandedLeafImageURLSetted() {
1487 return engine.isPropertySetted(Properties.DEFAULT_EXPANDED_LEAF_IMAGE_URL);
1488 }
1489
1490 public String getDefaultDisabledLeafImageURL() {
1491 return getDefaultDisabledLeafImageURL(null);
1492 }
1493
1494 public String getDefaultDisabledLeafImageURL(javax.faces.context.FacesContext facesContext) {
1495 return engine.getStringProperty(Properties.DEFAULT_DISABLED_LEAF_IMAGE_URL, facesContext);
1496 }
1497
1498 public void setDefaultDisabledLeafImageURL(String defaultDisabledLeafImageURL) {
1499 engine.setProperty(Properties.DEFAULT_DISABLED_LEAF_IMAGE_URL, defaultDisabledLeafImageURL);
1500 }
1501
1502
1503
1504
1505
1506 public boolean isDefaultDisabledLeafImageURLSetted() {
1507 return engine.isPropertySetted(Properties.DEFAULT_DISABLED_LEAF_IMAGE_URL);
1508 }
1509
1510
1511
1512
1513
1514 public boolean isHideRootExpandSign() {
1515 return isHideRootExpandSign(null);
1516 }
1517
1518
1519
1520
1521
1522 public boolean isHideRootExpandSign(javax.faces.context.FacesContext facesContext) {
1523 return engine.getBoolProperty(Properties.HIDE_ROOT_EXPAND_SIGN, false, facesContext);
1524 }
1525
1526
1527
1528
1529
1530 public void setHideRootExpandSign(boolean hideRootExpandSign) {
1531 engine.setProperty(Properties.HIDE_ROOT_EXPAND_SIGN, hideRootExpandSign);
1532 }
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542 public boolean isHideRootExpandSignSetted() {
1543 return engine.isPropertySetted(Properties.HIDE_ROOT_EXPAND_SIGN);
1544 }
1545
1546 public boolean isBodyDroppable() {
1547 return isBodyDroppable(null);
1548 }
1549
1550 public boolean isBodyDroppable(javax.faces.context.FacesContext facesContext) {
1551 return engine.getBoolProperty(Properties.BODY_DROPPABLE, false, facesContext);
1552 }
1553
1554 public void setBodyDroppable(boolean bodyDroppable) {
1555 engine.setProperty(Properties.BODY_DROPPABLE, bodyDroppable);
1556 }
1557
1558
1559
1560
1561
1562 public boolean isBodyDroppableSetted() {
1563 return engine.isPropertySetted(Properties.BODY_DROPPABLE);
1564 }
1565
1566 public Object getCursorValue() {
1567 return getCursorValue(null);
1568 }
1569
1570 public void setCursorValue(Object cursorValue) {
1571 engine.setValue(Properties.CURSOR_VALUE, cursorValue);
1572 }
1573
1574
1575
1576
1577
1578 public boolean isCursorValueSetted() {
1579 return engine.isPropertySetted(Properties.CURSOR_VALUE);
1580 }
1581
1582
1583
1584
1585
1586 public boolean isExpansionUseValue() {
1587 return isExpansionUseValue(null);
1588 }
1589
1590
1591
1592
1593
1594 public boolean isExpansionUseValue(javax.faces.context.FacesContext facesContext) {
1595 return engine.getBoolProperty(Properties.EXPANSION_USE_VALUE, false, facesContext);
1596 }
1597
1598
1599
1600
1601
1602 public void setExpansionUseValue(boolean expansionUseValue) {
1603 engine.setProperty(Properties.EXPANSION_USE_VALUE, expansionUseValue);
1604 }
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614 public boolean isExpansionUseValueSetted() {
1615 return engine.isPropertySetted(Properties.EXPANSION_USE_VALUE);
1616 }
1617
1618 protected Set getCameliaFields() {
1619 return CAMELIA_ATTRIBUTES;
1620 }
1621
1622 protected String getCameliaValueAlias() {
1623 return CAMELIA_VALUE_ALIAS;
1624 }
1625 }