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.SVGAElement; 25 import org.w3c.dom.svg.SVGAnimatedString; 26 27 33 public class SVGOMAElement 34 extends SVGURIReferenceGraphicsElement 35 implements SVGAElement { 36 37 40 protected final static AttributeInitializer attributeInitializer; 41 static { 42 attributeInitializer = new AttributeInitializer(4); 43 attributeInitializer.addAttribute(XMLSupport.XMLNS_NAMESPACE_URI, 44 null, "xmlns:xlink", 45 XLinkSupport.XLINK_NAMESPACE_URI); 46 attributeInitializer.addAttribute(XLinkSupport.XLINK_NAMESPACE_URI, 47 "xlink", "type", "simple"); 48 attributeInitializer.addAttribute(XLinkSupport.XLINK_NAMESPACE_URI, 49 "xlink", "show", "replace"); 50 attributeInitializer.addAttribute(XLinkSupport.XLINK_NAMESPACE_URI, 51 "xlink", "actuate", "onRequest"); 52 } 53 54 57 protected SVGOMAElement() { 58 } 59 60 65 public SVGOMAElement(String prefix, AbstractDocument owner) { 66 super(prefix, owner); 67 } 68 69 72 public String getLocalName() { 73 return SVG_A_TAG; 74 } 75 76 79 public SVGAnimatedString getTarget() { 80 return getAnimatedStringAttribute(null, SVG_TARGET_ATTRIBUTE); 81 } 82 83 87 protected AttributeInitializer getAttributeInitializer() { 88 return attributeInitializer; 89 } 90 91 94 protected Node newNode() { 95 return new SVGOMAElement(); 96 } 97 } 98 | Popular Tags |