1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.gwtwidgets.client.ext;
18
19 import org.gwtwidgets.client.ext.impl.ExtDOMImpl;
20 import com.google.gwt.core.client.GWT;
21 import com.google.gwt.user.client.DOM;
22 import com.google.gwt.user.client.Element;
23
24
25 public class ExtDOM extends DOM
26 {
27 private static ExtDOMImpl impl;
28 static {
29 impl = (ExtDOMImpl) GWT.create(ExtDOMImpl.class);
30 }
31
32
33
34 public static Element createElementNS (Namespace ns, String tag)
35 {
36 return impl.createElementNS(ns, tag);
37 }
38
39 /***
40 * Set a namespace attr, using the namespace of the element.
41 */
42 public static void setAttributeNS (Element elem, String attr, String value)
43 {
44 impl.setAttributeNS(elem, attr, value);
45 }
46
47 /***
48 * Set a namespace attr, using the namespace of the element.
49 */
50 public static void setIntAttributeNS (Element elem, String attr, int value)
51 {
52 setAttributeNS(elem, attr, Integer.toString(value));
53 }
54
55
56 public static void setAttributeNS (Namespace ns, Element elem, String attr, String value)
57 {
58 impl.setAttributeNS(ns, elem, attr, value);
59 }
60
61 }