KickJava   Java API By Example, From Geeks To Geeks.

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


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  * @author kevinr
23  */

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

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

37    public String JavaDoc getRendererType()
38    {
39       // the component is self renderering
40
return null;
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       setStringProperty(component, "label", this.label);
50       setStringProperty(component, "image", this.image);
51       setStringProperty(component, "menuStyle", this.menuStyle);
52       setStringProperty(component, "menuStyleClass", this.menuStyleClass);
53       setIntProperty(component, "itemSpacing", this.itemSpacing);
54    }
55    
56    /**
57     * @see javax.servlet.jsp.tagext.Tag#release()
58     */

59    public void release()
60    {
61       super.release();
62       this.label = null;
63       this.image = null;
64       this.menuStyle = null;
65       this.menuStyleClass = null;
66       this.itemSpacing = null;
67    }
68    
69    /**
70     * Set the label
71     *
72     * @param label the label
73     */

74    public void setLabel(String JavaDoc label)
75    {
76       this.label = label;
77    }
78    
79    /**
80     * Set the image
81     *
82     * @param image the image
83     */

84    public void setImage(String JavaDoc image)
85    {
86       this.image = image;
87    }
88    
89    /**
90     * Set the menuStyle
91     *
92     * @param menuStyle the menuStyle
93     */

94    public void setMenuStyle(String JavaDoc menuStyle)
95    {
96       this.menuStyle = menuStyle;
97    }
98
99    /**
100     * Set the menuStyleClass
101     *
102     * @param menuStyleClass the menuStyleClass
103     */

104    public void setMenuStyleClass(String JavaDoc menuStyleClass)
105    {
106       this.menuStyleClass = menuStyleClass;
107    }
108
109    /**
110     * Set the itemSpacing
111     *
112     * @param itemSpacing the itemSpacing
113     */

114    public void setItemSpacing(String JavaDoc itemSpacing)
115    {
116       this.itemSpacing = itemSpacing;
117    }
118
119
120    /** the menuStyle */
121    private String JavaDoc menuStyle;
122
123    /** the menuStyleClass */
124    private String JavaDoc menuStyleClass;
125
126    /** the itemSpacing */
127    private String JavaDoc itemSpacing;
128
129    /** the image */
130    private String JavaDoc image;
131
132    /** the label */
133    private String JavaDoc label;
134 }
135
Popular Tags