Package org.apache.batik.anim.dom
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 theSVGAnimatedEnumerationinterface.- Version:
- $Id: SVGOMAnimatedEnumeration.java 1733416 2016-03-03 07:07:13Z gadams $
-
-
Field Summary
Fields Modifier and Type Field Description protected shortanimValThe current animated value.protected shortbaseValThe current base value.protected booleanchangingWhether the value is changing.protected shortdefaultValueThe default value, if the attribute is not specified.protected booleanvalidWhether the current base value is valid.protected java.lang.String[]valuesThe values in this enumeration.-
Fields inherited from class org.apache.batik.anim.dom.AbstractSVGAnimatedValue
element, hasAnimVal, listeners, localName, namespaceURI
-
-
Constructor Summary
Constructors Constructor Description SVGOMAnimatedEnumeration(AbstractElement elt, java.lang.String ns, java.lang.String ln, java.lang.String[] val, short def)Creates a new SVGOMAnimatedEnumeration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidattrAdded(org.w3c.dom.Attr node, java.lang.String newv)Called when an Attr node has been added.voidattrModified(org.w3c.dom.Attr node, java.lang.String oldv, java.lang.String newv)Called when an Attr node has been modified.voidattrRemoved(org.w3c.dom.Attr node, java.lang.String oldv)Called when an Attr node has been removed.shortgetAnimVal()DOM: ImplementsSVGAnimatedEnumeration.getAnimVal().shortgetBaseVal()DOM: ImplementsSVGAnimatedEnumeration.getBaseVal().java.lang.StringgetBaseValAsString()Returns the base value as a string.shortgetCheckedVal()Gets the current animated value, throwing an exception if the attribute is malformed.protected shortgetEnumerationNumber(java.lang.String s)Returns the enumeration number of the specified string.AnimatableValuegetUnderlyingValue(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 voidupdateAnimatedValue(AnimatableValue val)Updates the animated value with the givenAnimatableValue.-
Methods inherited from class org.apache.batik.anim.dom.AbstractSVGAnimatedValue
addAnimatedAttributeListener, fireAnimatedAttributeListeners, fireBaseAttributeListeners, getLocalName, getNamespaceURI, isSpecified, removeAnimatedAttributeListener
-
-
-
-
Field Detail
-
values
protected java.lang.String[] values
The values in this enumeration.
-
defaultValue
protected short defaultValue
The default value, if the attribute is not specified.
-
valid
protected boolean valid
Whether the current base value is valid.
-
baseVal
protected short baseVal
The current base value.
-
animVal
protected short animVal
The current animated value.
-
changing
protected boolean changing
Whether the value is changing.
-
-
Constructor Detail
-
SVGOMAnimatedEnumeration
public SVGOMAnimatedEnumeration(AbstractElement elt, java.lang.String ns, java.lang.String ln, java.lang.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
-
getBaseVal
public short getBaseVal()
DOM: ImplementsSVGAnimatedEnumeration.getBaseVal().- Specified by:
getBaseValin interfaceorg.w3c.dom.svg.SVGAnimatedEnumeration
-
getBaseValAsString
public java.lang.String getBaseValAsString()
Returns the base value as a string.
-
update
protected void update()
Updates the base value from the attribute.
-
getEnumerationNumber
protected short getEnumerationNumber(java.lang.String s)
Returns the enumeration number of the specified string.
-
setBaseVal
public void setBaseVal(short baseVal) throws org.w3c.dom.DOMExceptionDOM: ImplementsSVGAnimatedEnumeration.setBaseVal(short).- Specified by:
setBaseValin interfaceorg.w3c.dom.svg.SVGAnimatedEnumeration- Throws:
org.w3c.dom.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
public AnimatableValue getUnderlyingValue(AnimationTarget target)
Returns the base value of the attribute as anAnimatableValue.- Specified by:
getUnderlyingValuein interfaceAnimatedLiveAttributeValue
-
attrAdded
public void attrAdded(org.w3c.dom.Attr node, java.lang.String newv)Called when an Attr node has been added.- Specified by:
attrAddedin interfaceLiveAttributeValue
-
updateAnimatedValue
protected void updateAnimatedValue(AnimatableValue val)
Updates the animated value with the givenAnimatableValue.- Specified by:
updateAnimatedValuein classAbstractSVGAnimatedValue
-
attrModified
public void attrModified(org.w3c.dom.Attr node, java.lang.String oldv, java.lang.String newv)Called when an Attr node has been modified.- Specified by:
attrModifiedin interfaceLiveAttributeValue
-
attrRemoved
public void attrRemoved(org.w3c.dom.Attr node, java.lang.String oldv)Called when an Attr node has been removed.- Specified by:
attrRemovedin interfaceLiveAttributeValue
-
-