Package com.kitfox.svg.animation
Class Animate
- java.lang.Object
-
- com.kitfox.svg.SVGElement
-
- com.kitfox.svg.animation.AnimationElement
-
- com.kitfox.svg.animation.AnimateBase
-
- com.kitfox.svg.animation.Animate
-
- All Implemented Interfaces:
AnimateColorIface,java.io.Serializable
public class Animate extends AnimateBase implements AnimateColorIface
Animate is a really annoying morphic tag that could represent a real value, a color or a path- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private doublebyValue(package private) intdataTypestatic intDT_COLORstatic intDT_PATHstatic intDT_REALprivate java.awt.ColorfromColorprivate java.awt.geom.GeneralPathfromPathprivate doublefromValuestatic java.lang.StringTAG_NAMEprivate java.awt.ColortoColorprivate java.awt.geom.GeneralPathtoPathprivate doubletoValueprivate double[]valuesValue-
Fields inherited from class com.kitfox.svg.animation.AnimationElement
AC_REPLACE, AC_SUM, AD_REPLACE, AD_SUM, AT_AUTO, AT_CSS, AT_XML, attribName, attribType, FT_AUTO, FT_DEFAULT, FT_FREEZE, FT_HOLD, FT_REMOVE, FT_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 Animate()Creates a new instance of Animate
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doubleeval(double interp)Evaluates this animation element for the passed interpolation time.java.awt.ColorevalColor(double interp)java.awt.geom.GeneralPathevalPath(double interp)doublegetByValue()intgetDataType()java.awt.ColorgetFromColor()java.awt.geom.GeneralPathgetFromPath()doublegetFromValue()java.lang.StringgetTagName()java.awt.ColorgetToColor()java.awt.geom.GeneralPathgetToPath()doublegetToValue()double[]getValuesValue()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 loadedprotected voidrebuild(AnimTimeParser animTimeParser)doublerepeatSkipSize(int reps)If this element is being accumulated, detemine the delta to accumulate byvoidsetByValue(double byValue)voidsetFromColor(java.awt.Color fromColor)voidsetFromPath(java.awt.geom.GeneralPath fromPath)voidsetFromValue(double fromValue)voidsetToColor(java.awt.Color toColor)voidsetToPath(java.awt.geom.GeneralPath toPath)voidsetToValue(double toValue)voidsetValuesValue(double[] valuesValue)-
Methods inherited from class com.kitfox.svg.animation.AnimateBase
evalParametric, getRepeatCount, getRepeatDur, setRepeatCount, setRepeatDur
-
Methods inherited from class com.kitfox.svg.animation.AnimationElement
animationElementToString, evalDurTime, evalEndTime, evalParametric, evalStartTime, getAccumulateType, getAdditiveType, getAttribName, getAttribType, getBeginTime, getDurTime, getEndTime, getFillType, hasEndTime, rebuild, setAccumulateType, setAdditiveType, setBeginTime, setDurTime, setEndTime, setFillType, updateTime
-
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, getXMLBase, hasAttribute, indexOfChild, lerp, loaderAddChild, loaderAddText, loaderEndElement, nextFloat, parsePathList, parseSingleTransform, parseTransform, popParentContext, pushParentContext, removeAttribute, removeChild, setAttribute, setDiagram, swapChildren
-
-
-
-
Field Detail
-
TAG_NAME
public static final java.lang.String TAG_NAME
- See Also:
- Constant Field Values
-
DT_REAL
public static final int DT_REAL
- See Also:
- Constant Field Values
-
DT_COLOR
public static final int DT_COLOR
- See Also:
- Constant Field Values
-
DT_PATH
public static final int DT_PATH
- See Also:
- Constant Field Values
-
dataType
int dataType
-
fromValue
private double fromValue
-
toValue
private double toValue
-
byValue
private double byValue
-
valuesValue
private double[] valuesValue
-
fromColor
private java.awt.Color fromColor
-
toColor
private java.awt.Color toColor
-
fromPath
private java.awt.geom.GeneralPath fromPath
-
toPath
private java.awt.geom.GeneralPath toPath
-
-
Method Detail
-
getTagName
public java.lang.String getTagName()
- Specified by:
getTagNamein classSVGElement
-
getDataType
public int getDataType()
-
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 classAnimateBase- 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
-
eval
public double eval(double interp)
Evaluates this animation element for the passed interpolation time. Interp must be on [0..1].
-
evalColor
public java.awt.Color evalColor(double interp)
- Specified by:
evalColorin interfaceAnimateColorIface
-
evalPath
public java.awt.geom.GeneralPath evalPath(double interp)
-
repeatSkipSize
public double repeatSkipSize(int reps)
If this element is being accumulated, detemine the delta to accumulate by
-
rebuild
protected void rebuild(AnimTimeParser animTimeParser) throws SVGException
- Overrides:
rebuildin classAnimateBase- Throws:
SVGException
-
getFromValue
public double getFromValue()
- Returns:
- the fromValue
-
setFromValue
public void setFromValue(double fromValue)
- Parameters:
fromValue- the fromValue to set
-
getToValue
public double getToValue()
- Returns:
- the toValue
-
setToValue
public void setToValue(double toValue)
- Parameters:
toValue- the toValue to set
-
getByValue
public double getByValue()
- Returns:
- the byValue
-
setByValue
public void setByValue(double byValue)
- Parameters:
byValue- the byValue to set
-
getValuesValue
public double[] getValuesValue()
- Returns:
- the valuesValue
-
setValuesValue
public void setValuesValue(double[] valuesValue)
- Parameters:
valuesValue- the valuesValue to set
-
getFromColor
public java.awt.Color getFromColor()
- Returns:
- the fromColor
-
setFromColor
public void setFromColor(java.awt.Color fromColor)
- Parameters:
fromColor- the fromColor to set
-
getToColor
public java.awt.Color getToColor()
- Returns:
- the toColor
-
setToColor
public void setToColor(java.awt.Color toColor)
- Parameters:
toColor- the toColor to set
-
getFromPath
public java.awt.geom.GeneralPath getFromPath()
- Returns:
- the fromPath
-
setFromPath
public void setFromPath(java.awt.geom.GeneralPath fromPath)
- Parameters:
fromPath- the fromPath to set
-
getToPath
public java.awt.geom.GeneralPath getToPath()
- Returns:
- the toPath
-
setToPath
public void setToPath(java.awt.geom.GeneralPath toPath)
- Parameters:
toPath- the toPath to set
-
-