de.frag.umlplugin.anim
Class MockAnimationObject

java.lang.Object
  extended by de.frag.umlplugin.anim.MockAnimationObject
All Implemented Interfaces:
AnimationObject

public class MockAnimationObject
extends java.lang.Object
implements AnimationObject

Mock for animation object tests.


Constructor Summary
MockAnimationObject(long preferredDuration)
           
 
Method Summary
 void calcFrame(double time)
          Calculates the animation frame for the specified point in time.
 void disposeAnimation()
          Disposes the animation object.
 long getMillis()
           
 double getTime()
           
 void initAnimation()
          Initializes the animation object.
 boolean isDisposed()
           
 boolean isInitialized()
           
 long preferredDuration()
          Returns the preferred animation length in milliseconds that the display of all provided animation frames should last.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockAnimationObject

public MockAnimationObject(long preferredDuration)
Method Detail

initAnimation

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

Specified by:
initAnimation in interface AnimationObject

calcFrame

public 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].

Specified by:
calcFrame in interface AnimationObject
Parameters:
time - a point in [0.0, 1.0]

disposeAnimation

public 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.

Specified by:
disposeAnimation in interface AnimationObject

preferredDuration

public 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!

Specified by:
preferredDuration in interface AnimationObject
Returns:
the preferred duration, which has to be greater than 0

isInitialized

public boolean isInitialized()

isDisposed

public boolean isDisposed()

getTime

public double getTime()

getMillis

public long getMillis()