Package com.kitfox.svg.animation
Class TrackBase
- java.lang.Object
-
- com.kitfox.svg.animation.TrackBase
-
- Direct Known Subclasses:
TrackColor
,TrackDouble
,TrackMotion
,TrackPath
,TrackTransform
public abstract class TrackBase extends java.lang.Object
A track holds the animation events for a single parameter of a single SVG element. It also contains the default value for the element, should the user want to see the 'unanimated' value.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.ArrayList<AnimationElement>
animEvents
protected java.lang.String
attribName
protected int
attribType
protected SVGElement
parent
Element we're animating
-
Constructor Summary
Constructors Constructor Description TrackBase(SVGElement parent, AnimationElement ele)
Creates a track that would be valid for the name and type of element passed in.TrackBase(SVGElement parent, java.lang.String attribName, int attribType)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addElement(AnimationElement ele)
java.lang.String
getAttribName()
int
getAttribType()
abstract boolean
getValue(StyleAttribute attrib, double curTime)
Returns a StyleAttribute representing the value of this track at the passed time.
-
-
-
Field Detail
-
attribName
protected final java.lang.String attribName
-
attribType
protected final int attribType
-
parent
protected final SVGElement parent
Element we're animating
-
animEvents
final java.util.ArrayList<AnimationElement> animEvents
-
-
Constructor Detail
-
TrackBase
public TrackBase(SVGElement parent, AnimationElement ele) throws SVGElementException
Creates a track that would be valid for the name and type of element passed in. Does not actually add this elemnt to the track.- Throws:
SVGElementException
-
TrackBase
public TrackBase(SVGElement parent, java.lang.String attribName, int attribType) throws SVGElementException
- Throws:
SVGElementException
-
-
Method Detail
-
getAttribName
public java.lang.String getAttribName()
-
getAttribType
public int getAttribType()
-
addElement
public void addElement(AnimationElement ele)
-
getValue
public abstract boolean getValue(StyleAttribute attrib, double curTime) throws SVGException
Returns a StyleAttribute representing the value of this track at the passed time. If this track does not apply, returns null.- Returns:
- - True if successful, false if a value could not be obtained
- Throws:
SVGException
-
-