org.apache.batik.dom.svg

Class SVGOMAnimatedEnumeration

public class SVGOMAnimatedEnumeration extends AbstractSVGAnimatedValue implements SVGAnimatedEnumeration

This class provides an implementation of the SVGAnimatedEnumeration interface.
Field Summary
protected shortanimVal
The current animated value.
protected shortbaseVal
The current base value.
protected booleanchanging
Whether the value is changing.
protected shortdefaultValue
The default value, if the attribute is not specified.
protected booleanvalid
Whether the current base value is valid.
protected String[]values
The values in this enumeration.
Constructor Summary
SVGOMAnimatedEnumeration(AbstractElement elt, String ns, String ln, String[] val, short def)
Creates a new SVGOMAnimatedEnumeration.
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.
shortgetAnimVal()
DOM: Implements SVGAnimatedEnumeration#getAnimVal().
shortgetBaseVal()
DOM: Implements SVGAnimatedEnumeration#getBaseVal().
StringgetBaseValAsString()
Returns the base value as a string.
shortgetCheckedVal()
Gets the current animated value, throwing an exception if the attribute is malformed.
protected shortgetEnumerationNumber(String s)
Returns the enumeration number of the specified string.
AnimatableValuegetUnderlyingValue(AnimationTarget target)
Returns the base value of the attribute as an AnimatableValue.
voidsetBaseVal(short baseVal)
DOM: Implements SVGAnimatedEnumeration#setBaseVal(short).
protected voidupdate()
Updates the base value from the attribute.
protected voidupdateAnimatedValue(AnimatableValue val)
Updates the animated value with the given AnimatableValue.

Field Detail

animVal

protected short animVal
The current animated value.

baseVal

protected short baseVal
The current base value.

changing

protected boolean changing
Whether the value is changing.

defaultValue

protected short defaultValue
The default value, if the attribute is not specified.

valid

protected boolean valid
Whether the current base value is valid.

values

protected String[] values
The values in this enumeration.

Constructor Detail

SVGOMAnimatedEnumeration

public SVGOMAnimatedEnumeration(AbstractElement elt, String ns, String ln, String[] val, short def)
Creates a new SVGOMAnimatedEnumeration.

Parameters: elt The associated element. ns The attribute's namespace URI. ln The attribute's local name. val The values in this enumeration. def The default value to use.

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 short getAnimVal()
DOM: Implements SVGAnimatedEnumeration#getAnimVal().

getBaseVal

public short getBaseVal()
DOM: Implements SVGAnimatedEnumeration#getBaseVal().

getBaseValAsString

public String getBaseValAsString()
Returns the base value as a string.

getCheckedVal

public short getCheckedVal()
Gets the current animated value, throwing an exception if the attribute is malformed.

getEnumerationNumber

protected short getEnumerationNumber(String s)
Returns the enumeration number of the specified string.

getUnderlyingValue

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

setBaseVal

public void setBaseVal(short baseVal)
DOM: Implements SVGAnimatedEnumeration#setBaseVal(short).

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.