1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.seasar.teeda.core.taglib.html; |
17 | |
|
18 | |
import javax.faces.component.UIComponent; |
19 | |
import javax.faces.component.html.HtmlGraphicImage; |
20 | |
|
21 | |
import org.seasar.teeda.core.JsfConstants; |
22 | |
import org.seasar.teeda.core.taglib.UIComponentTagBase; |
23 | |
|
24 | |
|
25 | |
|
26 | |
|
27 | 3 | public class GraphicImageTag extends UIComponentTagBase { |
28 | |
|
29 | |
private String url; |
30 | |
|
31 | |
public String getComponentType() { |
32 | 1 | return HtmlGraphicImage.COMPONENT_TYPE; |
33 | |
} |
34 | |
|
35 | |
public String getRendererType() { |
36 | 2 | return "javax.faces.Image"; |
37 | |
} |
38 | |
|
39 | |
protected void setProperties(UIComponent component) { |
40 | 1 | super.setProperties(component); |
41 | 1 | setComponentProperty(component, JsfConstants.URL_ATTR, getUrl()); |
42 | 1 | setComponentProperty(component, JsfConstants.ALT_ATTR, getAlt()); |
43 | 1 | setComponentProperty(component, JsfConstants.HEIGHT_ATTR, getHeight()); |
44 | 1 | setComponentProperty(component, JsfConstants.ISMAP_ATTR, getIsmap()); |
45 | 1 | setComponentProperty(component, JsfConstants.LONGDESC_ATTR, |
46 | |
getLongdesc()); |
47 | 1 | setComponentProperty(component, JsfConstants.USEMAP_ATTR, getUsemap()); |
48 | 1 | setComponentProperty(component, JsfConstants.WIDTH_ATTR, getWidth()); |
49 | 1 | setComponentProperty(component, JsfConstants.BORDER_ATTR, getBorder()); |
50 | 1 | } |
51 | |
|
52 | |
public void release() { |
53 | 1 | super.release(); |
54 | 1 | url = null; |
55 | 1 | } |
56 | |
|
57 | |
public void setUrl(String url) { |
58 | 2 | this.url = url; |
59 | 2 | } |
60 | |
|
61 | |
public String getUrl() { |
62 | 2 | return url; |
63 | |
} |
64 | |
|
65 | |
} |