org.apache.batik.dom.svg

Class SVGOMAnimatedPathData

public class SVGOMAnimatedPathData extends AbstractSVGAnimatedValue implements SVGAnimatedPathData

This class is the implementation of the {@link SVGAnimatedPathData} interface.
Nested Class Summary
classSVGOMAnimatedPathData.AnimSVGPathSegList
{@link SVGPathSegList} implementation for the animated path data value.
classSVGOMAnimatedPathData.BaseSVGPathSegList
{@link SVGPathSegList} implementation for the base path data value.
classSVGOMAnimatedPathData.NormalizedBaseSVGPathSegList
{@link SVGPathSegList} implementation for the normalized version of the base path data value.
Field Summary
protected SVGOMAnimatedPathData.AnimSVGPathSegListanimPathSegs
The animated path data value.
protected booleanchanging
Whether the list is changing.
protected StringdefaultValue
Default value for the 'd' attribute.
protected SVGOMAnimatedPathData.NormalizedBaseSVGPathSegListnormalizedPathSegs
The normalized base path data value.
protected SVGOMAnimatedPathData.BaseSVGPathSegListpathSegs
The base path data value.
Constructor Summary
SVGOMAnimatedPathData(AbstractElement elt, String ns, String ln, String defaultValue)
Creates a new SVGOMAnimatedPathData.
Method Summary
voidattrAdded(Attr node, String newv)
Called when an Attr node has been added.
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.
SVGPathSegListgetAnimatedNormalizedPathSegList()
DOM: Implements {@link SVGAnimatedPathData#getAnimatedNormalizedPathSegList()}.
SVGPathSegListgetAnimatedPathSegList()
DOM: Implements {@link SVGAnimatedPathData#getAnimatedPathSegList()}.
SVGPathSegListgetNormalizedPathSegList()
DOM: Implements {@link SVGAnimatedPathData#getNormalizedPathSegList()}.
SVGPathSegListgetPathSegList()
DOM: Implements {@link SVGAnimatedPathData#getPathSegList()}.
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

animPathSegs

protected SVGOMAnimatedPathData.AnimSVGPathSegList animPathSegs
The animated path data value.

changing

protected boolean changing
Whether the list is changing.

defaultValue

protected String defaultValue
Default value for the 'd' attribute.

normalizedPathSegs

protected SVGOMAnimatedPathData.NormalizedBaseSVGPathSegList normalizedPathSegs
The normalized base path data value.

pathSegs

protected SVGOMAnimatedPathData.BaseSVGPathSegList pathSegs
The base path data value.

Constructor Detail

SVGOMAnimatedPathData

public SVGOMAnimatedPathData(AbstractElement elt, String ns, String ln, String defaultValue)
Creates a new SVGOMAnimatedPathData.

Parameters: elt The associated element. ns The attribute's namespace URI. ln The attribute's local name. defaultValue The default value if the attribute is not specified.

Method Detail

attrAdded

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

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.

getAnimatedNormalizedPathSegList

public SVGPathSegList getAnimatedNormalizedPathSegList()
DOM: Implements {@link SVGAnimatedPathData#getAnimatedNormalizedPathSegList()}.

getAnimatedPathSegList

public SVGPathSegList getAnimatedPathSegList()
DOM: Implements {@link SVGAnimatedPathData#getAnimatedPathSegList()}.

getNormalizedPathSegList

public SVGPathSegList getNormalizedPathSegList()
DOM: Implements {@link SVGAnimatedPathData#getNormalizedPathSegList()}.

Returns the SVGPathSegList mapping the normalized static 'd' attribute of the element.

A normalized path is composed only of absolute moveto, lineto and cubicto path segments (M, L and C). Using this subset, the path description can be represented with fewer segment types. Be aware that the normalized 'd' attribute will be a larger String that the original.

Relative values are transformed into absolute, quadratic curves are promoted to cubic curves, and arcs are converted into one or more cubic curves (one per quadrant).

Modifications to the normalized SVGPathSegList will result in substituting the original path with a set of normalized path segments.

Returns: a path segment list containing the normalized version of the path.

getPathSegList

public SVGPathSegList getPathSegList()
DOM: Implements {@link SVGAnimatedPathData#getPathSegList()}.

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.