## org.apache.batik.dom.svg
Class AbstractSVGAnimatedLength.AnimSVGLength

    java.lang.Object
      org.apache.batik.dom.svg.AbstractSVGLength
          org.apache.batik.dom.svg.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()`.

Nested Class Summary

Nested classes/interfaces inherited from class org.apache.batik.dom.svg.AbstractSVGLength
`AbstractSVGLength.DefaultContext`

Field Summary

Fields inherited from class org.apache.batik.dom.svg.AbstractSVGLength
`context, direction, HORIZONTAL_LENGTH, OTHER_LENGTH, UNITS, unitType, value, VERTICAL_LENGTH`

Fields inherited from interface org.w3c.dom.svg.SVGLength
`SVG_LENGTHTYPE_CM, SVG_LENGTHTYPE_EMS, SVG_LENGTHTYPE_EXS, SVG_LENGTHTYPE_IN, SVG_LENGTHTYPE_MM, SVG_LENGTHTYPE_NUMBER, SVG_LENGTHTYPE_PC, SVG_LENGTHTYPE_PERCENTAGE, SVG_LENGTHTYPE_PT, SVG_LENGTHTYPE_PX, SVG_LENGTHTYPE_UNKNOWN`

Constructor Summary
`AbstractSVGAnimatedLength.AnimSVGLength(short direction)` Creates a new AnimSVGLength.

Method Summary
`void` `convertToSpecifiedUnits(short unit)` DOM: Implements `SVGLength.convertToSpecifiedUnits(short)`.
`protected SVGOMElement` `getAssociatedElement()` Returns the element this length is associated with.
`short` `getUnitType()` DOM: Implements `SVGLength.getUnitType()`.
`float` `getValue()` DOM: Implements `SVGLength.getValue()`.
`java.lang.String` `getValueAsString()` DOM: Implements `SVGLength.getValueAsString()`.
`float` `getValueInSpecifiedUnits()` DOM: Implements `SVGLength.getValueInSpecifiedUnits()`.
`void` `newValueSpecifiedUnits(short unit, float value)` DOM: Implements `SVGLength.newValueSpecifiedUnits(short,float)`.
`protected void` `setAnimatedValue(int type, float val)` Sets the animated value.
`void` `setValue(float value)` DOM: Implements `SVGLength.setValue(float)`.
`void` `setValueAsString(java.lang.String value)` DOM: Implements `SVGLength.setValueAsString(String)`.
`void` `setValueInSpecifiedUnits(float value)` DOM: Implements `SVGLength.setValueInSpecifiedUnits(float)`.

Methods inherited from class org.apache.batik.dom.svg.AbstractSVGLength
`parse, reset, revalidate`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AbstractSVGAnimatedLength.AnimSVGLength

    public AbstractSVGAnimatedLength.AnimSVGLength(short direction)

  Creates a new AnimSVGLength.

  Parameters:
    `direction` - is one of HORIZONTAL_LENGTH, VERTICAL_LENGTH, or OTHER_LENGTH

Method Detail

### 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 java.lang.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 org.w3c.dom.DOMException

  DOM: Implements `SVGLength.setValue(float)`.

  Specified by:
    `setValue` in interface `org.w3c.dom.svg.SVGLength`
  Overrides:
    `setValue` in class `AbstractSVGLength`
  Throws:
    `org.w3c.dom.DOMException`

### setValueInSpecifiedUnits

    public void setValueInSpecifiedUnits(float value)
                                  throws org.w3c.dom.DOMException

  DOM: Implements `SVGLength.setValueInSpecifiedUnits(float)`.

  Specified by:
    `setValueInSpecifiedUnits` in interface `org.w3c.dom.svg.SVGLength`
  Overrides:
    `setValueInSpecifiedUnits` in class `AbstractSVGLength`
  Throws:
    `org.w3c.dom.DOMException`

### setValueAsString

    public void setValueAsString(java.lang.String value)
                          throws org.w3c.dom.DOMException

  DOM: Implements `SVGLength.setValueAsString(String)`.

  Specified by:
    `setValueAsString` in interface `org.w3c.dom.svg.SVGLength`
  Overrides:
    `setValueAsString` in class `AbstractSVGLength`
  Throws:
    `org.w3c.dom.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

Copyright © 2008 Apache Software Foundation. All Rights Reserved.