Package org.apache.batik.anim.dom
Class AbstractSVGAnimatedLength
- java.lang.Object
-
- org.apache.batik.anim.dom.AbstractSVGAnimatedValue
-
- org.apache.batik.anim.dom.AbstractSVGAnimatedLength
-
- All Implemented Interfaces:
AnimatedLiveAttributeValue,LiveAttributeValue,org.w3c.dom.svg.SVGAnimatedLength
- Direct Known Subclasses:
SVGOMAnimatedLength
public abstract class AbstractSVGAnimatedLength extends AbstractSVGAnimatedValue implements org.w3c.dom.svg.SVGAnimatedLength, LiveAttributeValue
This class provides an implementation of theSVGAnimatedLengthinterface.- Version:
- $Id: AbstractSVGAnimatedLength.java 1733416 2016-03-03 07:07:13Z gadams $
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classAbstractSVGAnimatedLength.AnimSVGLengthThis class represents the SVGLength returned bygetAnimVal().protected classAbstractSVGAnimatedLength.BaseSVGLengthThis class represents the SVGLength returned bygetBaseVal().
-
Field Summary
Fields Modifier and Type Field Description protected AbstractSVGAnimatedLength.AnimSVGLengthanimValThe current animated value.protected AbstractSVGAnimatedLength.BaseSVGLengthbaseValThe base value.protected booleanchangingWhether the value is changing.protected shortdirectionThis length's direction.static shortHORIZONTAL_LENGTHThis constant represents horizontal lengths.protected booleannonNegativeWhether the value must be non-negative.static shortOTHER_LENGTHThis constant represents other lengths.static shortVERTICAL_LENGTHThis constant represents vertical lengths.-
Fields inherited from class org.apache.batik.anim.dom.AbstractSVGAnimatedValue
element, hasAnimVal, listeners, localName, namespaceURI
-
-
Constructor Summary
Constructors Constructor Description AbstractSVGAnimatedLength(AbstractElement elt, java.lang.String ns, java.lang.String ln, short dir, boolean nonneg)Creates a new SVGAnimatedLength.
-
Method Summary
All Methods Instance Methods Abstract 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.protected voidattrChanged()Called when the attribute has changed in some way.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.org.w3c.dom.svg.SVGLengthgetAnimVal()DOM: ImplementsSVGAnimatedLength.getAnimVal().org.w3c.dom.svg.SVGLengthgetBaseVal()DOM: ImplementsSVGAnimatedLength.getBaseVal().floatgetCheckedValue()Gets the current animated length value.protected abstract java.lang.StringgetDefaultValue()AnimatableValuegetUnderlyingValue(AnimationTarget target)Returns the base value of the attribute as anAnimatableValue.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
-
HORIZONTAL_LENGTH
public static final short HORIZONTAL_LENGTH
This constant represents horizontal lengths.- See Also:
- Constant Field Values
-
VERTICAL_LENGTH
public static final short VERTICAL_LENGTH
This constant represents vertical lengths.- See Also:
- Constant Field Values
-
OTHER_LENGTH
public static final short OTHER_LENGTH
This constant represents other lengths.- See Also:
- Constant Field Values
-
direction
protected short direction
This length's direction.
-
baseVal
protected AbstractSVGAnimatedLength.BaseSVGLength baseVal
The base value.
-
animVal
protected AbstractSVGAnimatedLength.AnimSVGLength animVal
The current animated value.
-
changing
protected boolean changing
Whether the value is changing.
-
nonNegative
protected boolean nonNegative
Whether the value must be non-negative.
-
-
Constructor Detail
-
AbstractSVGAnimatedLength
public AbstractSVGAnimatedLength(AbstractElement elt, java.lang.String ns, java.lang.String ln, short dir, boolean nonneg)
Creates a new SVGAnimatedLength.- Parameters:
elt- The associated element.ns- The attribute's namespace URI.ln- The attribute's local name.dir- The length's direction.nonneg- Whether the length must be non-negative.
-
-
Method Detail
-
getDefaultValue
protected abstract java.lang.String getDefaultValue()
- Returns:
- the default value to use when the associated attribute was not specified.
-
getBaseVal
public org.w3c.dom.svg.SVGLength getBaseVal()
DOM: ImplementsSVGAnimatedLength.getBaseVal().- Specified by:
getBaseValin interfaceorg.w3c.dom.svg.SVGAnimatedLength
-
getAnimVal
public org.w3c.dom.svg.SVGLength getAnimVal()
DOM: ImplementsSVGAnimatedLength.getAnimVal().- Specified by:
getAnimValin interfaceorg.w3c.dom.svg.SVGAnimatedLength
-
getCheckedValue
public float getCheckedValue()
Gets the current animated length value. If the attribute is missing or malformed, an exception is thrown.
-
updateAnimatedValue
protected void updateAnimatedValue(AnimatableValue val)
Updates the animated value with the givenAnimatableValue.- Specified by:
updateAnimatedValuein classAbstractSVGAnimatedValue
-
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
-
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
-
attrChanged
protected void attrChanged()
Called when the attribute has changed in some way.
-
-