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 double
byValue
(package private) int
dataType
static int
DT_COLOR
static int
DT_PATH
static int
DT_REAL
private java.awt.Color
fromColor
private java.awt.geom.GeneralPath
fromPath
private double
fromValue
static java.lang.String
TAG_NAME
private java.awt.Color
toColor
private java.awt.geom.GeneralPath
toPath
private double
toValue
private 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 double
eval(double interp)
Evaluates this animation element for the passed interpolation time.java.awt.Color
evalColor(double interp)
java.awt.geom.GeneralPath
evalPath(double interp)
double
getByValue()
int
getDataType()
java.awt.Color
getFromColor()
java.awt.geom.GeneralPath
getFromPath()
double
getFromValue()
java.lang.String
getTagName()
java.awt.Color
getToColor()
java.awt.geom.GeneralPath
getToPath()
double
getToValue()
double[]
getValuesValue()
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 loadedprotected void
rebuild(AnimTimeParser animTimeParser)
double
repeatSkipSize(int reps)
If this element is being accumulated, detemine the delta to accumulate byvoid
setByValue(double byValue)
void
setFromColor(java.awt.Color fromColor)
void
setFromPath(java.awt.geom.GeneralPath fromPath)
void
setFromValue(double fromValue)
void
setToColor(java.awt.Color toColor)
void
setToPath(java.awt.geom.GeneralPath toPath)
void
setToValue(double toValue)
void
setValuesValue(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:
getTagName
in 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:SVGElement
Called during SAX load process to notify that this tag has begun the process of being loaded- Overrides:
loaderStartElement
in 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:
evalColor
in 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:
rebuild
in 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
-
-