1 package org.rcfaces.core.component;
2
3 import javax.faces.component.NamingContainer;
4 import org.rcfaces.core.internal.component.Properties;
5 import javax.el.ValueExpression;
6 import org.apache.commons.logging.Log;
7 import java.util.HashSet;
8 import org.apache.commons.logging.LogFactory;
9 import java.util.Arrays;
10 import java.util.Set;
11 import org.rcfaces.core.component.ToolFolderComponent;
12
13 public class TextEditorToolFolderComponent extends ToolFolderComponent implements
14 NamingContainer {
15
16 private static final Log LOG = LogFactory.getLog(TextEditorToolFolderComponent.class);
17
18 public static final String COMPONENT_TYPE="org.rcfaces.core.textEditorToolFolder";
19
20 protected static final Set CAMELIA_ATTRIBUTES=new HashSet(ToolFolderComponent.CAMELIA_ATTRIBUTES);
21 static {
22 CAMELIA_ATTRIBUTES.addAll(Arrays.asList(new String[] {"fontSizes","for","itemTypes","fontNames"}));
23 }
24
25 public TextEditorToolFolderComponent() {
26 setRendererType(COMPONENT_TYPE);
27 }
28
29 public TextEditorToolFolderComponent(String componentId) {
30 this();
31 setId(componentId);
32 }
33
34 public String getItemTypes() {
35 return getItemTypes(null);
36 }
37
38 public String getItemTypes(javax.faces.context.FacesContext facesContext) {
39 return engine.getStringProperty(Properties.ITEM_TYPES, facesContext);
40 }
41
42 public void setItemTypes(String itemTypes) {
43 engine.setProperty(Properties.ITEM_TYPES, itemTypes);
44 }
45
46
47
48
49
50 public boolean isItemTypesSetted() {
51 return engine.isPropertySetted(Properties.ITEM_TYPES);
52 }
53
54 public String getFontSizes() {
55 return getFontSizes(null);
56 }
57
58 public String getFontSizes(javax.faces.context.FacesContext facesContext) {
59 return engine.getStringProperty(Properties.FONT_SIZES, facesContext);
60 }
61
62 public void setFontSizes(String fontSizes) {
63 engine.setProperty(Properties.FONT_SIZES, fontSizes);
64 }
65
66
67
68
69
70 public boolean isFontSizesSetted() {
71 return engine.isPropertySetted(Properties.FONT_SIZES);
72 }
73
74 public String getFontNames() {
75 return getFontNames(null);
76 }
77
78 public String getFontNames(javax.faces.context.FacesContext facesContext) {
79 return engine.getStringProperty(Properties.FONT_NAMES, facesContext);
80 }
81
82 public void setFontNames(String fontNames) {
83 engine.setProperty(Properties.FONT_NAMES, fontNames);
84 }
85
86
87
88
89
90 public boolean isFontNamesSetted() {
91 return engine.isPropertySetted(Properties.FONT_NAMES);
92 }
93
94 public String getFor() {
95 return getFor(null);
96 }
97
98 public String getFor(javax.faces.context.FacesContext facesContext) {
99 return engine.getStringProperty(Properties.FOR, facesContext);
100 }
101
102 public void setFor(String forVal) {
103 engine.setProperty(Properties.FOR, forVal);
104 }
105
106
107
108
109
110 public boolean isForSetted() {
111 return engine.isPropertySetted(Properties.FOR);
112 }
113
114 protected Set getCameliaFields() {
115 return CAMELIA_ATTRIBUTES;
116 }
117 }