1 18 package org.apache.batik.dom.svg; 19 20 import org.apache.batik.dom.AbstractDocument; 21 import org.apache.batik.dom.util.XLinkSupport; 22 import org.apache.batik.dom.util.XMLSupport; 23 import org.w3c.dom.Node ; 24 import org.w3c.dom.svg.SVGAnimatedBoolean; 25 import org.w3c.dom.svg.SVGAnimatedLength; 26 import org.w3c.dom.svg.SVGCursorElement; 27 import org.w3c.dom.svg.SVGStringList; 28 29 35 public class SVGOMCursorElement 36 extends SVGOMURIReferenceElement 37 implements SVGCursorElement { 38 39 42 protected final static AttributeInitializer attributeInitializer; 43 static { 44 attributeInitializer = new AttributeInitializer(4); 45 attributeInitializer.addAttribute(XMLSupport.XMLNS_NAMESPACE_URI, 46 null, "xmlns:xlink", 47 XLinkSupport.XLINK_NAMESPACE_URI); 48 attributeInitializer.addAttribute(XLinkSupport.XLINK_NAMESPACE_URI, 49 "xlink", "type", "simple"); 50 attributeInitializer.addAttribute(XLinkSupport.XLINK_NAMESPACE_URI, 51 "xlink", "show", "other"); 52 attributeInitializer.addAttribute(XLinkSupport.XLINK_NAMESPACE_URI, 53 "xlink", "actuate", "onLoad"); 54 } 55 56 59 protected SVGOMCursorElement() { 60 } 61 62 67 public SVGOMCursorElement(String prefix, AbstractDocument owner) { 68 super(prefix, owner); 69 70 } 71 72 75 public String getLocalName() { 76 return SVG_CURSOR_TAG; 77 } 78 79 82 public SVGAnimatedLength getX() { 83 return getAnimatedLengthAttribute 84 (null, SVG_X_ATTRIBUTE, SVG_CURSOR_X_DEFAULT_VALUE, 85 SVGOMAnimatedLength.HORIZONTAL_LENGTH); 86 } 87 88 91 public SVGAnimatedLength getY() { 92 return getAnimatedLengthAttribute 93 (null, SVG_Y_ATTRIBUTE, SVG_CURSOR_Y_DEFAULT_VALUE, 94 SVGOMAnimatedLength.VERTICAL_LENGTH); 95 } 96 97 99 103 public SVGAnimatedBoolean getExternalResourcesRequired() { 104 return SVGExternalResourcesRequiredSupport. 105 getExternalResourcesRequired(this); 106 } 107 108 110 114 public SVGStringList getRequiredFeatures() { 115 return SVGTestsSupport.getRequiredFeatures(this); 116 } 117 118 122 public SVGStringList getRequiredExtensions() { 123 return SVGTestsSupport.getRequiredExtensions(this); 124 } 125 126 130 public SVGStringList getSystemLanguage() { 131 return SVGTestsSupport.getSystemLanguage(this); 132 } 133 134 138 public boolean hasExtension(String extension) { 139 return SVGTestsSupport.hasExtension(this, extension); 140 } 141 142 146 protected AttributeInitializer getAttributeInitializer() { 147 return attributeInitializer; 148 } 149 150 153 protected Node newNode() { 154 return new SVGOMCursorElement(); 155 } 156 } 157 | Popular Tags |