View Javadoc

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  	 * See {@link #getFor() getFor()} for more details
42  	 */
43  	public java.lang.String getFor(javax.faces.context.FacesContext facesContext) {
44  		return engine.getStringProperty(Properties.FOR, facesContext);
45  	}
46  
47  	/**
48  	 * Returns <code>true</code> if the attribute "for" is set.
49  	 * @return <code>true</code> if the attribute is set.
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  	 * See {@link #getGroupName() getGroupName()} for more details
65  	 */
66  	public java.lang.String getGroupName(javax.faces.context.FacesContext facesContext) {
67  		return engine.getStringProperty(Properties.GROUP_NAME, facesContext);
68  	}
69  
70  	/**
71  	 * Returns <code>true</code> if the attribute "groupName" is set.
72  	 * @return <code>true</code> if the attribute is set.
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  	 * Returns a string value specifying the type of data (Java) to convert to or from.
84  	 * @return type of data
85  	 */
86  	public String getType() {
87  		return getType(null);
88  	}
89  
90  	/**
91  	 * Returns a string value specifying the type of data (Java) to convert to or from.
92  	 * @return type of data
93  	 */
94  	public String getType(javax.faces.context.FacesContext facesContext) {
95  		return engine.getStringProperty(Properties.TYPE, facesContext);
96  	}
97  
98  	/**
99  	 * Sets a string value specifying the type of data (Java) to convert to or from.
100 	 * @param type type of data
101 	 */
102 	public void setType(String type) {
103 		engine.setProperty(Properties.TYPE, type);
104 	}
105 
106 	/**
107 	 * Sets a string value specifying the type of data (Java) to convert to or from.
108 	 * @param type type of data
109 	 */
110 	/**
111 	 * Returns <code>true</code> if the attribute "type" is set.
112 	 * @return <code>true</code> if the attribute is set.
113 	 */
114 	public boolean isTypeSetted() {
115 		return engine.isPropertySetted(Properties.TYPE);
116 	}
117 
118 	protected Set getCameliaFields() {
119 		return CAMELIA_ATTRIBUTES;
120 	}
121 }