com.kitfox.svg.animation
Class AnimationElement

java.lang.Object
  extended by com.kitfox.svg.SVGElement
      extended by com.kitfox.svg.animation.AnimationElement
Direct Known Subclasses:
AnimateBase, SetSmil

public abstract class AnimationElement
extends SVGElement

Author:
Mark McKay, Mark McKay

Field Summary
static int AC_REPLACE
          Accumlative state
static int AC_SUM
           
static int AD_REPLACE
          Additive state of track
static int AD_SUM
           
static int AT_AUTO
           
static int AT_CSS
           
static int AT_XML
           
protected  java.lang.String attribName
           
protected  int attribType
           
protected  TimeBase beginTime
           
protected  TimeBase durTime
           
protected  TimeBase endTime
           
protected  int fillType
           
static int FT_AUTO
           
static int FT_DEFAULT
           
static int FT_FREEZE
           
static int FT_HOLD
           
static int FT_REMOVE
          More about the fill attribute
static int FT_TRANSITION
           
 
Fields inherited from class com.kitfox.svg.SVGElement
children, cssClass, diagram, id, ignorePresAttrib, inlineStyles, parent, presAttribs, SVG_NS, trackManager, xmlBase
 
Constructor Summary
AnimationElement()
          Creates a new instance of AnimateEle
 
Method Summary
static java.lang.String animationElementToString(int attrValue)
           
 void evalParametric(AnimationTimeEval state, double curTime)
           
protected  void evalParametric(AnimationTimeEval state, double curTime, double repeatCount, double repeatDur)
          Compares current time to start and end times and determines what degree of time interpolation this track currently represents.
 int getAccumulateType()
           
 int getAdditiveType()
           
 java.lang.String getAttribName()
           
 int getAttribType()
           
 void loaderStartElement(SVGLoaderHelper helper, org.xml.sax.Attributes attrs, SVGElement parent)
          Called during SAX load process to notify that this tag has begun the process of being loaded
 boolean updateTime(double curTime)
          Updates all attributes in this diagram associated with a time event.
 
Methods inherited from class com.kitfox.svg.SVGElement
addAttribute, build, buildPath, getChild, getChildren, getId, getParent, getPath, getPres, getPresAbsolute, getStyle, getStyle, getStyleAbsolute, getXMLBase, hasAttribute, loaderAddChild, loaderAddText, loaderEndElement, nextFloat, parsePathList, parseSingleTransform, parseTransform, removeChild, setAttribute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

attribName

protected java.lang.String attribName

attribType

protected int attribType

AT_CSS

public static final int AT_CSS
See Also:
Constant Field Values

AT_XML

public static final int AT_XML
See Also:
Constant Field Values

AT_AUTO

public static final int AT_AUTO
See Also:
Constant Field Values

beginTime

protected TimeBase beginTime

durTime

protected TimeBase durTime

endTime

protected TimeBase endTime

fillType

protected int fillType

FT_REMOVE

public static final int FT_REMOVE
More about the fill attribute

See Also:
Constant Field Values

FT_FREEZE

public static final int FT_FREEZE
See Also:
Constant Field Values

FT_HOLD

public static final int FT_HOLD
See Also:
Constant Field Values

FT_TRANSITION

public static final int FT_TRANSITION
See Also:
Constant Field Values

FT_AUTO

public static final int FT_AUTO
See Also:
Constant Field Values

FT_DEFAULT

public static final int FT_DEFAULT
See Also:
Constant Field Values

AD_REPLACE

public static final int AD_REPLACE
Additive state of track

See Also:
Constant Field Values

AD_SUM

public static final int AD_SUM
See Also:
Constant Field Values

AC_REPLACE

public static final int AC_REPLACE
Accumlative state

See Also:
Constant Field Values

AC_SUM

public static final int AC_SUM
See Also:
Constant Field Values
Constructor Detail

AnimationElement

public AnimationElement()
Creates a new instance of AnimateEle

Method Detail

animationElementToString

public static java.lang.String animationElementToString(int attrValue)

loaderStartElement

public void loaderStartElement(SVGLoaderHelper helper,
                               org.xml.sax.Attributes attrs,
                               SVGElement parent)
                        throws org.xml.sax.SAXException
Description copied from class: SVGElement
Called during SAX load process to notify that this tag has begun the process of being loaded

Overrides:
loaderStartElement in class SVGElement
Parameters:
helper - - An object passed to all SVG elements involved in this build process to aid in sharing information.
attrs - - Attributes of this tag
Throws:
org.xml.sax.SAXException

getAttribName

public java.lang.String getAttribName()

getAttribType

public int getAttribType()

getAdditiveType

public int getAdditiveType()

getAccumulateType

public int getAccumulateType()

evalParametric

public void evalParametric(AnimationTimeEval state,
                           double curTime)

evalParametric

protected void evalParametric(AnimationTimeEval state,
                              double curTime,
                              double repeatCount,
                              double repeatDur)
Compares current time to start and end times and determines what degree of time interpolation this track currently represents. Returns Float.NaN if this track cannot be evaluated at the passed time (ie, it is before or past the end of the track, or it depends upon an unknown event)

Parameters:
state - - A structure that will be filled with information regarding the applicability of this animatoin element at the passed time.
curTime - - Current time in seconds
repeatCount - - Optional number of repetitions of length 'dur' to do. Set to Double.NaN to not consider this in the calculation.
repeatDur - - Optional amoun tof time to repeat the animaiton. Set to Double.NaN to not consider this in the calculation.

updateTime

public boolean updateTime(double curTime)
Updates all attributes in this diagram associated with a time event. Ie, all attributes with track information.

Specified by:
updateTime in class SVGElement
Returns:
- true if this node has changed state as a result of the time update