1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30 package org.vectomatic.dom.svg;
31
32 import org.vectomatic.dom.svg.events.ActivateEvent;
33 import org.vectomatic.dom.svg.events.ActivateHandler;
34 import org.vectomatic.dom.svg.events.FocusInEvent;
35 import org.vectomatic.dom.svg.events.FocusInHandler;
36 import org.vectomatic.dom.svg.events.FocusOutEvent;
37 import org.vectomatic.dom.svg.events.FocusOutHandler;
38 import org.vectomatic.dom.svg.events.HasGraphicalHandlers;
39 import org.vectomatic.dom.svg.impl.SVGElement;
40 import org.vectomatic.dom.svg.impl.SVGForeignObjectElement;
41 import org.vectomatic.dom.svg.itf.ISVGExternalResourcesRequired;
42 import org.vectomatic.dom.svg.itf.ISVGLangSpace;
43 import org.vectomatic.dom.svg.itf.ISVGStylable;
44 import org.vectomatic.dom.svg.itf.ISVGTests;
45 import org.vectomatic.dom.svg.itf.ISVGTransformable;
46 import org.vectomatic.dom.svg.utils.DOMHelper;
47 import org.vectomatic.dom.svg.utils.SVGConstants;
48
49 import com.google.gwt.core.client.JavaScriptException;
50 import com.google.gwt.dom.client.TagName;
51 import com.google.gwt.event.dom.client.ClickEvent;
52 import com.google.gwt.event.dom.client.ClickHandler;
53 import com.google.gwt.event.dom.client.DragEndEvent;
54 import com.google.gwt.event.dom.client.DragEndHandler;
55 import com.google.gwt.event.dom.client.DragEnterEvent;
56 import com.google.gwt.event.dom.client.DragEnterHandler;
57 import com.google.gwt.event.dom.client.DragEvent;
58 import com.google.gwt.event.dom.client.DragHandler;
59 import com.google.gwt.event.dom.client.DragLeaveEvent;
60 import com.google.gwt.event.dom.client.DragLeaveHandler;
61 import com.google.gwt.event.dom.client.DragOverEvent;
62 import com.google.gwt.event.dom.client.DragOverHandler;
63 import com.google.gwt.event.dom.client.DragStartEvent;
64 import com.google.gwt.event.dom.client.DragStartHandler;
65 import com.google.gwt.event.dom.client.DropEvent;
66 import com.google.gwt.event.dom.client.DropHandler;
67 import com.google.gwt.event.dom.client.LoadEvent;
68 import com.google.gwt.event.dom.client.LoadHandler;
69 import com.google.gwt.event.dom.client.MouseDownEvent;
70 import com.google.gwt.event.dom.client.MouseDownHandler;
71 import com.google.gwt.event.dom.client.MouseMoveEvent;
72 import com.google.gwt.event.dom.client.MouseMoveHandler;
73 import com.google.gwt.event.dom.client.MouseOutEvent;
74 import com.google.gwt.event.dom.client.MouseOutHandler;
75 import com.google.gwt.event.dom.client.MouseOverEvent;
76 import com.google.gwt.event.dom.client.MouseOverHandler;
77 import com.google.gwt.event.dom.client.MouseUpEvent;
78 import com.google.gwt.event.dom.client.MouseUpHandler;
79 import com.google.gwt.event.dom.client.TouchCancelEvent;
80 import com.google.gwt.event.dom.client.TouchCancelHandler;
81 import com.google.gwt.event.dom.client.TouchEndEvent;
82 import com.google.gwt.event.dom.client.TouchEndHandler;
83 import com.google.gwt.event.dom.client.TouchMoveEvent;
84 import com.google.gwt.event.dom.client.TouchMoveHandler;
85 import com.google.gwt.event.dom.client.TouchStartEvent;
86 import com.google.gwt.event.dom.client.TouchStartHandler;
87 import com.google.gwt.event.shared.HandlerRegistration;
88
89
90
91
92
93
94 @TagName("foreignObject")
95 public class OMSVGForeignObjectElement extends OMSVGElement implements HasGraphicalHandlers, ISVGTests, ISVGLangSpace, ISVGExternalResourcesRequired, ISVGStylable, ISVGTransformable {
96 public OMSVGForeignObjectElement() {
97 this((SVGForeignObjectElement)DOMHelper.createElementNS(DOMHelper.getCurrentDocument(), SVGConstants.SVG_NAMESPACE_URI, SVGConstants.SVG_FOREIGN_OBJECT_TAG).cast());
98 }
99
100 protected OMSVGForeignObjectElement(SVGForeignObjectElement ot) {
101 super(ot);
102 }
103
104
105
106
107
108
109
110 public final OMSVGAnimatedLength getX() {
111 return ((SVGForeignObjectElement)ot).getX();
112 }
113
114
115
116
117
118 public final OMSVGAnimatedLength getY() {
119 return ((SVGForeignObjectElement)ot).getY();
120 }
121
122
123
124
125
126 public final OMSVGAnimatedLength getWidth() {
127 return ((SVGForeignObjectElement)ot).getWidth();
128 }
129
130
131
132
133
134 public final OMSVGAnimatedLength getHeight() {
135 return ((SVGForeignObjectElement)ot).getHeight();
136 }
137
138
139
140
141
142
143
144
145
146
147
148
149
150 public final OMSVGAnimatedBoolean getExternalResourcesRequired() {
151 return ((SVGForeignObjectElement)ot).getExternalResourcesRequired();
152 }
153
154
155
156
157
158 public final String getXmllang() {
159 return ((SVGForeignObjectElement)ot).getXmllang();
160 }
161
162
163
164
165
166
167 public final void setXmllang(java.lang.String value) throws JavaScriptException {
168 ((SVGForeignObjectElement)ot).setXmllang(value);
169 }
170
171
172
173 public final String getXmlspace() {
174 return ((SVGForeignObjectElement)ot).getXmlspace();
175 }
176
177
178
179
180
181
182 public final void setXmlspace(java.lang.String value) throws JavaScriptException {
183 ((SVGForeignObjectElement)ot).setXmlspace(value);
184 }
185
186
187
188
189
190
191
192
193
194 public final OMSVGElement getNearestViewportElement() {
195 SVGElement elt = ((SVGForeignObjectElement)ot).getNearestViewportElement();
196 return elt != null ? (OMSVGElement)convert(elt) : null;
197 }
198
199
200
201
202
203
204 public final OMSVGElement getFarthestViewportElement() {
205 SVGElement elt = ((SVGForeignObjectElement)ot).getFarthestViewportElement();
206 return elt != null ? (OMSVGElement)convert(elt) : null;
207 }
208
209
210
211
212
213
214
215
216
217
218 public final OMSVGRect getBBox() {
219 return ((SVGForeignObjectElement)ot).getBBox();
220 }
221
222
223
224
225
226
227
228 public final OMSVGMatrix getCTM() {
229 return ((SVGForeignObjectElement)ot).getCTM();
230 }
231
232
233
234
235
236
237
238
239
240
241
242
243
244 public final OMSVGMatrix getScreenCTM() {
245 return ((SVGForeignObjectElement)ot).getScreenCTM();
246 }
247
248
249
250
251
252
253
254
255
256
257
258
259 public final OMSVGMatrix getTransformToElement(OMSVGElement element) throws JavaScriptException {
260 return ((SVGForeignObjectElement)ot).getTransformToElement(((SVGElement)element.ot));
261 }
262
263
264
265
266
267
268 public final OMSVGStringList getRequiredFeatures() {
269 return ((SVGForeignObjectElement)ot).getRequiredFeatures();
270 }
271
272
273
274
275 public final OMSVGStringList getRequiredExtensions() {
276 return ((SVGForeignObjectElement)ot).getRequiredExtensions();
277 }
278
279
280
281
282 public final OMSVGStringList getSystemLanguage() {
283 return ((SVGForeignObjectElement)ot).getSystemLanguage();
284 }
285
286
287
288
289
290
291 public final boolean hasExtension(String extension) {
292 return ((SVGForeignObjectElement)ot).hasExtension(extension);
293 }
294
295
296
297
298
299
300 public final OMSVGAnimatedTransformList getTransform() {
301 return ((SVGForeignObjectElement)ot).getTransform();
302 }
303
304 @Override
305 public final HandlerRegistration addClickHandler(ClickHandler handler) {
306 return addDomHandler(handler, ClickEvent.getType());
307 }
308 @Override
309 public final HandlerRegistration addDragEndHandler(DragEndHandler handler) {
310 return addDomHandler(handler, DragEndEvent.getType());
311 }
312 @Override
313 public final HandlerRegistration addDragEnterHandler(DragEnterHandler handler) {
314 return addDomHandler(handler, DragEnterEvent.getType());
315 }
316 @Override
317 public final HandlerRegistration addDragHandler(DragHandler handler) {
318 return addDomHandler(handler, DragEvent.getType());
319 }
320 @Override
321 public final HandlerRegistration addDragLeaveHandler(DragLeaveHandler handler) {
322 return addDomHandler(handler, DragLeaveEvent.getType());
323 }
324 @Override
325 public final HandlerRegistration addDragOverHandler(DragOverHandler handler) {
326 return addDomHandler(handler, DragOverEvent.getType());
327 }
328 @Override
329 public final HandlerRegistration addDragStartHandler(DragStartHandler handler) {
330 return addDomHandler(handler, DragStartEvent.getType());
331 }
332 @Override
333 public final HandlerRegistration addDropHandler(DropHandler handler) {
334 return addDomHandler(handler, DropEvent.getType());
335 }
336 @Override
337 public final HandlerRegistration addLoadHandler(LoadHandler handler) {
338 return addDomHandler(handler, LoadEvent.getType());
339 }
340 @Override
341 public final HandlerRegistration addMouseDownHandler(MouseDownHandler handler) {
342 return addDomHandler(handler, MouseDownEvent.getType());
343 }
344 @Override
345 public final HandlerRegistration addMouseMoveHandler(MouseMoveHandler handler) {
346 return addDomHandler(handler, MouseMoveEvent.getType());
347 }
348 @Override
349 public final HandlerRegistration addMouseOutHandler(MouseOutHandler handler) {
350 return addDomHandler(handler, MouseOutEvent.getType());
351 }
352 @Override
353 public final HandlerRegistration addMouseOverHandler(MouseOverHandler handler) {
354 return addDomHandler(handler, MouseOverEvent.getType());
355 }
356 @Override
357 public final HandlerRegistration addMouseUpHandler(MouseUpHandler handler) {
358 return addDomHandler(handler, MouseUpEvent.getType());
359 }
360 @Override
361 public final HandlerRegistration addTouchCancelHandler(TouchCancelHandler handler) {
362 return addDomHandler(handler, TouchCancelEvent.getType());
363 }
364 @Override
365 public final HandlerRegistration addTouchEndHandler(TouchEndHandler handler) {
366 return addDomHandler(handler, TouchEndEvent.getType());
367 }
368 @Override
369 public final HandlerRegistration addTouchMoveHandler(TouchMoveHandler handler) {
370 return addDomHandler(handler, TouchMoveEvent.getType());
371 }
372 @Override
373 public final HandlerRegistration addTouchStartHandler(TouchStartHandler handler) {
374 return addDomHandler(handler, TouchStartEvent.getType());
375 }
376 @Override
377 public final HandlerRegistration addActivateHandler(ActivateHandler handler) {
378 return addDomHandler(handler, ActivateEvent.getType());
379 }
380 @Override
381 public final HandlerRegistration addFocusInHandler(FocusInHandler handler) {
382 return addDomHandler(handler, FocusInEvent.getType());
383 }
384 @Override
385 public final HandlerRegistration addFocusOutHandler(FocusOutHandler handler) {
386 return addDomHandler(handler, FocusOutEvent.getType());
387 }
388 }