View Javadoc

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.OMSVGAnimatedEnumeration;
34  import org.vectomatic.dom.svg.OMSVGAnimatedLength;
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.SVGMaskElement} interface corresponds
41   * to the <a href='http://www.w3.org/TR/SVG11/masking.html#MaskElement' title='mask
42   * element specification'>mask</a>  element.
43   */
44  public class SVGMaskElement extends SVGElement {
45    protected SVGMaskElement() {
46    }
47  
48    // Implementation of the svg::SVGMaskElement W3C IDL interface
49    /**
50     * Corresponds to attribute {@link org.vectomatic.dom.svg.impl.SVGMaskElement#getMaskUnits()}
51     * on the given <a href='http://www.w3.org/TR/SVG11/masking.html#MaskElement'
52     * title='mask element specification'>mask</a>  element.  Takes one of the
53     * constants defined in {@link org.vectomatic.dom.svg.itf.ISVGUnitTypes}.
54     */
55    public final native OMSVGAnimatedEnumeration getMaskUnits() /*-{
56      return this.maskUnits;
57    }-*/;
58    /**
59     * Corresponds to attribute {@link org.vectomatic.dom.svg.impl.SVGMaskElement#getMaskContentUnits()}
60     * on the given <a href='http://www.w3.org/TR/SVG11/masking.html#MaskElement'
61     * title='mask element specification'>mask</a>  element.  Takes one of the
62     * constants defined in {@link org.vectomatic.dom.svg.itf.ISVGUnitTypes}.
63     */
64    public final native OMSVGAnimatedEnumeration getMaskContentUnits() /*-{
65      return this.maskContentUnits;
66    }-*/;
67    /**
68     * Corresponds to attribute {@link org.vectomatic.dom.svg.impl.SVGMaskElement#getX()}
69     * on the given <a href='http://www.w3.org/TR/SVG11/masking.html#MaskElement'
70     * title='mask element specification'>mask</a> element.
71     */
72    public final native OMSVGAnimatedLength getX() /*-{
73      return this.x;
74    }-*/;
75    /**
76     * Corresponds to attribute {@link org.vectomatic.dom.svg.impl.SVGMaskElement#getY()}
77     * on the given <a href='http://www.w3.org/TR/SVG11/masking.html#MaskElement'
78     * title='mask element specification'>mask</a> element.
79     */
80    public final native OMSVGAnimatedLength getY() /*-{
81      return this.y;
82    }-*/;
83    /**
84     * Corresponds to attribute {@link org.vectomatic.dom.svg.impl.SVGMaskElement#getWidth()}
85     * on the given <a href='http://www.w3.org/TR/SVG11/masking.html#MaskElement'
86     * title='mask element specification'>mask</a>  element.
87     */
88    public final native OMSVGAnimatedLength getWidth() /*-{
89      return this.width;
90    }-*/;
91    /**
92     * Corresponds to attribute {@link org.vectomatic.dom.svg.impl.SVGMaskElement#getHeight()}
93     * on the given <a href='http://www.w3.org/TR/SVG11/masking.html#MaskElement'
94     * title='mask element specification'>mask</a>  element.
95     */
96    public final native OMSVGAnimatedLength getHeight() /*-{
97      return this.height;
98    }-*/;
99  
100   // Implementation of the svg::SVGExternalResourcesRequired W3C IDL interface
101   /**
102    * Corresponds to attribute {@link org.vectomatic.dom.svg.itf.ISVGExternalResourcesRequired#getExternalResourcesRequired()}
103    * on the given element. Note that the SVG DOM defines the attribute {@link
104    * org.vectomatic.dom.svg.itf.ISVGExternalResourcesRequired#getExternalResourcesRequired()}
105    * as being of type {@link org.vectomatic.dom.svg.OMSVGAnimatedBoolean}, whereas
106    * the SVG language definition says that {@link org.vectomatic.dom.svg.itf.ISVGExternalResourcesRequired#getExternalResourcesRequired()}
107    * is not animated. Because the SVG language definition states that {@link
108    * org.vectomatic.dom.svg.itf.ISVGExternalResourcesRequired#getExternalResourcesRequired()}
109    * cannot be animated, the {@link org.vectomatic.dom.svg.OMSVGAnimatedBoolean#getAnimVal()}
110    * will always be the same as the {@link org.vectomatic.dom.svg.OMSVGAnimatedBoolean#getBaseVal()}.
111    */
112   public final native OMSVGAnimatedBoolean getExternalResourcesRequired() /*-{
113     return this.externalResourcesRequired;
114   }-*/;
115 
116   // Implementation of the svg::SVGLangSpace W3C IDL interface
117   /**
118    * Corresponds to attribute <code>xml:lang</code> on the given element.
119    */
120   public final native String getXmllang() /*-{
121     return this.xmllang;
122   }-*/;
123   /**
124    * Corresponds to attribute <code>xml:lang</code> on the given element.
125    * @throws DOMException(NO_MODIFICATION_ALLOWED_ERR) Raised on an   attempt
126    * to change the value of a <a href="svgdom.html#ReadOnlyNodes">read only
127    * attribute</a>.
128    */
129   public final native void setXmllang(String value) throws JavaScriptException /*-{
130     this.xmllang = value;
131   }-*/;
132   /**
133    * Corresponds to attribute <code>xml:space</code> on the given element.
134    */
135   public final native String getXmlspace() /*-{
136     return this.xmlspace;
137   }-*/;
138   /**
139    * Corresponds to attribute <code>xml:space</code> on the given element.
140    * @throws DOMException(NO_MODIFICATION_ALLOWED_ERR) Raised on an   attempt
141    * to change the value of a <a href="svgdom.html#ReadOnlyNodes">read only
142    * attribute</a>.
143    */
144   public final native void setXmlspace(String value) throws JavaScriptException /*-{
145     this.xmlspace = value;
146   }-*/;
147 
148   // Implementation of the svg::SVGTests W3C IDL interface
149   /**
150    * Corresponds to attribute {@link org.vectomatic.dom.svg.itf.ISVGTests#getRequiredFeatures()}
151    * on the given element.
152    */
153   public final native OMSVGStringList getRequiredFeatures() /*-{
154     return @org.vectomatic.dom.svg.OMNode::convertList(Lcom/google/gwt/core/client/JavaScriptObject;)(this.requiredFeatures);
155   }-*/;
156   /**
157    * Corresponds to attribute {@link org.vectomatic.dom.svg.itf.ISVGTests#getRequiredExtensions()}
158    * on the given element.
159    */
160   public final native OMSVGStringList getRequiredExtensions() /*-{
161     return @org.vectomatic.dom.svg.OMNode::convertList(Lcom/google/gwt/core/client/JavaScriptObject;)(this.requiredExtensions);
162   }-*/;
163   /**
164    * Corresponds to attribute {@link org.vectomatic.dom.svg.itf.ISVGTests#getSystemLanguage()}
165    * on the given element.
166    */
167   public final native OMSVGStringList getSystemLanguage() /*-{
168     return @org.vectomatic.dom.svg.OMNode::convertList(Lcom/google/gwt/core/client/JavaScriptObject;)(this.systemLanguage);
169   }-*/;
170   /**
171    * Returns true if the user agent supports the given extension, specified
172    * by a URI.
173    * @param extension The name of the extension, expressed as a URI.
174    * @return True or false, depending on whether the given extension is   supported.
175    */
176   public final native boolean hasExtension(String extension) /*-{
177     return this.hasExtension(extension);
178   }-*/;
179 
180   // Implementation of the svg::SVGUnitTypes W3C IDL interface
181 
182 }