1 18 package org.apache.batik.dom.svg; 19 20 import org.apache.batik.dom.AbstractDocument; 21 import org.w3c.dom.Attr ; 22 import org.w3c.dom.Node ; 23 import org.w3c.dom.svg.SVGAnimatedLength; 24 import org.w3c.dom.svg.SVGRadialGradientElement; 25 26 32 public class SVGOMRadialGradientElement 33 extends SVGOMGradientElement 34 implements SVGRadialGradientElement { 35 36 39 protected SVGOMRadialGradientElement() { 40 } 41 42 47 public SVGOMRadialGradientElement(String prefix, AbstractDocument owner) { 48 super(prefix, owner); 49 } 50 51 54 public String getLocalName() { 55 return SVG_RADIAL_GRADIENT_TAG; 56 } 57 58 62 public SVGAnimatedLength getCx() { 63 return getAnimatedLengthAttribute 64 (null, SVG_CX_ATTRIBUTE, SVG_RADIAL_GRADIENT_CX_DEFAULT_VALUE, 65 SVGOMAnimatedLength.HORIZONTAL_LENGTH); 66 } 67 68 72 public SVGAnimatedLength getCy() { 73 return getAnimatedLengthAttribute 74 (null, SVG_CY_ATTRIBUTE, SVG_RADIAL_GRADIENT_CY_DEFAULT_VALUE, 75 SVGOMAnimatedLength.VERTICAL_LENGTH); 76 } 77 78 82 public SVGAnimatedLength getR() { 83 return getAnimatedLengthAttribute 84 (null, SVG_R_ATTRIBUTE, SVG_RADIAL_GRADIENT_R_DEFAULT_VALUE, 85 SVGOMAnimatedLength.OTHER_LENGTH); 86 } 87 88 92 public SVGAnimatedLength getFx() { 93 SVGAnimatedLength result = 94 (SVGAnimatedLength)getLiveAttributeValue(null, SVG_FX_ATTRIBUTE); 95 if (result == null) { 96 result = new AbstractSVGAnimatedLength 97 (this, null, SVG_FX_ATTRIBUTE, 98 SVGOMAnimatedLength.HORIZONTAL_LENGTH) { 99 protected String getDefaultValue() { 100 Attr attr = getAttributeNodeNS(null, SVG_CX_ATTRIBUTE); 101 if (attr == null) { 102 return SVG_RADIAL_GRADIENT_CX_DEFAULT_VALUE; 103 } 104 return attr.getValue(); 105 } 106 }; 107 putLiveAttributeValue(null, SVG_FX_ATTRIBUTE, 108 (LiveAttributeValue)result); 109 } 110 return result; 111 } 112 113 117 public SVGAnimatedLength getFy() { 118 SVGAnimatedLength result = 119 (SVGAnimatedLength)getLiveAttributeValue(null, SVG_FY_ATTRIBUTE); 120 if (result == null) { 121 result = new AbstractSVGAnimatedLength 122 (this, null, SVG_FY_ATTRIBUTE, 123 SVGOMAnimatedLength.VERTICAL_LENGTH) { 124 protected String getDefaultValue() { 125 Attr attr = getAttributeNodeNS(null, SVG_CY_ATTRIBUTE); 126 if (attr == null) { 127 return SVG_RADIAL_GRADIENT_CY_DEFAULT_VALUE; 128 } 129 return attr.getValue(); 130 } 131 }; 132 putLiveAttributeValue(null, SVG_FY_ATTRIBUTE, 133 (LiveAttributeValue)result); 134 } 135 return result; 136 } 137 138 141 protected Node newNode() { 142 return new SVGOMRadialGradientElement(); 143 } 144 } 145 | Popular Tags |