1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
|
17 | |
|
18 | |
|
19 | |
package javax.faces.component.html; |
20 | |
|
21 | |
import javax.el.ValueExpression; |
22 | |
import javax.faces.context.FacesContext; |
23 | |
import javax.faces.component.UIComponent; |
24 | |
|
25 | |
|
26 | |
|
27 | |
|
28 | |
|
29 | |
|
30 | |
public class HtmlGraphicImage extends javax.faces.component.UIGraphic |
31 | |
implements javax.faces.component.behavior.ClientBehaviorHolder |
32 | |
{ |
33 | |
|
34 | |
static public final String COMPONENT_FAMILY = |
35 | |
"javax.faces.Graphic"; |
36 | |
static public final String COMPONENT_TYPE = |
37 | |
"javax.faces.HtmlGraphicImage"; |
38 | |
|
39 | |
|
40 | |
public HtmlGraphicImage() |
41 | 0 | { |
42 | 0 | setRendererType("javax.faces.Image"); |
43 | 0 | } |
44 | |
|
45 | |
@Override |
46 | |
public String getFamily() |
47 | |
{ |
48 | 0 | return COMPONENT_FAMILY; |
49 | |
} |
50 | |
|
51 | |
|
52 | 0 | static private final java.util.Collection<String> CLIENT_EVENTS_LIST = |
53 | |
java.util.Collections.unmodifiableCollection( |
54 | |
java.util.Arrays.asList( |
55 | |
"click" |
56 | |
, "dblclick" |
57 | |
, "keydown" |
58 | |
, "keypress" |
59 | |
, "keyup" |
60 | |
, "mousedown" |
61 | |
, "mousemove" |
62 | |
, "mouseout" |
63 | |
, "mouseover" |
64 | |
, "mouseup" |
65 | |
)); |
66 | |
|
67 | |
public java.util.Collection<String> getEventNames() |
68 | |
{ |
69 | 0 | return CLIENT_EVENTS_LIST; |
70 | |
} |
71 | |
|
72 | |
|
73 | |
|
74 | |
|
75 | |
public String getHeight() |
76 | |
{ |
77 | 0 | return (String) getStateHelper().eval(PropertyKeys.height); |
78 | |
} |
79 | |
|
80 | |
public void setHeight(String height) |
81 | |
{ |
82 | 0 | getStateHelper().put(PropertyKeys.height, height ); |
83 | 0 | } |
84 | |
|
85 | |
|
86 | |
public boolean isIsmap() |
87 | |
{ |
88 | 0 | return (Boolean) getStateHelper().eval(PropertyKeys.ismap, false); |
89 | |
} |
90 | |
|
91 | |
public void setIsmap(boolean ismap) |
92 | |
{ |
93 | 0 | getStateHelper().put(PropertyKeys.ismap, ismap ); |
94 | 0 | } |
95 | |
|
96 | |
|
97 | |
public String getLongdesc() |
98 | |
{ |
99 | 0 | return (String) getStateHelper().eval(PropertyKeys.longdesc); |
100 | |
} |
101 | |
|
102 | |
public void setLongdesc(String longdesc) |
103 | |
{ |
104 | 0 | getStateHelper().put(PropertyKeys.longdesc, longdesc ); |
105 | 0 | } |
106 | |
|
107 | |
|
108 | |
public String getUsemap() |
109 | |
{ |
110 | 0 | return (String) getStateHelper().eval(PropertyKeys.usemap); |
111 | |
} |
112 | |
|
113 | |
public void setUsemap(String usemap) |
114 | |
{ |
115 | 0 | getStateHelper().put(PropertyKeys.usemap, usemap ); |
116 | 0 | } |
117 | |
|
118 | |
|
119 | |
public String getWidth() |
120 | |
{ |
121 | 0 | return (String) getStateHelper().eval(PropertyKeys.width); |
122 | |
} |
123 | |
|
124 | |
public void setWidth(String width) |
125 | |
{ |
126 | 0 | getStateHelper().put(PropertyKeys.width, width ); |
127 | 0 | } |
128 | |
|
129 | |
|
130 | |
public String getStyle() |
131 | |
{ |
132 | 0 | return (String) getStateHelper().eval(PropertyKeys.style); |
133 | |
} |
134 | |
|
135 | |
public void setStyle(String style) |
136 | |
{ |
137 | 0 | getStateHelper().put(PropertyKeys.style, style ); |
138 | 0 | } |
139 | |
|
140 | |
|
141 | |
public String getStyleClass() |
142 | |
{ |
143 | 0 | return (String) getStateHelper().eval(PropertyKeys.styleClass); |
144 | |
} |
145 | |
|
146 | |
public void setStyleClass(String styleClass) |
147 | |
{ |
148 | 0 | getStateHelper().put(PropertyKeys.styleClass, styleClass ); |
149 | 0 | } |
150 | |
|
151 | |
|
152 | |
public String getAlt() |
153 | |
{ |
154 | 0 | return (String) getStateHelper().eval(PropertyKeys.alt); |
155 | |
} |
156 | |
|
157 | |
public void setAlt(String alt) |
158 | |
{ |
159 | 0 | getStateHelper().put(PropertyKeys.alt, alt ); |
160 | 0 | } |
161 | |
|
162 | |
|
163 | |
public String getOnclick() |
164 | |
{ |
165 | 0 | return (String) getStateHelper().eval(PropertyKeys.onclick); |
166 | |
} |
167 | |
|
168 | |
public void setOnclick(String onclick) |
169 | |
{ |
170 | 0 | getStateHelper().put(PropertyKeys.onclick, onclick ); |
171 | 0 | } |
172 | |
|
173 | |
|
174 | |
public String getOndblclick() |
175 | |
{ |
176 | 0 | return (String) getStateHelper().eval(PropertyKeys.ondblclick); |
177 | |
} |
178 | |
|
179 | |
public void setOndblclick(String ondblclick) |
180 | |
{ |
181 | 0 | getStateHelper().put(PropertyKeys.ondblclick, ondblclick ); |
182 | 0 | } |
183 | |
|
184 | |
|
185 | |
public String getOnkeydown() |
186 | |
{ |
187 | 0 | return (String) getStateHelper().eval(PropertyKeys.onkeydown); |
188 | |
} |
189 | |
|
190 | |
public void setOnkeydown(String onkeydown) |
191 | |
{ |
192 | 0 | getStateHelper().put(PropertyKeys.onkeydown, onkeydown ); |
193 | 0 | } |
194 | |
|
195 | |
|
196 | |
public String getOnkeypress() |
197 | |
{ |
198 | 0 | return (String) getStateHelper().eval(PropertyKeys.onkeypress); |
199 | |
} |
200 | |
|
201 | |
public void setOnkeypress(String onkeypress) |
202 | |
{ |
203 | 0 | getStateHelper().put(PropertyKeys.onkeypress, onkeypress ); |
204 | 0 | } |
205 | |
|
206 | |
|
207 | |
public String getOnkeyup() |
208 | |
{ |
209 | 0 | return (String) getStateHelper().eval(PropertyKeys.onkeyup); |
210 | |
} |
211 | |
|
212 | |
public void setOnkeyup(String onkeyup) |
213 | |
{ |
214 | 0 | getStateHelper().put(PropertyKeys.onkeyup, onkeyup ); |
215 | 0 | } |
216 | |
|
217 | |
|
218 | |
public String getOnmousedown() |
219 | |
{ |
220 | 0 | return (String) getStateHelper().eval(PropertyKeys.onmousedown); |
221 | |
} |
222 | |
|
223 | |
public void setOnmousedown(String onmousedown) |
224 | |
{ |
225 | 0 | getStateHelper().put(PropertyKeys.onmousedown, onmousedown ); |
226 | 0 | } |
227 | |
|
228 | |
|
229 | |
public String getOnmousemove() |
230 | |
{ |
231 | 0 | return (String) getStateHelper().eval(PropertyKeys.onmousemove); |
232 | |
} |
233 | |
|
234 | |
public void setOnmousemove(String onmousemove) |
235 | |
{ |
236 | 0 | getStateHelper().put(PropertyKeys.onmousemove, onmousemove ); |
237 | 0 | } |
238 | |
|
239 | |
|
240 | |
public String getOnmouseout() |
241 | |
{ |
242 | 0 | return (String) getStateHelper().eval(PropertyKeys.onmouseout); |
243 | |
} |
244 | |
|
245 | |
public void setOnmouseout(String onmouseout) |
246 | |
{ |
247 | 0 | getStateHelper().put(PropertyKeys.onmouseout, onmouseout ); |
248 | 0 | } |
249 | |
|
250 | |
|
251 | |
public String getOnmouseover() |
252 | |
{ |
253 | 0 | return (String) getStateHelper().eval(PropertyKeys.onmouseover); |
254 | |
} |
255 | |
|
256 | |
public void setOnmouseover(String onmouseover) |
257 | |
{ |
258 | 0 | getStateHelper().put(PropertyKeys.onmouseover, onmouseover ); |
259 | 0 | } |
260 | |
|
261 | |
|
262 | |
public String getOnmouseup() |
263 | |
{ |
264 | 0 | return (String) getStateHelper().eval(PropertyKeys.onmouseup); |
265 | |
} |
266 | |
|
267 | |
public void setOnmouseup(String onmouseup) |
268 | |
{ |
269 | 0 | getStateHelper().put(PropertyKeys.onmouseup, onmouseup ); |
270 | 0 | } |
271 | |
|
272 | |
|
273 | |
public String getDir() |
274 | |
{ |
275 | 0 | return (String) getStateHelper().eval(PropertyKeys.dir); |
276 | |
} |
277 | |
|
278 | |
public void setDir(String dir) |
279 | |
{ |
280 | 0 | getStateHelper().put(PropertyKeys.dir, dir ); |
281 | 0 | } |
282 | |
|
283 | |
|
284 | |
public String getLang() |
285 | |
{ |
286 | 0 | return (String) getStateHelper().eval(PropertyKeys.lang); |
287 | |
} |
288 | |
|
289 | |
public void setLang(String lang) |
290 | |
{ |
291 | 0 | getStateHelper().put(PropertyKeys.lang, lang ); |
292 | 0 | } |
293 | |
|
294 | |
|
295 | |
public String getTitle() |
296 | |
{ |
297 | 0 | return (String) getStateHelper().eval(PropertyKeys.title); |
298 | |
} |
299 | |
|
300 | |
public void setTitle(String title) |
301 | |
{ |
302 | 0 | getStateHelper().put(PropertyKeys.title, title ); |
303 | 0 | } |
304 | |
|
305 | 0 | protected enum PropertyKeys |
306 | |
{ |
307 | 0 | height |
308 | 0 | , ismap |
309 | 0 | , longdesc |
310 | 0 | , usemap |
311 | 0 | , width |
312 | 0 | , style |
313 | 0 | , styleClass |
314 | 0 | , alt |
315 | 0 | , onclick |
316 | 0 | , ondblclick |
317 | 0 | , onkeydown |
318 | 0 | , onkeypress |
319 | 0 | , onkeyup |
320 | 0 | , onmousedown |
321 | 0 | , onmousemove |
322 | 0 | , onmouseout |
323 | 0 | , onmouseover |
324 | 0 | , onmouseup |
325 | 0 | , dir |
326 | 0 | , lang |
327 | 0 | , title |
328 | |
} |
329 | |
|
330 | |
} |