Class SVGOMAnimatedEnumeration
java.lang.Object
org.apache.batik.anim.dom.AbstractSVGAnimatedValue
org.apache.batik.anim.dom.SVGOMAnimatedEnumeration
- All Implemented Interfaces:
AnimatedLiveAttributeValue, LiveAttributeValue, org.w3c.dom.svg.SVGAnimatedEnumeration
public class SVGOMAnimatedEnumeration
extends AbstractSVGAnimatedValue
implements org.w3c.dom.svg.SVGAnimatedEnumeration
This class provides an implementation of the
SVGAnimatedEnumeration interface.- Version:
- $Id$
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected shortThe current animated value.protected shortThe current base value.protected booleanWhether the value is changing.protected shortThe default value, if the attribute is not specified.protected booleanWhether the current base value is valid.protected String[]The values in this enumeration.Fields inherited from class AbstractSVGAnimatedValue
element, hasAnimVal, listeners, localName, namespaceURI -
Constructor Summary
ConstructorsConstructorDescriptionSVGOMAnimatedEnumeration(AbstractElement elt, String ns, String ln, String[] val, short def) Creates a new SVGOMAnimatedEnumeration. -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled 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.shortDOM: ImplementsSVGAnimatedEnumeration.getAnimVal().shortDOM: ImplementsSVGAnimatedEnumeration.getBaseVal().Returns the base value as a string.shortGets the current animated value, throwing an exception if the attribute is malformed.protected shortReturns the enumeration number of the specified string.getUnderlyingValue(AnimationTarget target) Returns the base value of the attribute as anAnimatableValue.voidsetBaseVal(short baseVal) DOM: ImplementsSVGAnimatedEnumeration.setBaseVal(short).protected voidupdate()Updates the base value from the attribute.protected voidUpdates the animated value with the givenAnimatableValue.
-
Field Details
-
values
The values in this enumeration. -
defaultValue
protected short defaultValueThe default value, if the attribute is not specified. -
valid
protected boolean validWhether the current base value is valid. -
baseVal
protected short baseValThe current base value. -
animVal
protected short animValThe current animated value. -
changing
protected boolean changingWhether the value is changing.
-
-
Constructor Details
-
SVGOMAnimatedEnumeration
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 Details
-
getBaseVal
public short getBaseVal()DOM: ImplementsSVGAnimatedEnumeration.getBaseVal().- Specified by:
getBaseValin interfaceorg.w3c.dom.svg.SVGAnimatedEnumeration
-
getBaseValAsString
Returns the base value as a string. -
update
protected void update()Updates the base value from the attribute. -
getEnumerationNumber
Returns the enumeration number of the specified string. -
setBaseVal
DOM: ImplementsSVGAnimatedEnumeration.setBaseVal(short).- Specified by:
setBaseValin interfaceorg.w3c.dom.svg.SVGAnimatedEnumeration- Throws:
DOMException
-
getAnimVal
public short getAnimVal()DOM: ImplementsSVGAnimatedEnumeration.getAnimVal().- Specified by:
getAnimValin interfaceorg.w3c.dom.svg.SVGAnimatedEnumeration
-
getCheckedVal
public short getCheckedVal()Gets the current animated value, throwing an exception if the attribute is malformed. -
getUnderlyingValue
Returns the base value of the attribute as anAnimatableValue.- Specified by:
getUnderlyingValuein interfaceAnimatedLiveAttributeValue
-
attrAdded
Called when an Attr node has been added.- Specified by:
attrAddedin interfaceLiveAttributeValue
-
updateAnimatedValue
Updates the animated value with the givenAnimatableValue.- Specified by:
updateAnimatedValuein classAbstractSVGAnimatedValue
-
attrModified
Called when an Attr node has been modified.- Specified by:
attrModifiedin interfaceLiveAttributeValue
-
attrRemoved
Called when an Attr node has been removed.- Specified by:
attrRemovedin interfaceLiveAttributeValue
-