1 /**********************************************
2 * Copyright (C) 2010 Lukas Laag
3 * This file is part of lib-gwt-svg.
4 *
5 * libgwtsvg is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * libgwtsvg is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with libgwtsvg. If not, see http://www.gnu.org/licenses/
17 **********************************************/
18 /*
19 * Copyright (c) 2004 World Wide Web Consortium,
20 *
21 * (Massachusetts Institute of Technology, European Research Consortium for
22 * Informatics and Mathematics, Keio University). All Rights Reserved. This
23 * work is distributed under the W3C(r) Software License [1] in the hope that
24 * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
25 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
26 *
27 * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
28 */
29
30 package org.vectomatic.dom.svg.impl;
31
32 import org.vectomatic.dom.svg.OMSVGAngle;
33 import org.vectomatic.dom.svg.OMSVGAnimatedAngle;
34 import org.vectomatic.dom.svg.OMSVGAnimatedBoolean;
35 import org.vectomatic.dom.svg.OMSVGAnimatedEnumeration;
36 import org.vectomatic.dom.svg.OMSVGAnimatedLength;
37 import org.vectomatic.dom.svg.OMSVGAnimatedPreserveAspectRatio;
38 import org.vectomatic.dom.svg.OMSVGAnimatedRect;
39
40 import com.google.gwt.core.client.JavaScriptException;
41
42 /**
43 * The {@link org.vectomatic.dom.svg.impl.SVGMarkerElement} interface corresponds
44 * to the <a href='http://www.w3.org/TR/SVG11/painting.html#MarkerElement'
45 * title='marker element specification'>marker</a> element.
46 */
47 public class SVGMarkerElement extends SVGElement {
48 protected SVGMarkerElement() {
49 }
50
51 // Implementation of the svg::SVGMarkerElement W3C IDL interface
52 /**
53 * Corresponds to attribute {@link org.vectomatic.dom.svg.impl.SVGMarkerElement#getRefX()}
54 * on the given <a href='http://www.w3.org/TR/SVG11/painting.html#MarkerElement'
55 * title='marker element specification'>marker</a> element.
56 */
57 public final native OMSVGAnimatedLength getRefX() /*-{
58 return this.refX;
59 }-*/;
60 /**
61 * Corresponds to attribute {@link org.vectomatic.dom.svg.impl.SVGMarkerElement#getRefY()}
62 * on the given <a href='http://www.w3.org/TR/SVG11/painting.html#MarkerElement'
63 * title='marker element specification'>marker</a> element.
64 */
65 public final native OMSVGAnimatedLength getRefY() /*-{
66 return this.refY;
67 }-*/;
68 /**
69 * Corresponds to attribute {@link org.vectomatic.dom.svg.impl.SVGMarkerElement#getMarkerUnits()}
70 * on the given <a href='http://www.w3.org/TR/SVG11/painting.html#MarkerElement'
71 * title='marker element specification'>marker</a> element. One of the Marker
72 * Unit Types defined on this interface.
73 */
74 public final native OMSVGAnimatedEnumeration getMarkerUnits() /*-{
75 return this.markerUnits;
76 }-*/;
77 /**
78 * Corresponds to attribute {@link org.vectomatic.dom.svg.impl.SVGMarkerElement#getMarkerWidth()}
79 * on the given <a href='http://www.w3.org/TR/SVG11/painting.html#MarkerElement'
80 * title='marker element specification'>marker</a> element.
81 */
82 public final native OMSVGAnimatedLength getMarkerWidth() /*-{
83 return this.markerWidth;
84 }-*/;
85 /**
86 * Corresponds to attribute {@link org.vectomatic.dom.svg.impl.SVGMarkerElement#getMarkerHeight()}
87 * on the given <a href='http://www.w3.org/TR/SVG11/painting.html#MarkerElement'
88 * title='marker element specification'>marker</a> element.
89 */
90 public final native OMSVGAnimatedLength getMarkerHeight() /*-{
91 return this.markerHeight;
92 }-*/;
93 /**
94 * Corresponds to attribute <code>orient</code> on the given <a href='http://www.w3.org/TR/SVG11/painting.html#MarkerElement'
95 * title='marker element specification'>marker</a> element. One of the Marker
96 * Orientation Types defined on this interface.
97 */
98 public final native OMSVGAnimatedEnumeration getOrientType() /*-{
99 return this.orientType;
100 }-*/;
101 /**
102 * Corresponds to attribute <code>orient</code> on the given <a href='http://www.w3.org/TR/SVG11/painting.html#MarkerElement'
103 * title='marker element specification'>marker</a> element. If {@link org.vectomatic.dom.svg.impl.SVGMarkerElement#getMarkerUnits()}
104 * is SVG_MARKER_ORIENT_ANGLE, the angle value for attribute <code>orient</code>;
105 * otherwise, it will be set to zero.
106 */
107 public final native OMSVGAnimatedAngle getOrientAngle() /*-{
108 return this.orientAngle;
109 }-*/;
110 /**
111 * Sets the value of attribute <code>orient</code> to <span class='attr-value'>'auto'</span>.
112 * @throws DOMException(NO_MODIFICATION_ALLOWED_ERR) Raised on an attempt
113 * to change the value of a <a href="svgdom.html#ReadOnlyNodes">read only
114 * attribute</a>.
115 */
116 public final native void setOrientToAuto() throws JavaScriptException /*-{
117 this.setOrientToAuto();
118 }-*/;
119 /**
120 * Sets the value of attribute <code>orient</code> to the given angle.
121 * @param angle The angle value to use for attribute <code>orient</code>.
122 * @throws DOMException(NO_MODIFICATION_ALLOWED_ERR) Raised on an attempt
123 * to change the value of a <a href="svgdom.html#ReadOnlyNodes">read only
124 * attribute</a>.
125 */
126 public final native void setOrientToAngle(OMSVGAngle angle) throws JavaScriptException /*-{
127 this.setOrientToAngle(angle);
128 }-*/;
129
130 // Implementation of the svg::SVGExternalResourcesRequired W3C IDL interface
131 /**
132 * Corresponds to attribute {@link org.vectomatic.dom.svg.itf.ISVGExternalResourcesRequired#getExternalResourcesRequired()}
133 * on the given element. Note that the SVG DOM defines the attribute {@link
134 * org.vectomatic.dom.svg.itf.ISVGExternalResourcesRequired#getExternalResourcesRequired()}
135 * as being of type {@link org.vectomatic.dom.svg.OMSVGAnimatedBoolean}, whereas
136 * the SVG language definition says that {@link org.vectomatic.dom.svg.itf.ISVGExternalResourcesRequired#getExternalResourcesRequired()}
137 * is not animated. Because the SVG language definition states that {@link
138 * org.vectomatic.dom.svg.itf.ISVGExternalResourcesRequired#getExternalResourcesRequired()}
139 * cannot be animated, the {@link org.vectomatic.dom.svg.OMSVGAnimatedBoolean#getAnimVal()}
140 * will always be the same as the {@link org.vectomatic.dom.svg.OMSVGAnimatedBoolean#getBaseVal()}.
141 */
142 public final native OMSVGAnimatedBoolean getExternalResourcesRequired() /*-{
143 return this.externalResourcesRequired;
144 }-*/;
145
146 // Implementation of the svg::SVGFitToViewBox W3C IDL interface
147 /**
148 * Corresponds to attribute {@link org.vectomatic.dom.svg.itf.ISVGFitToViewBox#getViewBox()}
149 * on the given element.
150 */
151 public final native OMSVGAnimatedRect getViewBox() /*-{
152 return this.viewBox;
153 }-*/;
154 /**
155 * Corresponds to attribute {@link org.vectomatic.dom.svg.itf.ISVGFitToViewBox#getPreserveAspectRatio()}
156 * on the given element.
157 */
158 public final native OMSVGAnimatedPreserveAspectRatio getPreserveAspectRatio() /*-{
159 return this.preserveAspectRatio;
160 }-*/;
161
162 // Implementation of the svg::SVGLangSpace W3C IDL interface
163 /**
164 * Corresponds to attribute <code>xml:lang</code> on the given element.
165 */
166 public final native String getXmllang() /*-{
167 return this.xmllang;
168 }-*/;
169 /**
170 * Corresponds to attribute <code>xml:lang</code> on the given element.
171 * @throws DOMException(NO_MODIFICATION_ALLOWED_ERR) Raised on an attempt
172 * to change the value of a <a href="svgdom.html#ReadOnlyNodes">read only
173 * attribute</a>.
174 */
175 public final native void setXmllang(String value) throws JavaScriptException /*-{
176 this.xmllang = value;
177 }-*/;
178 /**
179 * Corresponds to attribute <code>xml:space</code> on the given element.
180 */
181 public final native String getXmlspace() /*-{
182 return this.xmlspace;
183 }-*/;
184 /**
185 * Corresponds to attribute <code>xml:space</code> on the given element.
186 * @throws DOMException(NO_MODIFICATION_ALLOWED_ERR) Raised on an attempt
187 * to change the value of a <a href="svgdom.html#ReadOnlyNodes">read only
188 * attribute</a>.
189 */
190 public final native void setXmlspace(String value) throws JavaScriptException /*-{
191 this.xmlspace = value;
192 }-*/;
193
194 }