KickJava   Java API By Example, From Geeks To Geeks.

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


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 /**
23  * Base class for tags that represent HTML components.
24  *
25  * @author kevinr
26  */

27 public abstract class HtmlComponentTag extends BaseComponentTag
28 {
29    /**
30     * @see javax.faces.webapp.UIComponentTag#setProperties(javax.faces.component.UIComponent)
31     */

32    protected void setProperties(UIComponent component)
33    {
34       super.setProperties(component);
35       
36       setStringProperty(component, "style", this.style);
37       setStringProperty(component, "styleClass", this.styleClass);
38       setStringProperty(component, "tooltip", this.tooltip);
39    }
40    
41    /**
42     * @see javax.servlet.jsp.tagext.Tag#release()
43     */

44    public void release()
45    {
46       super.release();
47       this.style = null;
48       this.styleClass = null;
49       this.tooltip = null;
50    }
51
52    /**
53     * Set the style
54     *
55     * @param style the style
56     */

57    public void setStyle(String JavaDoc style)
58    {
59       this.style = style;
60    }
61
62    /**
63     * Set the styleClass
64     *
65     * @param styleClass the styleClass
66     */

67    public void setStyleClass(String JavaDoc styleClass)
68    {
69       this.styleClass = styleClass;
70    }
71
72    /**
73     * Set the tooltip
74     *
75     * @param tooltip the tooltip
76     */

77    public void setTooltip(String JavaDoc tooltip)
78    {
79       this.tooltip = tooltip;
80    }
81
82
83    /** the tooltip */
84    private String JavaDoc tooltip;
85
86    /** the style */
87    private String JavaDoc style;
88
89    /** the CSS style class */
90    private String JavaDoc styleClass;
91 }
92
Popular Tags