View Javadoc

1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   *   http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  package org.apache.myfaces.shared_orchestra.taglib.html;
20  
21  import org.apache.myfaces.shared_orchestra.renderkit.html.HTML;
22  
23  import javax.faces.component.UIComponent;
24  
25  
26  /**
27   * @author Manfred Geiler (latest modification by $Author: grantsmith $)
28   * @author Martin Marinschek
29   * @version $Revision: 472618 $ $Date: 2006-11-08 15:06:54 -0500 (Wed, 08 Nov 2006) $
30   */
31  public abstract class HtmlGraphicImageTagBase
32      extends org.apache.myfaces.shared_orchestra.taglib.html.HtmlComponentTagBase
33  {
34      // UIComponent attributes --> already implemented in UIComponentTagBase
35  
36      // user role attributes --> already implemented in UIComponentTagBase
37  
38      // HTML universal attributes --> already implemented in HtmlComponentTagBase
39  
40      // HTML event handler attributes --> already implemented in HtmlComponentTagBase
41  
42      // HTML img attributes relevant for graphic-image
43      private String _alt;
44      private String _height;
45      private String _ismap;
46      private String _longdesc;
47      private String _onblur;
48      private String _onchange;
49      private String _onfocus;
50      private String _usemap;
51      private String _width;
52  
53      //UIGraphic attributes
54      private String _url;
55  
56      // HtmlGraphicImage attributes
57      //none so far
58  
59      public void release() {
60          super.release();
61          _alt=null;
62          _height=null;
63          _ismap=null;
64          _longdesc=null;
65          _onblur=null;
66          _onchange=null;
67          _onfocus=null;
68          _usemap=null;
69          _width=null;
70      }
71  
72      protected void setProperties(UIComponent component)
73      {
74          super.setProperties(component);
75  
76          setStringProperty(component, HTML.ALT_ATTR, _alt);
77          setStringProperty(component, HTML.HEIGHT_ATTR, _height);
78          setBooleanProperty(component, org.apache.myfaces.shared_orchestra.renderkit.html.HTML.ISMAP_ATTR, _ismap);
79          setStringProperty(component, HTML.LONGDESC_ATTR, _longdesc);
80          setStringProperty(component, HTML.ONBLUR_ATTR, _onblur);
81          setStringProperty(component, HTML.ONCHANGE_ATTR, _onchange);
82          setStringProperty(component, HTML.ONFOCUS_ATTR, _onfocus);
83          setStringProperty(component, org.apache.myfaces.shared_orchestra.renderkit.html.HTML.USEMAP_ATTR, _usemap);
84          setStringProperty(component, org.apache.myfaces.shared_orchestra.renderkit.html.HTML.WIDTH_ATTR, _width);
85  
86          setStringProperty(component, org.apache.myfaces.shared_orchestra.renderkit.JSFAttr.URL_ATTR, _url);
87     }
88  
89      public void setAlt(String alt)
90      {
91          _alt = alt;
92      }
93  
94      public void setHeight(String height)
95      {
96          _height = height;
97      }
98  
99      public void setIsmap(String ismap)
100     {
101         _ismap = ismap;
102     }
103 
104     public void setLongdesc(String longdesc)
105     {
106         _longdesc = longdesc;
107     }
108 
109     public void setOnblur(String onblur)
110     {
111         _onblur = onblur;
112     }
113 
114     public void setOnchange(String onchange)
115     {
116         _onchange = onchange;
117     }
118 
119     public void setOnfocus(String onfocus)
120     {
121         _onfocus = onfocus;
122     }
123 
124     public void setUsemap(String usemap)
125     {
126         _usemap = usemap;
127     }
128 
129     public void setWidth(String width)
130     {
131         _width = width;
132     }
133 
134     public void setUrl(String url)
135     {
136         _url = url;
137     }
138 }