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