Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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

    java.lang.Object
      org.apache.batik.dom.svg.AbstractSVGAnimatedValue
          org.apache.batik.dom.svg.AbstractSVGAnimatedLength

All Implemented Interfaces:
  AnimatedLiveAttributeValue, LiveAttributeValue, org.w3c.dom.svg.SVGAnimatedLength

Direct Known Subclasses:
  SVGOMAnimatedLength

    public abstract class AbstractSVGAnimatedLength

extends AbstractSVGAnimatedValue
implements org.w3c.dom.svg.SVGAnimatedLength, LiveAttributeValue

This class provides an implementation of the `SVGAnimatedLength` interface.

Nested Class Summary
`protected class` | `AbstractSVGAnimatedLength.AnimSVGLength` This class represents the SVGLength returned by `getAnimVal()`.
`protected class` | `AbstractSVGAnimatedLength.BaseSVGLength` This class represents the SVGLength returned by `getBaseVal()`.

Field Summary
`protected AbstractSVGAnimatedLength.AnimSVGLength` | `animVal` The current animated value.
`protected AbstractSVGAnimatedLength.BaseSVGLength` | `baseVal` The base value.
`protected boolean` | `changing` Whether the value is changing.
`protected short` | `direction` This length's direction.
`static short` | `HORIZONTAL_LENGTH` This constant represents horizontal lengths.
`protected boolean` | `nonNegative` Whether the value must be non-negative.
`static short` | `OTHER_LENGTH` This constant represents other lengths.
`static short` | `VERTICAL_LENGTH` This constant represents vertical lengths.

Fields inherited from class org.apache.batik.dom.svg.AbstractSVGAnimatedValue
`element, hasAnimVal, listeners, localName, namespaceURI`

Constructor Summary
`AbstractSVGAnimatedLength(AbstractElement elt, String ns, String ln, short dir, boolean nonneg)` Creates a new SVGAnimatedLength.

Method Summary
`void` | `attrAdded(Attr node, String newv)` Called when an Attr node has been added.
`protected void` | `attrChanged()` Called when the attribute has changed in some way.
`void` | `attrModified(Attr node, String oldv, String newv)` Called when an Attr node has been modified.
`void` | `attrRemoved(Attr node, String oldv)` Called when an Attr node has been removed.
`org.w3c.dom.svg.SVGLength` | `getAnimVal()` DOM: Implements `SVGAnimatedLength.getAnimVal()`.
`org.w3c.dom.svg.SVGLength` | `getBaseVal()` DOM: Implements `SVGAnimatedLength.getBaseVal()`.
`float` | `getCheckedValue()` Gets the current animated length value.
`protected abstract String` | `getDefaultValue()`
`AnimatableValue` | `getUnderlyingValue(AnimationTarget target)` Returns the base value of the attribute as an `AnimatableValue`.
`protected void` | `updateAnimatedValue(AnimatableValue val)` Updates the animated value with the given `AnimatableValue`.

Methods inherited from class org.apache.batik.dom.svg.AbstractSVGAnimatedValue
`addAnimatedAttributeListener, fireAnimatedAttributeListeners, fireBaseAttributeListeners, getLocalName, getNamespaceURI, isSpecified, removeAnimatedAttributeListener`

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

Field Detail

### HORIZONTAL_LENGTH

    public static final short HORIZONTAL_LENGTH

  This constant represents horizontal lengths.

  See Also:
    Constant Field Values

### VERTICAL_LENGTH

    public static final short VERTICAL_LENGTH

  This constant represents vertical lengths.

  See Also:
    Constant Field Values

### OTHER_LENGTH

    public static final short OTHER_LENGTH

  This constant represents other lengths.

  See Also:
    Constant Field Values

### direction

    protected short direction

  This length's direction.

### baseVal

    protected AbstractSVGAnimatedLength.BaseSVGLength baseVal

  The base value.

### animVal

    protected AbstractSVGAnimatedLength.AnimSVGLength animVal

  The current animated value.

### changing

    protected boolean changing

  Whether the value is changing.

### nonNegative

    protected boolean nonNegative

  Whether the value must be non-negative.

Constructor Detail

### AbstractSVGAnimatedLength

    public AbstractSVGAnimatedLength(AbstractElement elt,
                                     String ns,
                                     String ln,
                                     short dir,
                                     boolean nonneg)

  Creates a new SVGAnimatedLength.

  Parameters:
    `elt` - The associated element.
    `ns` - The attribute's namespace URI.
    `ln` - The attribute's local name.
    `dir` - The length's direction.
    `nonneg` - Whether the length must be non-negative.

Method Detail

### getDefaultValue

    protected abstract String getDefaultValue()

  Returns:
    the default value to use when the associated attribute was not specified.

### getBaseVal

    public org.w3c.dom.svg.SVGLength getBaseVal()

  DOM: Implements `SVGAnimatedLength.getBaseVal()`.

  Specified by:
    `getBaseVal` in interface `org.w3c.dom.svg.SVGAnimatedLength`

### getAnimVal

    public org.w3c.dom.svg.SVGLength getAnimVal()

  DOM: Implements `SVGAnimatedLength.getAnimVal()`.

  Specified by:
    `getAnimVal` in interface `org.w3c.dom.svg.SVGAnimatedLength`

### getCheckedValue

    public float getCheckedValue()

  Gets the current animated length value. If the attribute is missing or malformed, an exception is thrown.

### updateAnimatedValue

    protected void updateAnimatedValue(AnimatableValue val)

  Updates the animated value with the given `AnimatableValue`.

  Specified by:
    `updateAnimatedValue` in class `AbstractSVGAnimatedValue`

### getUnderlyingValue

    public AnimatableValue getUnderlyingValue(AnimationTarget target)

  Returns the base value of the attribute as an `AnimatableValue`.

  Specified by:
    `getUnderlyingValue` in interface `AnimatedLiveAttributeValue`

### attrAdded

    public void attrAdded(Attr node,
                          String newv)

  Called when an Attr node has been added.

  Specified by:
    `attrAdded` in interface `LiveAttributeValue`

### attrModified

    public void attrModified(Attr node,
                             String oldv,
                             String newv)

  Called when an Attr node has been modified.

  Specified by:
    `attrModified` in interface `LiveAttributeValue`

### attrRemoved

    public void attrRemoved(Attr node,
                            String oldv)

  Called when an Attr node has been removed.

  Specified by:
    `attrRemoved` in interface `LiveAttributeValue`

### attrChanged

    protected void attrChanged()

  Called when the attribute has changed in some way.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008 Apache Software Foundation. All Rights Reserved.