Search this API

y.anim
Interface AnimationObject

All Known Subinterfaces:
CompositeAnimationObject
All Known Implementing Classes:
LayoutMorpher

public interface AnimationObject

A general interface for objects that perform a sequence of animation steps. Animation objects are executed by an animation player.

See Also:
AnimationPlayer
 

Method Summary
 void calcFrame(double time)
          Calculates the animation frame for the specified point in time.
 void disposeAnimation()
          Disposes the animation object.
 void initAnimation()
          Initializes the animation object.
 long preferredDuration()
          Returns the preferred animation length in milliseconds that the display of all provided animation frames should last.
 

Method Detail

initAnimation

void initAnimation()
Initializes the animation object. This method should be called prior to calling calcFrame.


calcFrame

void calcFrame(double time)
Calculates the animation frame for the specified point in time. The valid time interval for animations is always [0.0, 1.0].

Parameters:
time - a point in [0.0, 1.0]

disposeAnimation

void disposeAnimation()
Disposes the animation object. This method is invoked by an animation player after the last invocation of calcFrame was performed or AnimationPlayer.stop() has been invoked.


preferredDuration

long preferredDuration()
Returns the preferred animation length in milliseconds that the display of all provided animation frames should last.

NOTE:
The preferred duration of an animation has to be greater than 0!

Returns:
the preferred duration, which has to be greater than 0

© Copyright 2000-2022,
yWorks GmbH.
All rights reserved.