Class AbstractSVGAnimatedLength.AnimSVGLength

java.lang.Object
org.apache.batik.anim.dom.AbstractSVGLength
org.apache.batik.anim.dom.AbstractSVGAnimatedLength.AnimSVGLength
All Implemented Interfaces:
org.w3c.dom.svg.SVGLength
Enclosing class:
AbstractSVGAnimatedLength

protected class AbstractSVGAnimatedLength.AnimSVGLength extends AbstractSVGLength
This class represents the SVGLength returned by AbstractSVGAnimatedLength.getAnimVal().
  • Constructor Details

    • AnimSVGLength

      public AnimSVGLength(short direction)
      Creates a new AnimSVGLength.
      Parameters:
      direction - is one of HORIZONTAL_LENGTH, VERTICAL_LENGTH, or OTHER_LENGTH
  • Method Details

    • getUnitType

      public short getUnitType()
      DOM: Implements SVGLength.getUnitType().
      Specified by:
      getUnitType in interface org.w3c.dom.svg.SVGLength
      Overrides:
      getUnitType in class AbstractSVGLength
    • getValue

      public float getValue()
      DOM: Implements SVGLength.getValue().
      Specified by:
      getValue in interface org.w3c.dom.svg.SVGLength
      Overrides:
      getValue in class AbstractSVGLength
    • getValueInSpecifiedUnits

      public float getValueInSpecifiedUnits()
      DOM: Implements SVGLength.getValueInSpecifiedUnits().
      Specified by:
      getValueInSpecifiedUnits in interface org.w3c.dom.svg.SVGLength
      Overrides:
      getValueInSpecifiedUnits in class AbstractSVGLength
    • getValueAsString

      public String getValueAsString()
      DOM: Implements SVGLength.getValueAsString().
      Specified by:
      getValueAsString in interface org.w3c.dom.svg.SVGLength
      Overrides:
      getValueAsString in class AbstractSVGLength
    • setValue

      public void setValue(float value) throws DOMException
      DOM: Implements SVGLength.setValue(float).
      Specified by:
      setValue in interface org.w3c.dom.svg.SVGLength
      Overrides:
      setValue in class AbstractSVGLength
      Throws:
      DOMException
    • setValueInSpecifiedUnits

      public void setValueInSpecifiedUnits(float value) throws DOMException
      DOM: Implements SVGLength.setValueInSpecifiedUnits(float).
      Specified by:
      setValueInSpecifiedUnits in interface org.w3c.dom.svg.SVGLength
      Overrides:
      setValueInSpecifiedUnits in class AbstractSVGLength
      Throws:
      DOMException
    • setValueAsString

      public void setValueAsString(String value) throws DOMException
      DOM: Implements SVGLength.setValueAsString(String).
      Specified by:
      setValueAsString in interface org.w3c.dom.svg.SVGLength
      Overrides:
      setValueAsString in class AbstractSVGLength
      Throws:
      DOMException
    • newValueSpecifiedUnits

      public void newValueSpecifiedUnits(short unit, float value)
      DOM: Implements SVGLength.newValueSpecifiedUnits(short,float).
      Specified by:
      newValueSpecifiedUnits in interface org.w3c.dom.svg.SVGLength
      Overrides:
      newValueSpecifiedUnits in class AbstractSVGLength
    • convertToSpecifiedUnits

      public void convertToSpecifiedUnits(short unit)
      DOM: Implements SVGLength.convertToSpecifiedUnits(short).
      Specified by:
      convertToSpecifiedUnits in interface org.w3c.dom.svg.SVGLength
      Overrides:
      convertToSpecifiedUnits in class AbstractSVGLength
    • getAssociatedElement

      protected SVGOMElement getAssociatedElement()
      Returns the element this length is associated with.
      Specified by:
      getAssociatedElement in class AbstractSVGLength
    • setAnimatedValue

      protected void setAnimatedValue(int type, float val)
      Sets the animated value.
      Parameters:
      type - one of the values defines in org.w3c.dom.svg.SVGLength
      val - the length