1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.myfaces.taglib.html.ext;
20
21 import javax.faces.component.UIComponent;
22
23 import org.apache.myfaces.shared_tomahawk.renderkit.html.HTML;
24 import org.apache.myfaces.shared_tomahawk.taglib.html.HtmlGraphicImageTagBase;
25 import org.apache.myfaces.component.UserRoleAware;
26 import org.apache.myfaces.component.html.ext.HtmlGraphicImage;
27
28
29
30
31
32 public class HtmlGraphicImageTag
33 extends HtmlGraphicImageTagBase
34 {
35 public String getComponentType()
36 {
37 return HtmlGraphicImage.COMPONENT_TYPE;
38 }
39
40 public String getRendererType()
41 {
42 return HtmlGraphicImage.DEFAULT_RENDERER_TYPE;
43 }
44
45 private String _align;
46 private String _border;
47 private String _enabledOnUserRole;
48 private String _hspace;
49 private String _visibleOnUserRole;
50 private String _vspace;
51
52 public void release() {
53 super.release();
54
55 _align=null;
56 _border=null;
57 _enabledOnUserRole=null;
58 _hspace=null;
59 _visibleOnUserRole=null;
60 _vspace=null;
61 }
62
63 protected void setProperties(UIComponent component)
64 {
65 super.setProperties(component);
66
67 setStringProperty(component, HTML.ALIGN_ATTR, _align);
68 setStringProperty(component, HTML.BORDER_ATTR, _border);
69 setStringProperty(component, HTML.HSPACE_ATTR, _hspace);
70 setStringProperty(component, HTML.VSPACE_ATTR, _vspace);
71 setStringProperty(component, UserRoleAware.ENABLED_ON_USER_ROLE_ATTR, _enabledOnUserRole);
72 setStringProperty(component, UserRoleAware.VISIBLE_ON_USER_ROLE_ATTR, _visibleOnUserRole);
73 }
74
75 public void setAlign(String align)
76 {
77 _align = align;
78 }
79
80 public void setBorder(String border)
81 {
82 _border = border;
83 }
84
85 public void setHspace(String hspace)
86 {
87 _hspace = hspace;
88 }
89
90 public void setVspace(String vspace)
91 {
92 _vspace = vspace;
93 }
94
95 public void setEnabledOnUserRole(String enabledOnUserRole)
96 {
97 _enabledOnUserRole = enabledOnUserRole;
98 }
99
100 public void setVisibleOnUserRole(String visibleOnUserRole)
101 {
102 _visibleOnUserRole = visibleOnUserRole;
103 }
104
105 }