KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > myfaces > taglib > html > HtmlGraphicImageTagBase


1 /*
2  * Copyright 2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.myfaces.taglib.html;
17
18 import org.apache.myfaces.renderkit.JSFAttr;
19 import org.apache.myfaces.renderkit.html.HTML;
20
21 import javax.faces.component.UIComponent;
22
23
24 /**
25  * @author Manfred Geiler (latest modification by $Author: matzew $)
26  * @author Martin Marinschek
27  * @version $Revision: 1.4 $ $Date: 2005/02/18 17:19:29 $
28  * $Log: HtmlGraphicImageTagBase.java,v $
29  * Revision 1.4 2005/02/18 17:19:29 matzew
30  * added release() to tag clazzes.
31  *
32  * Revision 1.3 2004/10/13 11:51:01 matze
33  * renamed packages to org.apache
34  *
35  * Revision 1.2 2004/07/01 22:01:11 mwessendorf
36  * ASF switch
37  *
38  * Revision 1.1 2004/04/01 12:57:44 manolito
39  * additional extended component classes for user role support
40  *
41  */

42 public abstract class HtmlGraphicImageTagBase
43     extends HtmlComponentTagBase
44 {
45     // UIComponent attributes --> already implemented in UIComponentTagBase
46

47     // user role attributes --> already implemented in UIComponentTagBase
48

49     // HTML universal attributes --> already implemented in HtmlComponentTagBase
50

51     // HTML event handler attributes --> already implemented in HtmlComponentTagBase
52

53     // HTML img attributes relevant for graphic-image
54
private String JavaDoc _align; //FIXME: not in API, HTML 4.0 transitional attribute and not in strict... what to do?
55
private String JavaDoc _alt;
56     private String JavaDoc _border; //FIXME: not in API, HTML 4.0 transitional attribute and not in strict... what to do!
57
private String JavaDoc _height;
58     private String JavaDoc _hspace; //FIXME: not in API, HTML 4.0 transitional attribute and not in strict... what to do!
59
private String JavaDoc _ismap;
60     private String JavaDoc _longdesc;
61     private String JavaDoc _onblur;
62     private String JavaDoc _onchange;
63     private String JavaDoc _onfocus;
64     private String JavaDoc _usemap;
65     private String JavaDoc _vspace; //FIXME: not in API, HTML 4.0 transitional attribute and not in strict... what to do!
66
private String JavaDoc _width;
67
68     //UIGraphic attributes
69
private String JavaDoc _url;
70
71     // HtmlGraphicImage attributes
72
//none so far
73

74     public void release() {
75         super.release();
76         _align=null;
77         _alt=null;
78         _border=null;
79         _height=null;
80         _hspace=null;
81         _ismap=null;
82         _longdesc=null;
83         _onblur=null;
84         _onchange=null;
85         _onfocus=null;
86         _usemap=null;
87         _vspace=null;
88         _width=null;
89     }
90
91     protected void setProperties(UIComponent component)
92     {
93         super.setProperties(component);
94
95         setStringProperty(component, HTML.ALIGN_ATTR, _align);
96         setStringProperty(component, HTML.ALT_ATTR, _alt);
97         setStringProperty(component, HTML.BORDER_ATTR, _border);
98         setStringProperty(component, HTML.HEIGHT_ATTR, _height);
99         setStringProperty(component, HTML.HSPACE_ATTR, _hspace);
100         setBooleanProperty(component, HTML.ISMAP_ATTR, _ismap);
101         setStringProperty(component, HTML.LONGDESC_ATTR, _longdesc);
102         setStringProperty(component, HTML.ONBLUR_ATTR, _onblur);
103         setStringProperty(component, HTML.ONCHANGE_ATTR, _onchange);
104         setStringProperty(component, HTML.ONFOCUS_ATTR, _onfocus);
105         setStringProperty(component, HTML.USEMAP_ATTR, _usemap);
106         setStringProperty(component, HTML.VSPACE_ATTR, _vspace);
107         setStringProperty(component, HTML.WIDTH_ATTR, _width);
108
109         setStringProperty(component, JSFAttr.URL_ATTR, _url);
110    }
111
112     public void setAlign(String JavaDoc align)
113     {
114         _align = align;
115     }
116
117     public void setAlt(String JavaDoc alt)
118     {
119         _alt = alt;
120     }
121
122     public void setBorder(String JavaDoc border)
123     {
124         _border = border;
125     }
126
127     public void setHeight(String JavaDoc height)
128     {
129         _height = height;
130     }
131
132     public void setHspace(String JavaDoc hspace)
133     {
134         _hspace = hspace;
135     }
136
137     public void setIsmap(String JavaDoc ismap)
138     {
139         _ismap = ismap;
140     }
141
142     public void setLongdesc(String JavaDoc longdesc)
143     {
144         _longdesc = longdesc;
145     }
146
147     public void setOnblur(String JavaDoc onblur)
148     {
149         _onblur = onblur;
150     }
151
152     public void setOnchange(String JavaDoc onchange)
153     {
154         _onchange = onchange;
155     }
156
157     public void setOnfocus(String JavaDoc onfocus)
158     {
159         _onfocus = onfocus;
160     }
161
162     public void setUsemap(String JavaDoc usemap)
163     {
164         _usemap = usemap;
165     }
166
167     public void setVspace(String JavaDoc vspace)
168     {
169         _vspace = vspace;
170     }
171
172     public void setWidth(String JavaDoc width)
173     {
174         _width = width;
175     }
176
177     public void setUrl(String JavaDoc url)
178     {
179         _url = url;
180     }
181 }
182
Popular Tags