y.anim
Interface AnimationObject

All Known Implementing Classes:
AnimationCommand

public interface AnimationObject

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


Method Summary
 void calcNextFrame(int cursor, int delta)
          Calculates the next animation frame.
 void disposeAnimation()
          Disposes the animation object.
 int getAnimationLength()
          Returns the number of animation frames this object will provide.
 AnimationListener getAnimationListener()
          Returns the animation listener relevant for the displayed results of the animation object.
 long getPreferredDuration()
          Returns the preferred animation length in milliseconds that the display of all provided animation frames should last.
 void initAnimation()
          Initializes the animatiopn object.
 

Method Detail

getAnimationLength

public int getAnimationLength()
Returns the number of animation frames this object will provide.


initAnimation

public void initAnimation()
Initializes the animatiopn object. This method should be called prior to calling calcNextFrame.


calcNextFrame

public void calcNextFrame(int cursor,
                          int delta)
Calculates the next animation frame. The cursor parameter holds the absolute frame number for which a calculation is requested. The delta parameter holds the relative change of the frame cursor in relation to the formerly requested frame calculation.


disposeAnimation

public void disposeAnimation()
Disposes the animation object. This method is invoked by an animation player after the last invokation of calcNextFrame was performed.


getAnimationListener

public AnimationListener getAnimationListener()
Returns the animation listener relevant for the displayed results of the animation object.


getPreferredDuration

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


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

2003