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.OMSVGAnimatedBoolean;
33 import org.vectomatic.dom.svg.OMSVGAnimatedPreserveAspectRatio;
34 import org.vectomatic.dom.svg.OMSVGAnimatedRect;
35 import org.vectomatic.dom.svg.OMSVGStringList;
36
37 import com.google.gwt.core.client.JavaScriptException;
38
39 /**
40 * The {@link org.vectomatic.dom.svg.impl.SVGAElement} interface corresponds
41 * to the <a href='http://www.w3.org/TR/SVG11/linking.html#ViewElement' title='view
42 * element specification'>view</a> element.
43 */
44 public class SVGViewElement extends SVGElement {
45 protected SVGViewElement() {
46 }
47
48 // Implementation of the svg::SVGViewElement W3C IDL interface
49 /**
50 * Corresponds to attribute {@link org.vectomatic.dom.svg.impl.SVGViewElement#getViewTarget()}
51 * on the given <a href='http://www.w3.org/TR/SVG11/linking.html#ViewElement'
52 * title='view element specification'>view</a> element. A list of DOMString
53 * values which contain the names listed in the {@link org.vectomatic.dom.svg.impl.SVGViewElement#getViewTarget()}
54 * attribute. Each of the DOMString values can be associated with the corresponding
55 * element using the getElementById() method call.
56 */
57 public final native OMSVGStringList getViewTarget() /*-{
58 return @org.vectomatic.dom.svg.OMNode::convertList(Lcom/google/gwt/core/client/JavaScriptObject;)(this.viewTarget);
59 }-*/;
60
61 // Implementation of the svg::SVGExternalResourcesRequired W3C IDL interface
62 /**
63 * Corresponds to attribute {@link org.vectomatic.dom.svg.itf.ISVGExternalResourcesRequired#getExternalResourcesRequired()}
64 * on the given element. Note that the SVG DOM defines the attribute {@link
65 * org.vectomatic.dom.svg.itf.ISVGExternalResourcesRequired#getExternalResourcesRequired()}
66 * as being of type {@link org.vectomatic.dom.svg.OMSVGAnimatedBoolean}, whereas
67 * the SVG language definition says that {@link org.vectomatic.dom.svg.itf.ISVGExternalResourcesRequired#getExternalResourcesRequired()}
68 * is not animated. Because the SVG language definition states that {@link
69 * org.vectomatic.dom.svg.itf.ISVGExternalResourcesRequired#getExternalResourcesRequired()}
70 * cannot be animated, the {@link org.vectomatic.dom.svg.OMSVGAnimatedBoolean#getAnimVal()}
71 * will always be the same as the {@link org.vectomatic.dom.svg.OMSVGAnimatedBoolean#getBaseVal()}.
72 */
73 public final native OMSVGAnimatedBoolean getExternalResourcesRequired() /*-{
74 return this.externalResourcesRequired;
75 }-*/;
76
77 // Implementation of the svg::SVGFitToViewBox W3C IDL interface
78 /**
79 * Corresponds to attribute {@link org.vectomatic.dom.svg.itf.ISVGFitToViewBox#getViewBox()}
80 * on the given element.
81 */
82 public final native OMSVGAnimatedRect getViewBox() /*-{
83 return this.viewBox;
84 }-*/;
85 /**
86 * Corresponds to attribute {@link org.vectomatic.dom.svg.itf.ISVGFitToViewBox#getPreserveAspectRatio()}
87 * on the given element.
88 */
89 public final native OMSVGAnimatedPreserveAspectRatio getPreserveAspectRatio() /*-{
90 return this.preserveAspectRatio;
91 }-*/;
92
93 // Implementation of the svg::SVGZoomAndPan W3C IDL interface
94 /**
95 * Corresponds to attribute {@link org.vectomatic.dom.svg.itf.ISVGZoomAndPan#getZoomAndPan()}
96 * on the given element. The value must be one of the SVG_ZOOMANDPAN_ constants
97 * defined on this interface.
98 */
99 public final native short getZoomAndPan() /*-{
100 return this.zoomAndPan;
101 }-*/;
102 /**
103 * Corresponds to attribute {@link org.vectomatic.dom.svg.itf.ISVGZoomAndPan#getZoomAndPan()}
104 * on the given element. The value must be one of the SVG_ZOOMANDPAN_ constants
105 * defined on this interface.
106 * @throws DOMException(NO_MODIFICATION_ALLOWED_ERR) Raised on an attempt
107 * to change the value of a <a href="svgdom.html#ReadOnlyNodes">read only
108 * attribute</a>.
109 */
110 public final native void setZoomAndPan(short value) throws JavaScriptException /*-{
111 this.zoomAndPan = value;
112 }-*/;
113
114 }