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 the
SVGAnimatedLength interface.- Version:
- $Id$
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classThis class represents the SVGLength returned bygetAnimVal().protected classThis class represents the SVGLength returned bygetBaseVal(). -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AbstractSVGAnimatedLength.AnimSVGLengthThe current animated value.protected AbstractSVGAnimatedLength.BaseSVGLengthThe base value.protected booleanWhether the value is changing.protected shortThis length's direction.static final shortThis constant represents horizontal lengths.protected booleanWhether the value must be non-negative.static final shortThis constant represents other lengths.static final shortThis constant represents vertical lengths.Fields inherited from class AbstractSVGAnimatedValue
element, hasAnimVal, listeners, localName, namespaceURI -
Constructor Summary
ConstructorsConstructorDescriptionAbstractSVGAnimatedLength(AbstractElement elt, String ns, String ln, short dir, boolean nonneg) Creates a new SVGAnimatedLength. -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled when an Attr node has been added.protected voidCalled when the attribute has changed in some way.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.org.w3c.dom.svg.SVGLengthDOM: ImplementsSVGAnimatedLength.getAnimVal().org.w3c.dom.svg.SVGLengthDOM: ImplementsSVGAnimatedLength.getBaseVal().floatGets the current animated length value.protected abstract StringgetUnderlyingValue(AnimationTarget target) Returns the base value of the attribute as anAnimatableValue.protected voidUpdates the animated value with the givenAnimatableValue.
-
Field Details
-
HORIZONTAL_LENGTH
public static final short HORIZONTAL_LENGTHThis constant represents horizontal lengths.- See Also:
-
VERTICAL_LENGTH
public static final short VERTICAL_LENGTHThis constant represents vertical lengths.- See Also:
-
OTHER_LENGTH
public static final short OTHER_LENGTHThis constant represents other lengths.- See Also:
-
direction
protected short directionThis length's direction. -
baseVal
The base value. -
animVal
The current animated value. -
changing
protected boolean changingWhether the value is changing. -
nonNegative
protected boolean nonNegativeWhether the value must be non-negative.
-
-
Constructor Details
-
AbstractSVGAnimatedLength
public AbstractSVGAnimatedLength(AbstractElement elt, String ns, 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 Details
-
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
Updates the animated value with the givenAnimatableValue.- Specified by:
updateAnimatedValuein classAbstractSVGAnimatedValue
-
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
-
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
-
attrChanged
protected void attrChanged()Called when the attribute has changed in some way.
-