1 18 package org.apache.batik.dom.svg; 19 20 import org.apache.batik.dom.AbstractDocument; 21 import org.w3c.dom.Node ; 22 import org.w3c.dom.svg.SVGAnimatedBoolean; 23 import org.w3c.dom.svg.SVGAnimatedPreserveAspectRatio; 24 import org.w3c.dom.svg.SVGAnimatedRect; 25 import org.w3c.dom.svg.SVGStringList; 26 import org.w3c.dom.svg.SVGViewElement; 27 28 34 public class SVGOMViewElement 35 extends SVGOMElement 36 implements SVGViewElement { 37 38 41 protected final static AttributeInitializer attributeInitializer; 42 static { 43 attributeInitializer = new AttributeInitializer(2); 44 attributeInitializer.addAttribute(null, 45 null, 46 SVG_PRESERVE_ASPECT_RATIO_ATTRIBUTE, 47 "xMidYMid meet"); 48 attributeInitializer.addAttribute(null, 49 null, 50 SVG_ZOOM_AND_PAN_ATTRIBUTE, 51 SVG_MAGNIFY_VALUE); 52 } 53 54 57 protected SVGOMViewElement() { 58 } 59 60 65 public SVGOMViewElement(String prefix, AbstractDocument owner) { 66 super(prefix, owner); 67 } 68 69 72 public String getLocalName() { 73 return SVG_VIEW_TAG; 74 } 75 76 79 public SVGStringList getViewTarget() { 80 throw new RuntimeException ("!!! TODO: getViewTarget()"); 81 } 82 83 85 89 public short getZoomAndPan() { 90 return SVGZoomAndPanSupport.getZoomAndPan(this); 91 } 92 93 97 public void setZoomAndPan(short val) { 98 SVGZoomAndPanSupport.setZoomAndPan(this, val); 99 } 100 101 103 107 public SVGAnimatedRect getViewBox() { 108 throw new RuntimeException (" !!! TODO: getViewBox()"); 109 } 110 111 115 public SVGAnimatedPreserveAspectRatio getPreserveAspectRatio() { 116 return SVGPreserveAspectRatioSupport.getPreserveAspectRatio(this); 117 } 118 119 121 125 public SVGAnimatedBoolean getExternalResourcesRequired() { 126 return SVGExternalResourcesRequiredSupport. 127 getExternalResourcesRequired(this); 128 } 129 130 134 protected AttributeInitializer getAttributeInitializer() { 135 return attributeInitializer; 136 } 137 138 141 protected Node newNode() { 142 return new SVGOMViewElement(); 143 } 144 } 145 | Popular Tags |