1 18 package org.apache.batik.dom.svg; 19 20 import org.apache.batik.dom.AbstractDocument; 21 import org.apache.batik.dom.util.XMLSupport; 22 import org.w3c.dom.Node ; 23 import org.w3c.dom.svg.SVGAnimatedBoolean; 24 import org.w3c.dom.svg.SVGAnimatedPreserveAspectRatio; 25 import org.w3c.dom.svg.SVGAnimatedRect; 26 import org.w3c.dom.svg.SVGSymbolElement; 27 28 34 public class SVGOMSymbolElement 35 extends SVGStylableElement 36 implements SVGSymbolElement { 37 38 41 protected final static AttributeInitializer attributeInitializer; 42 static { 43 attributeInitializer = new AttributeInitializer(1); 44 attributeInitializer.addAttribute(null, 45 null, 46 SVG_PRESERVE_ASPECT_RATIO_ATTRIBUTE, 47 "xMidYMid meet"); 48 } 49 50 53 protected SVGOMSymbolElement() { 54 } 55 56 61 public SVGOMSymbolElement(String prefix, AbstractDocument owner) { 62 super(prefix, owner); 63 64 } 65 66 69 public String getLocalName() { 70 return SVG_SYMBOL_TAG; 71 } 72 73 75 78 public String getXMLlang() { 79 return XMLSupport.getXMLLang(this); 80 } 81 82 85 public void setXMLlang(String lang) { 86 setAttributeNS(XMLSupport.XML_NAMESPACE_URI, 87 XMLSupport.XML_LANG_ATTRIBUTE, 88 lang); 89 } 90 91 94 public String getXMLspace() { 95 return XMLSupport.getXMLSpace(this); 96 } 97 98 101 public void setXMLspace(String space) { 102 setAttributeNS(XMLSupport.XML_NAMESPACE_URI, 103 XMLSupport.XML_SPACE_ATTRIBUTE, 104 space); 105 } 106 107 109 113 public short getZoomAndPan() { 114 return SVGZoomAndPanSupport.getZoomAndPan(this); 115 } 116 117 121 public void setZoomAndPan(short val) { 122 SVGZoomAndPanSupport.setZoomAndPan(this, val); 123 } 124 125 127 130 public SVGAnimatedRect getViewBox() { 131 throw new RuntimeException (" !!! TODO: getViewBox()"); 132 } 133 134 138 public SVGAnimatedPreserveAspectRatio getPreserveAspectRatio() { 139 return SVGPreserveAspectRatioSupport.getPreserveAspectRatio(this); 140 } 141 142 144 148 public SVGAnimatedBoolean getExternalResourcesRequired() { 149 return SVGExternalResourcesRequiredSupport. 150 getExternalResourcesRequired(this); 151 } 152 153 157 protected AttributeInitializer getAttributeInitializer() { 158 return attributeInitializer; 159 } 160 161 164 protected Node newNode() { 165 return new SVGOMSymbolElement(); 166 } 167 } 168 | Popular Tags |