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.OMSVGAnimatedInteger; 35 import org.vectomatic.dom.svg.OMSVGAnimatedLength; 36 import org.vectomatic.dom.svg.OMSVGAnimatedString; 37 38 import com.google.gwt.core.client.JavaScriptException; 39 40 /** 41 * The {@link org.vectomatic.dom.svg.impl.SVGFilterElement} interface corresponds 42 * to the <a href='http://www.w3.org/TR/SVG11/filters.html#FilterElement' 43 * title='filter element specification'>filter</a> element. 44 */ 45 public class SVGFilterElement extends SVGElement { 46 protected SVGFilterElement() { 47 } 48 49 // Implementation of the svg::SVGFilterElement W3C IDL interface 50 /** 51 * Corresponds to attribute {@link org.vectomatic.dom.svg.impl.SVGFilterElement#getFilterUnits()} 52 * on the given <a href='http://www.w3.org/TR/SVG11/filters.html#FilterElement' 53 * title='filter element specification'>filter</a> element. Takes one of the 54 * constants defined in {@link org.vectomatic.dom.svg.itf.ISVGUnitTypes}. 55 */ 56 public final native OMSVGAnimatedEnumeration getFilterUnits() /*-{ 57 return this.filterUnits; 58 }-*/; 59 /** 60 * Corresponds to attribute {@link org.vectomatic.dom.svg.impl.SVGFilterElement#getPrimitiveUnits()} 61 * on the given <a href='http://www.w3.org/TR/SVG11/filters.html#FilterElement' 62 * title='filter element specification'>filter</a> element. Takes one of the 63 * constants defined in {@link org.vectomatic.dom.svg.itf.ISVGUnitTypes}. 64 */ 65 public final native OMSVGAnimatedEnumeration getPrimitiveUnits() /*-{ 66 return this.primitiveUnits; 67 }-*/; 68 /** 69 * Corresponds to attribute {@link org.vectomatic.dom.svg.impl.SVGFilterElement#getX()} 70 * on the given <a href='http://www.w3.org/TR/SVG11/filters.html#FilterElement' 71 * title='filter element specification'>filter</a> element. 72 */ 73 public final native OMSVGAnimatedLength getX() /*-{ 74 return this.x; 75 }-*/; 76 /** 77 * Corresponds to attribute {@link org.vectomatic.dom.svg.impl.SVGFilterElement#getY()} 78 * on the given <a href='http://www.w3.org/TR/SVG11/filters.html#FilterElement' 79 * title='filter element specification'>filter</a> element. 80 */ 81 public final native OMSVGAnimatedLength getY() /*-{ 82 return this.y; 83 }-*/; 84 /** 85 * Corresponds to attribute {@link org.vectomatic.dom.svg.impl.SVGFilterElement#getWidth()} 86 * on the given <a href='http://www.w3.org/TR/SVG11/filters.html#FilterElement' 87 * title='filter element specification'>filter</a> element. 88 */ 89 public final native OMSVGAnimatedLength getWidth() /*-{ 90 return this.width; 91 }-*/; 92 /** 93 * Corresponds to attribute {@link org.vectomatic.dom.svg.impl.SVGFilterElement#getHeight()} 94 * on the given <a href='http://www.w3.org/TR/SVG11/filters.html#FilterElement' 95 * title='filter element specification'>filter</a> element. 96 */ 97 public final native OMSVGAnimatedLength getHeight() /*-{ 98 return this.height; 99 }-*/; 100 /** 101 * Corresponds to attribute <code>filterRes</code> on the given <a href='http://www.w3.org/TR/SVG11/filters.html#FilterElement' 102 * title='filter element specification'>filter</a> element. Contains the 103 * X component of attribute <code>filterRes</code>. 104 */ 105 public final native OMSVGAnimatedInteger getFilterResX() /*-{ 106 return this.filterResX; 107 }-*/; 108 /** 109 * Corresponds to attribute <code>filterRes</code> on the given <a href='http://www.w3.org/TR/SVG11/filters.html#FilterElement' 110 * title='filter element specification'>filter</a> element. Contains the 111 * Y component (possibly computed automatically) of attribute <code>filterRes</code>. 112 */ 113 public final native OMSVGAnimatedInteger getFilterResY() /*-{ 114 return this.filterResY; 115 }-*/; 116 /** 117 * Sets the values for attribute <code>filterRes</code>. 118 * @param filterResX The X component of attribute <code>filterRes</code>. 119 * @param filterResY The Y component of attribute <code>filterRes</code>. 120 * @throws DOMException(NO_MODIFICATION_ALLOWED_ERR) Raised on an attempt 121 * to change the value of a <a href="svgdom.html#ReadOnlyNodes">read only 122 * attribute</a>. 123 */ 124 public final native void setFilterRes(int filterResX, int filterResY) throws JavaScriptException /*-{ 125 this.setFilterRes(filterResX, filterResY); 126 }-*/; 127 128 // Implementation of the svg::SVGExternalResourcesRequired W3C IDL interface 129 /** 130 * Corresponds to attribute {@link org.vectomatic.dom.svg.itf.ISVGExternalResourcesRequired#getExternalResourcesRequired()} 131 * on the given element. Note that the SVG DOM defines the attribute {@link 132 * org.vectomatic.dom.svg.itf.ISVGExternalResourcesRequired#getExternalResourcesRequired()} 133 * as being of type {@link org.vectomatic.dom.svg.OMSVGAnimatedBoolean}, whereas 134 * the SVG language definition says that {@link org.vectomatic.dom.svg.itf.ISVGExternalResourcesRequired#getExternalResourcesRequired()} 135 * is not animated. Because the SVG language definition states that {@link 136 * org.vectomatic.dom.svg.itf.ISVGExternalResourcesRequired#getExternalResourcesRequired()} 137 * cannot be animated, the {@link org.vectomatic.dom.svg.OMSVGAnimatedBoolean#getAnimVal()} 138 * will always be the same as the {@link org.vectomatic.dom.svg.OMSVGAnimatedBoolean#getBaseVal()}. 139 */ 140 public final native OMSVGAnimatedBoolean getExternalResourcesRequired() /*-{ 141 return this.externalResourcesRequired; 142 }-*/; 143 144 // Implementation of the svg::SVGLangSpace W3C IDL interface 145 /** 146 * Corresponds to attribute <code>xml:lang</code> on the given element. 147 */ 148 public final native String getXmllang() /*-{ 149 return this.xmllang; 150 }-*/; 151 /** 152 * Corresponds to attribute <code>xml:lang</code> on the given element. 153 * @throws DOMException(NO_MODIFICATION_ALLOWED_ERR) Raised on an attempt 154 * to change the value of a <a href="svgdom.html#ReadOnlyNodes">read only 155 * attribute</a>. 156 */ 157 public final native void setXmllang(String value) throws JavaScriptException /*-{ 158 this.xmllang = value; 159 }-*/; 160 /** 161 * Corresponds to attribute <code>xml:space</code> on the given element. 162 */ 163 public final native String getXmlspace() /*-{ 164 return this.xmlspace; 165 }-*/; 166 /** 167 * Corresponds to attribute <code>xml:space</code> on the given element. 168 * @throws DOMException(NO_MODIFICATION_ALLOWED_ERR) Raised on an attempt 169 * to change the value of a <a href="svgdom.html#ReadOnlyNodes">read only 170 * attribute</a>. 171 */ 172 public final native void setXmlspace(String value) throws JavaScriptException /*-{ 173 this.xmlspace = value; 174 }-*/; 175 176 // Implementation of the svg::SVGURIReference W3C IDL interface 177 /** 178 * Corresponds to attribute <span class='attr-name'>'xlink:href'</span> on 179 * the given element. 180 */ 181 public final native OMSVGAnimatedString getHref() /*-{ 182 return this.href; 183 }-*/; 184 185 // Implementation of the svg::SVGUnitTypes W3C IDL interface 186 187 }