KickJava   Java API By Example, From Geeks To Geeks.

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


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.UICommand;
20 import javax.faces.component.UIComponent;
21
22 /**
23  * @author kevinr
24  */

25 public class ModeListTag extends HtmlComponentTag
26 {
27    /**
28     * @see javax.faces.webapp.UIComponentTag#getComponentType()
29     */

30    public String JavaDoc getComponentType()
31    {
32       return "org.alfresco.faces.ModeList";
33    }
34
35    /**
36     * @see javax.faces.webapp.UIComponentTag#getRendererType()
37     */

38    public String JavaDoc getRendererType()
39    {
40       return "org.alfresco.faces.ModeListRenderer";
41    }
42    
43    /**
44     * @see javax.faces.webapp.UIComponentTag#setProperties(javax.faces.component.UIComponent)
45     */

46    protected void setProperties(UIComponent component)
47    {
48       super.setProperties(component);
49       setActionProperty((UICommand)component, this.action);
50       setActionListenerProperty((UICommand)component, this.actionListener);
51       setStringProperty(component, "labelStyle", this.labelStyle);
52       setStringProperty(component, "labelStyleClass", this.labelStyleClass);
53       setStringProperty(component, "itemStyle", this.itemStyle);
54       setStringProperty(component, "itemStyleClass", this.itemStyleClass);
55       setStringProperty(component, "disabledStyle", this.disabledStyle);
56       setStringProperty(component, "disabledStyleClass", this.disabledStyleClass);
57       setStringProperty(component, "itemLinkStyle", this.itemLinkStyle);
58       setStringProperty(component, "itemLinkStyleClass", this.itemLinkStyleClass);
59       setStringProperty(component, "selectedStyle", this.selectedStyle);
60       setStringProperty(component, "selectedStyleClass", this.selectedStyleClass);
61       setStringProperty(component, "selectedLinkStyle", this.selectedLinkStyle);
62       setStringProperty(component, "selectedLinkStyleClass", this.selectedLinkStyleClass);
63       setStringProperty(component, "selectedImage", this.selectedImage);
64       setIntProperty(component, "itemSpacing", this.itemSpacing);
65       setIntProperty(component, "iconColumnWidth", this.iconColumnWidth);
66       setIntProperty(component, "width", this.width);
67       setStringProperty(component, "menuImage", this.menuImage);
68       setBooleanProperty(component, "menu", this.menu);
69       setBooleanProperty(component, "horizontal", this.horizontal);
70       setBooleanProperty(component, "disabled", this.disabled);
71       setStringProperty(component, "label", this.label);
72       setStringProperty(component, "value", this.value);
73    }
74    
75    /**
76     * @see javax.servlet.jsp.tagext.Tag#release()
77     */

78    public void release()
79    {
80       super.release();
81       this.labelStyle = null;
82       this.labelStyleClass = null;
83       this.itemStyle = null;
84       this.itemStyleClass = null;
85       this.itemLinkStyle = null;
86       this.itemLinkStyleClass = null;
87       this.disabledStyle = null;
88       this.disabledStyleClass = null;
89       this.selectedStyle = null;
90       this.selectedStyleClass = null;
91       this.selectedLinkStyle = null;
92       this.selectedLinkStyleClass = null;
93       this.selectedImage = null;
94       this.itemSpacing = null;
95       this.iconColumnWidth = null;
96       this.horizontal = null;
97       this.width = null;
98       this.label = null;
99       this.action = null;
100       this.actionListener = null;
101       this.value = null;
102       this.disabled = null;
103    }
104
105    /**
106     * Set the itemSpacing
107     *
108     * @param itemSpacing the itemSpacing
109     */

110    public void setItemSpacing(String JavaDoc itemSpacing)
111    {
112       this.itemSpacing = itemSpacing;
113    }
114
115    /**
116     * Set the iconColumnWidth
117     *
118     * @param iconColumnWidth the iconColumnWidth
119     */

120    public void setIconColumnWidth(String JavaDoc iconColumnWidth)
121    {
122       this.iconColumnWidth = iconColumnWidth;
123    }
124
125    /**
126     * Set the label
127     *
128     * @param label the label
129     */

130    public void setLabel(String JavaDoc label)
131    {
132       this.label = label;
133    }
134
135    /**
136     * Set the action
137     *
138     * @param action the action
139     */

140    public void setAction(String JavaDoc action)
141    {
142       this.action = action;
143    }
144
145    /**
146     * Set the actionListener
147     *
148     * @param actionListener the actionListener
149     */

150    public void setActionListener(String JavaDoc actionListener)
151    {
152       this.actionListener = actionListener;
153    }
154
155    /**
156     * Set the value
157     *
158     * @param value the value
159     */

160    public void setValue(String JavaDoc value)
161    {
162       this.value = value;
163    }
164    
165    /**
166     * Set the width
167     *
168     * @param width the width
169     */

170    public void setWidth(String JavaDoc width)
171    {
172       this.width = width;
173    }
174    
175    /**
176     * Set if this component is rendered horizontally
177     *
178     * @param horizontal true if rendered horizontally, false to render vertically
179     */

180    public void setHorizontal(String JavaDoc horizontal)
181    {
182       this.horizontal = horizontal;
183    }
184    
185    /**
186     * Set the labelStyle
187     *
188     * @param labelStyle the labelStyle
189     */

190    public void setLabelStyle(String JavaDoc labelStyle)
191    {
192       this.labelStyle = labelStyle;
193    }
194
195    /**
196     * Set the labelStyleClass
197     *
198     * @param labelStyleClass the labelStyleClass
199     */

200    public void setLabelStyleClass(String JavaDoc labelStyleClass)
201    {
202       this.labelStyleClass = labelStyleClass;
203    }
204
205    /**
206     * Set the itemStyle
207     *
208     * @param itemStyle the itemStyle
209     */

210    public void setItemStyle(String JavaDoc itemStyle)
211    {
212       this.itemStyle = itemStyle;
213    }
214
215    /**
216     * Set the itemStyleClass
217     *
218     * @param itemStyleClass the itemStyleClass
219     */

220    public void setItemStyleClass(String JavaDoc itemStyleClass)
221    {
222       this.itemStyleClass = itemStyleClass;
223    }
224
225    /**
226     * Set the itemLinkStyle
227     *
228     * @param itemLinkStyle the itemLinkStyle
229     */

230    public void setItemLinkStyle(String JavaDoc itemLinkStyle)
231    {
232       this.itemLinkStyle = itemLinkStyle;
233    }
234
235    /**
236     * Set the itemLinkStyleClass
237     *
238     * @param itemLinkStyleClass the itemLinkStyleClass
239     */

240    public void setItemLinkStyleClass(String JavaDoc itemLinkStyleClass)
241    {
242       this.itemLinkStyleClass = itemLinkStyleClass;
243    }
244
245    /**
246     * Set the selectedStyle
247     *
248     * @param selectedStyle the selectedStyle
249     */

250    public void setSelectedStyle(String JavaDoc selectedStyle)
251    {
252       this.selectedStyle = selectedStyle;
253    }
254
255    /**
256     * Set the selectedStyleClass
257     *
258     * @param selectedStyleClass the selectedStyleClass
259     */

260    public void setSelectedStyleClass(String JavaDoc selectedStyleClass)
261    {
262       this.selectedStyleClass = selectedStyleClass;
263    }
264
265    /**
266     * Set the selectedLinkStyle
267     *
268     * @param selectedLinkStyle the selectedLinkStyle
269     */

270    public void setSelectedLinkStyle(String JavaDoc selectedLinkStyle)
271    {
272       this.selectedLinkStyle = selectedLinkStyle;
273    }
274
275    /**
276     * Set the selectedLinkStyleClass
277     *
278     * @param selectedLinkStyleClass the selectedLinkStyleClass
279     */

280    public void setSelectedLinkStyleClass(String JavaDoc selectedLinkStyleClass)
281    {
282       this.selectedLinkStyleClass = selectedLinkStyleClass;
283    }
284    
285    /**
286     * Set the image to show instead of the ListItem icon when the item is selected
287     *
288     * @param selectedImage the selected image
289     */

290    public void setSelectedImage(String JavaDoc selectedImage)
291    {
292       this.selectedImage = selectedImage;
293    }
294
295    /**
296     * Set the disabled flag
297     *
298     * @param disabled true to disable all children
299     */

300    public void setDisabled(String JavaDoc disabled)
301    {
302       this.disabled = disabled;
303    }
304    
305    /**
306     * Set the disabledStyle
307     *
308     * @param disabledStyle the disabledStyle
309     */

310    public void setDisabledStyle(String JavaDoc disabledStyle)
311    {
312       this.disabledStyle = disabledStyle;
313    }
314
315    /**
316     * Set the disabledStyleClass
317     *
318     * @param disabledStyleClass the disabledStyleClass
319     */

320    public void setDisabledStyleClass(String JavaDoc disabledStyleClass)
321    {
322       this.disabledStyleClass = disabledStyleClass;
323    }
324    
325    /**
326     * Set the menu
327     *
328     * @param menu the menu
329     */

330    public void setMenu(String JavaDoc menu)
331    {
332       this.menu = menu;
333    }
334
335    /**
336     * Set the menuImage
337     *
338     * @param menuImage the menuImage
339     */

340    public void setMenuImage(String JavaDoc menuImage)
341    {
342       this.menuImage = menuImage;
343    }
344
345
346    /** the menu */
347    private String JavaDoc menu;
348
349    /** the menuImage */
350    private String JavaDoc menuImage;
351
352    /** the disabledStyle */
353    private String JavaDoc disabledStyle;
354
355    /** the disabledStyleClass */
356    private String JavaDoc disabledStyleClass;
357
358    /** the selectedImage */
359    private String JavaDoc selectedImage;
360
361    /** the labelStyle */
362    private String JavaDoc labelStyle;
363
364    /** the labelStyleClass */
365    private String JavaDoc labelStyleClass;
366
367    /** the itemStyle */
368    private String JavaDoc itemStyle;
369
370    /** the itemStyleClass */
371    private String JavaDoc itemStyleClass;
372
373    /** the itemLinkStyle */
374    private String JavaDoc itemLinkStyle;
375
376    /** the itemLinkStyleClass */
377    private String JavaDoc itemLinkStyleClass;
378
379    /** the selectedStyle */
380    private String JavaDoc selectedStyle;
381
382    /** the selectedStyleClass */
383    private String JavaDoc selectedStyleClass;
384
385    /** the selectedLinkStyle */
386    private String JavaDoc selectedLinkStyle;
387
388    /** the selectedLinkStyleClass */
389    private String JavaDoc selectedLinkStyleClass;
390
391    /** true if rendered horizontally, false to render vertically */
392    private String JavaDoc horizontal;
393
394    /** the width */
395    private String JavaDoc width;
396
397    /** the itemSpacing */
398    private String JavaDoc itemSpacing;
399
400    /** the iconColumnWidth */
401    private String JavaDoc iconColumnWidth;
402
403    /** the label */
404    private String JavaDoc label;
405
406    /** the action */
407    private String JavaDoc action;
408
409    /** the actionListener */
410    private String JavaDoc actionListener;
411
412    /** the value */
413    private String JavaDoc value;
414    
415    /** the disabled flag */
416    private String JavaDoc disabled;
417 }
418
Popular Tags