Package com.kitfox.svg.animation
Class AnimationElement
- java.lang.Object
-
- com.kitfox.svg.SVGElement
-
- com.kitfox.svg.animation.AnimationElement
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
AnimateBase,SetSmil
public abstract class AnimationElement extends SVGElement
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static intAC_REPLACEAccumlative statestatic intAC_SUMprivate intaccumulateTypestatic intAD_REPLACEAdditive state of trackstatic intAD_SUMprivate intadditiveTypestatic intAT_AUTOstatic intAT_CSSstatic intAT_XMLprotected java.lang.StringattribNameprotected intattribTypeprivate TimeBasebeginTimeprivate TimeBasedurTimeprivate TimeBaseendTimeprivate intfillTypestatic intFT_AUTOstatic intFT_DEFAULTstatic intFT_FREEZEstatic intFT_HOLDstatic intFT_REMOVEstatic intFT_TRANSITION-
Fields inherited from class com.kitfox.svg.SVGElement
children, cssClass, diagram, id, ignorePresAttrib, inlineStyles, parent, presAttribs, serialVersionUID, SVG_NS, trackManager, xmlBase
-
-
Constructor Summary
Constructors Constructor Description AnimationElement()Creates a new instance of AnimateEle
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.lang.StringanimationElementToString(int attrValue)(package private) doubleevalDurTime()(package private) doubleevalEndTime()Evaluates the ending time of this element.voidevalParametric(AnimationTimeEval state, double curTime)protected voidevalParametric(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.(package private) doubleevalStartTime()intgetAccumulateType()intgetAdditiveType()java.lang.StringgetAttribName()intgetAttribType()TimeBasegetBeginTime()TimeBasegetDurTime()TimeBasegetEndTime()intgetFillType()(package private) booleanhasEndTime()Checks to see if an end time has been specified for this element.voidloaderStartElement(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 loadedvoidrebuild()protected voidrebuild(AnimTimeParser animTimeParser)voidsetAccumulateType(int accumulateType)voidsetAdditiveType(int additiveType)voidsetBeginTime(TimeBase beginTime)voidsetDurTime(TimeBase durTime)voidsetEndTime(TimeBase endTime)voidsetFillType(int fillType)booleanupdateTime(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, getChild, getChildren, getId, getInlineAttributes, getNumChildren, getParent, getParentContext, getPath, getPres, getPresAbsolute, getPresentationAttributes, getRoot, getStyle, getStyle, getStyle, getStyleAbsolute, getTagName, getXMLBase, hasAttribute, indexOfChild, lerp, loaderAddChild, loaderAddText, loaderEndElement, nextFloat, parsePathList, parseSingleTransform, parseTransform, popParentContext, pushParentContext, removeAttribute, removeChild, setAttribute, setDiagram, swapChildren
-
-
-
-
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
private TimeBase beginTime
-
durTime
private TimeBase durTime
-
endTime
private TimeBase endTime
-
fillType
private int fillType
-
FT_REMOVE
public static final int FT_REMOVE
- 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
-
additiveType
private int additiveType
-
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
-
accumulateType
private int accumulateType
-
-
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:SVGElementCalled during SAX load process to notify that this tag has begun the process of being loaded- Overrides:
loaderStartElementin classSVGElement- 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 secondsrepeatCount- - 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.
-
evalStartTime
double evalStartTime()
-
evalDurTime
double evalDurTime()
-
evalEndTime
double evalEndTime()
Evaluates the ending time of this element. Returns 0 if not specified.- See Also:
hasEndTime()
-
hasEndTime
boolean hasEndTime()
Checks to see if an end time has been specified for this element.
-
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:
updateTimein classSVGElement- Returns:
- - true if this node has changed state as a result of the time update
-
rebuild
public void rebuild() throws SVGException- Throws:
SVGException
-
rebuild
protected void rebuild(AnimTimeParser animTimeParser) throws SVGException
- Throws:
SVGException
-
getBeginTime
public TimeBase getBeginTime()
- Returns:
- the beginTime
-
setBeginTime
public void setBeginTime(TimeBase beginTime)
- Parameters:
beginTime- the beginTime to set
-
getDurTime
public TimeBase getDurTime()
- Returns:
- the durTime
-
setDurTime
public void setDurTime(TimeBase durTime)
- Parameters:
durTime- the durTime to set
-
getEndTime
public TimeBase getEndTime()
- Returns:
- the endTime
-
setEndTime
public void setEndTime(TimeBase endTime)
- Parameters:
endTime- the endTime to set
-
getFillType
public int getFillType()
- Returns:
- the fillType
-
setFillType
public void setFillType(int fillType)
- Parameters:
fillType- the fillType to set
-
setAdditiveType
public void setAdditiveType(int additiveType)
- Parameters:
additiveType- the additiveType to set
-
setAccumulateType
public void setAccumulateType(int accumulateType)
- Parameters:
accumulateType- the accumulateType to set
-
-