edu.umd.cs.jazz.animation
Class ZNextFrameOnElapsedTime
java.lang.Object
|
+--edu.umd.cs.jazz.animation.ZNextFrameCondition
|
+--edu.umd.cs.jazz.animation.ZNextFrameOnElapsedTime
- All Implemented Interfaces:
- java.lang.Comparable
- public class ZNextFrameOnElapsedTime
- extends ZNextFrameCondition
ZNextFrameOnElapsedTime allows an animation to schedule its frame rate based on time. This condition is how an animation that wants to be animated every 500 milliseconds would communicate that request to the ZAnimationScheduler.
This class is used internally to support ZAnimation.animationRateByElapsedTime
, it should not normally be used directly.
- Author:
- Jesse Grosjean
Method Summary |
int |
compareTo(java.lang.Object o)
This is used to compare two frame conditions. |
boolean |
isReadyToAnimate()
Return true if this condition has been met, and the next frame of its associated animation is ready to animate. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ZNextFrameOnElapsedTime
public ZNextFrameOnElapsedTime(ZAlpha aAlpha,
long aTimeDurration)
isReadyToAnimate
public boolean isReadyToAnimate()
- Description copied from class:
ZNextFrameCondition
-
Return true if this condition has been met, and the next frame of its associated animation is ready to animate. This implementation asks the alpha object if it is started for the current time provided by the ZAnimationScheduler.
-
- Overrides:
isReadyToAnimate
in class ZNextFrameCondition
-
compareTo
public int compareTo(java.lang.Object o)
- Description copied from class:
ZNextFrameCondition
-
This is used to compare two frame conditions. The frame condition whos associated animation should be animated first is the greater of the two. The ZAlpha associated with each frame condition is used to determine this.
-
- Specified by:
compareTo
in interface java.lang.Comparable
- Overrides:
compareTo
in class ZNextFrameCondition
-
Copyright � 2003 by University of Maryland, College Park, MD 20742, USA All rights reserved.