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.DOMException ; 24 import org.w3c.dom.Node ; 25 import org.w3c.dom.svg.SVGAltGlyphElement; 26 27 33 public class SVGOMAltGlyphElement 34 extends SVGURIReferenceTextPositioningElement 35 implements SVGAltGlyphElement { 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", "other"); 50 attributeInitializer.addAttribute(XLinkSupport.XLINK_NAMESPACE_URI, 51 "xlink", "actuate", "onLoad"); 52 } 53 54 57 protected SVGOMAltGlyphElement() { 58 } 59 60 65 public SVGOMAltGlyphElement(String prefix, AbstractDocument owner) { 66 super(prefix, owner); 67 68 } 69 70 73 public String getLocalName() { 74 return SVG_ALT_GLYPH_TAG; 75 } 76 77 80 public String getGlyphRef() { 81 return getAttributeNS(null, SVG_GLYPH_REF_ATTRIBUTE); 82 } 83 84 87 public void setGlyphRef(String glyphRef) throws DOMException { 88 setAttributeNS(null, SVG_GLYPH_REF_ATTRIBUTE, glyphRef); 89 } 90 91 94 public String getFormat() { 95 return getAttributeNS(null, SVG_FORMAT_ATTRIBUTE); 96 } 97 98 101 public void setFormat(String format) throws DOMException { 102 setAttributeNS(null, SVG_FORMAT_ATTRIBUTE, format); 103 } 104 105 109 protected AttributeInitializer getAttributeInitializer() { 110 return attributeInitializer; 111 } 112 113 116 protected Node newNode() { 117 return new SVGOMAltGlyphElement(); 118 } 119 } 120 | Popular Tags |