org.apache.batik.dom.svg

Class AbstractSVGAnimatedLength

public abstract class AbstractSVGAnimatedLength extends AbstractSVGAnimatedValue implements SVGAnimatedLength, LiveAttributeValue

This class provides an implementation of the {@link SVGAnimatedLength} interface.
Nested Class Summary
protected classAbstractSVGAnimatedLength.AnimSVGLength
This class represents the SVGLength returned by {@link AbstractSVGAnimatedLength#getAnimVal()}.
protected classAbstractSVGAnimatedLength.BaseSVGLength
This class represents the SVGLength returned by {@link AbstractSVGAnimatedLength#getBaseVal() }.
Field Summary
protected AbstractSVGAnimatedLength.AnimSVGLengthanimVal
The current animated value.
protected AbstractSVGAnimatedLength.BaseSVGLengthbaseVal
The base value.
protected booleanchanging
Whether the value is changing.
protected shortdirection
This length's direction.
static shortHORIZONTAL_LENGTH
This constant represents horizontal lengths.
protected booleannonNegative
Whether the value must be non-negative.
static shortOTHER_LENGTH
This constant represents other lengths.
static shortVERTICAL_LENGTH
This constant represents vertical lengths.
Constructor Summary
AbstractSVGAnimatedLength(AbstractElement elt, String ns, String ln, short dir, boolean nonneg)
Creates a new SVGAnimatedLength.
Method Summary
voidattrAdded(Attr node, String newv)
Called when an Attr node has been added.
protected voidattrChanged()
Called when the attribute has changed in some way.
voidattrModified(Attr node, String oldv, String newv)
Called when an Attr node has been modified.
voidattrRemoved(Attr node, String oldv)
Called when an Attr node has been removed.
SVGLengthgetAnimVal()
DOM: Implements {@link SVGAnimatedLength#getAnimVal()}.
SVGLengthgetBaseVal()
DOM: Implements {@link SVGAnimatedLength#getBaseVal()}.
protected abstract StringgetDefaultValue()
AnimatableValuegetUnderlyingValue(AnimationTarget target)
Returns the base value of the attribute as an {@link AnimatableValue}.
protected voidupdateAnimatedValue(AnimatableValue val)
Updates the animated value with the given {@link AnimatableValue}.

Field Detail

animVal

protected AbstractSVGAnimatedLength.AnimSVGLength animVal
The current animated value.

baseVal

protected AbstractSVGAnimatedLength.BaseSVGLength baseVal
The base value.

changing

protected boolean changing
Whether the value is changing.

direction

protected short direction
This length's direction.

HORIZONTAL_LENGTH

public static final short HORIZONTAL_LENGTH
This constant represents horizontal lengths.

nonNegative

protected boolean nonNegative
Whether the value must be non-negative.

OTHER_LENGTH

public static final short OTHER_LENGTH
This constant represents other lengths.

VERTICAL_LENGTH

public static final short VERTICAL_LENGTH
This constant represents vertical lengths.

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

attrAdded

public void attrAdded(Attr node, String newv)
Called when an Attr node has been added.

attrChanged

protected void attrChanged()
Called when the attribute has changed in some way.

attrModified

public void attrModified(Attr node, String oldv, String newv)
Called when an Attr node has been modified.

attrRemoved

public void attrRemoved(Attr node, String oldv)
Called when an Attr node has been removed.

getAnimVal

public SVGLength getAnimVal()
DOM: Implements {@link SVGAnimatedLength#getAnimVal()}.

getBaseVal

public SVGLength getBaseVal()
DOM: Implements {@link SVGAnimatedLength#getBaseVal()}.

getDefaultValue

protected abstract String getDefaultValue()

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

getUnderlyingValue

public AnimatableValue getUnderlyingValue(AnimationTarget target)
Returns the base value of the attribute as an {@link AnimatableValue}.

updateAnimatedValue

protected void updateAnimatedValue(AnimatableValue val)
Updates the animated value with the given {@link AnimatableValue}.
Copyright B) 2007 Apache Software Foundation. All Rights Reserved.