KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > alfresco > web > ui > common > tag > ImagePickerRadioTag


1 /*
2  * Copyright (C) 2005 Alfresco, Inc.
3  *
4  * Licensed under the Mozilla Public License version 1.1
5  * with a permitted attribution clause. You may obtain a
6  * copy of the License at
7  *
8  * http://www.alfresco.org/legal/license.txt
9  *
10  * Unless required by applicable law or agreed to in writing,
11  * software distributed under the License is distributed on an
12  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13  * either express or implied. See the License for the specific
14  * language governing permissions and limitations under the
15  * License.
16  */

17 package org.alfresco.web.ui.common.tag;
18
19 import javax.faces.component.UIComponent;
20
21 /**
22  * Tag to combine the image picker component and radio renderer
23  *
24  * @author gavinc
25  */

26 public class ImagePickerRadioTag extends HtmlComponentTag
27 {
28    /** the labelStyle */
29    private String JavaDoc labelStyle;
30
31    /** the labelStyleClass */
32    private String JavaDoc labelStyleClass;
33
34    /** the spacing */
35    private String JavaDoc spacing;
36
37    /** the columns */
38    private String JavaDoc columns;
39    
40    /** the label */
41    private String JavaDoc label;
42
43    /** the value */
44    private String JavaDoc value;
45    
46    /** the image */
47    private String JavaDoc image;
48    
49    /** the onclick handler */
50    private String JavaDoc onclick;
51    
52    /** the name of the config section to lookup to get the icons */
53    private String JavaDoc configSection;
54    
55    /**
56     * @see javax.faces.webapp.UIComponentTag#getComponentType()
57     */

58    public String JavaDoc getComponentType()
59    {
60       return "org.alfresco.faces.ImagePicker";
61    }
62
63    /**
64     * @see javax.faces.webapp.UIComponentTag#getRendererType()
65     */

66    public String JavaDoc getRendererType()
67    {
68       return "org.alfresco.faces.Radio";
69    }
70    
71    /**
72     * @see javax.faces.webapp.UIComponentTag#setProperties(javax.faces.component.UIComponent)
73     */

74    protected void setProperties(UIComponent component)
75    {
76       super.setProperties(component);
77       setStringProperty(component, "labelStyle", this.labelStyle);
78       setStringProperty(component, "labelStyleClass", this.labelStyleClass);
79       setStringProperty(component, "label", this.label);
80       setStringProperty(component, "value", this.value);
81       setStringProperty(component, "image", this.image);
82       setStringProperty(component, "onclick", this.onclick);
83       setStringProperty(component, "configSection", this.configSection);
84       setIntProperty(component, "spacing", this.spacing);
85       setIntProperty(component, "columns", this.columns);
86    }
87    
88    /**
89     * @see javax.servlet.jsp.tagext.Tag#release()
90     */

91    public void release()
92    {
93       super.release();
94       this.labelStyle = null;
95       this.labelStyleClass = null;
96       this.spacing = null;
97       this.label = null;
98       this.value = null;
99       this.image = null;
100       this.columns = null;
101       this.onclick = null;
102       this.configSection = null;
103    }
104
105    /**
106     * @return Returns the image.
107     */

108    public String JavaDoc getImage()
109    {
110       return image;
111    }
112
113    /**
114     * @param image The image to set.
115     */

116    public void setImage(String JavaDoc image)
117    {
118       this.image = image;
119    }
120
121    /**
122     * @return Returns the label.
123     */

124    public String JavaDoc getLabel()
125    {
126       return label;
127    }
128
129    /**
130     * @param label The label to set.
131     */

132    public void setLabel(String JavaDoc label)
133    {
134       this.label = label;
135    }
136
137    /**
138     * @return Returns the labelStyle.
139     */

140    public String JavaDoc getLabelStyle()
141    {
142       return labelStyle;
143    }
144
145    /**
146     * @param labelStyle The labelStyle to set.
147     */

148    public void setLabelStyle(String JavaDoc labelStyle)
149    {
150       this.labelStyle = labelStyle;
151    }
152
153    /**
154     * @return Returns the labelStyleClass.
155     */

156    public String JavaDoc getLabelStyleClass()
157    {
158       return labelStyleClass;
159    }
160
161    /**
162     * @param labelStyleClass The labelStyleClass to set.
163     */

164    public void setLabelStyleClass(String JavaDoc labelStyleClass)
165    {
166       this.labelStyleClass = labelStyleClass;
167    }
168
169    /**
170     * @return Returns the spacing.
171     */

172    public String JavaDoc getSpacing()
173    {
174       return spacing;
175    }
176
177    /**
178     * @param spacing The spacing to set.
179     */

180    public void setSpacing(String JavaDoc spacing)
181    {
182       this.spacing = spacing;
183    }
184
185    /**
186     * @return Returns the value.
187     */

188    public String JavaDoc getValue()
189    {
190       return value;
191    }
192
193    /**
194     * @param value The value to set.
195     */

196    public void setValue(String JavaDoc value)
197    {
198       this.value = value;
199    }
200
201    /**
202     * @return Returns the columns.
203     */

204    public String JavaDoc getColumns()
205    {
206       return columns;
207    }
208    
209    /**
210     * @param columns The columns to set.
211     */

212    public void setColumns(String JavaDoc columns)
213    {
214       this.columns = columns;
215    }
216
217    /**
218     * @return Returns the onclick.
219     */

220    public String JavaDoc getOnclick()
221    {
222       return onclick;
223    }
224
225    /**
226     * @param onclick The onclick to set.
227     */

228    public void setOnclick(String JavaDoc onclick)
229    {
230       this.onclick = onclick;
231    }
232
233    /**
234     * @return Returns the config section to lookup
235     */

236    public String JavaDoc getConfigSection()
237    {
238       return this.configSection;
239    }
240
241    /**
242     * @param configSection The config section to lookup
243     */

244    public void setConfigSection(String JavaDoc configSection)
245    {
246       this.configSection = configSection;
247    }
248 }
249
Popular Tags