com.kitfox.svg.animation
Class TrackBase

java.lang.Object
  extended by 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.

Author:
Mark McKay, Mark McKay

Field Summary
protected  java.lang.String attribName
           
protected  int attribType
           
protected  SVGElement parent
          Element we're animating
 
Constructor Summary
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
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

attribName

protected final java.lang.String attribName

attribType

protected final int attribType

parent

protected final SVGElement parent
Element we're animating

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