com.miginfocom.ashape.animation.animations
Interface Animation

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
AbsRectAnimation, AbstractAnimation, AtValueAnimation, BasicStrokeAnimation, ColorAnimation, ImageAnimation, NumberAnimation, ShapeGradientPaintAnimation, TexturePaintAnimation

public interface Animation
extends java.io.Serializable

An Animation is a transition from one Object to another Object. That transition is indexed by a float value from 0.0 to 1.0 where 0.0 represents the start of the transition and 1.0 the end.


Method Summary
 int getFrameCount()
          Returns the optimum frame count.
 java.lang.Object getObject(float f)
          Returns an object that represents the animation at point f.
 

Method Detail

getObject

java.lang.Object getObject(float f)
Returns an object that represents the animation at point f. f should be normally be within 0.0f and 1.0f (inclusive).

Parameters:
f - 0.0f to 1.0f. 0.0f is the first "frame" and 1.0f is the last.
Returns:
An object that represents the animation at point f. Object should be treated as read-only unless specified othervise by sub classes.

getFrameCount

int getFrameCount()
Returns the optimum frame count. If the animation is "analog", so to say, return Integer.MAX_VALUE. This max value must be handeled by subclasses so they can't just allocate an array of this size.
Integer.MAX_VALUE should always defer any caching of the objects for instance.

Returns:
The optimum frame count. Integer.MAX_VALUE == unlimited.


Copyright © 2009 MiG InfoCom AB. All Rights Reserved.