org.apache.batik.dom.svg

Class SVGOMAnimatedNumber

public class SVGOMAnimatedNumber extends AbstractSVGAnimatedValue implements SVGAnimatedNumber

This class implements the SVGAnimatedNumber interface.
Field Summary
protected booleanallowPercentage
Whether the parsed number can be a percentage.
protected floatanimVal
The current animated value.
protected floatbaseVal
The current base value.
protected booleanchanging
Whether the value is changing.
protected floatdefaultValue
The default value.
protected booleanvalid
Whether the base value is valid.
Constructor Summary
SVGOMAnimatedNumber(AbstractElement elt, String ns, String ln, float val)
Creates a new SVGOMAnimatedNumber.
SVGOMAnimatedNumber(AbstractElement elt, String ns, String ln, float val, boolean allowPercentage)
Creates a new SVGOMAnimatedNumber possibly parsing it as a percentage.
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.
floatgetAnimVal()
DOM: Implements SVGAnimatedNumber#getAnimVal().
floatgetBaseVal()
DOM: Implements SVGAnimatedNumber#getBaseVal().
AnimatableValuegetUnderlyingValue(AnimationTarget target)
Returns the base value of the attribute as an AnimatableValue.
voidsetBaseVal(float baseVal)
DOM: Implements SVGAnimatedNumber#setBaseVal(float).
protected voidupdate()
Updates the base value from the attribute.
protected voidupdateAnimatedValue(AnimatableValue val)
Updates the animated value with the given AnimatableValue.

Field Detail

allowPercentage

protected boolean allowPercentage
Whether the parsed number can be a percentage.

animVal

protected float animVal
The current animated value.

baseVal

protected float baseVal
The current base value.

changing

protected boolean changing
Whether the value is changing.

defaultValue

protected float defaultValue
The default value.

valid

protected boolean valid
Whether the base value is valid.

Constructor Detail

SVGOMAnimatedNumber

public SVGOMAnimatedNumber(AbstractElement elt, String ns, String ln, float val)
Creates a new SVGOMAnimatedNumber.

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

SVGOMAnimatedNumber

public SVGOMAnimatedNumber(AbstractElement elt, String ns, String ln, float val, boolean allowPercentage)
Creates a new SVGOMAnimatedNumber possibly parsing it as a percentage.

Parameters: elt The associated element. ns The attribute's namespace URI. ln The attribute's local name. val The default value, if the attribute is not specified. allowPercentage Allows number specified as a percentage.

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.

getAnimVal

public float getAnimVal()
DOM: Implements SVGAnimatedNumber#getAnimVal().

getBaseVal

public float getBaseVal()
DOM: Implements SVGAnimatedNumber#getBaseVal().

getUnderlyingValue

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

setBaseVal

public void setBaseVal(float baseVal)
DOM: Implements SVGAnimatedNumber#setBaseVal(float).

update

protected void update()
Updates the base value from the attribute.

updateAnimatedValue

protected void updateAnimatedValue(AnimatableValue val)
Updates the animated value with the given AnimatableValue.
Copyright B) 2008 Apache Software Foundation. All Rights Reserved.