edu.umd.cs.jazz.animation
Class ZNextFrameOnElapsedFrames

java.lang.Object
  |
  +--edu.umd.cs.jazz.animation.ZNextFrameCondition
        |
        +--edu.umd.cs.jazz.animation.ZNextFrameOnElapsedFrames
All Implemented Interfaces:
java.lang.Comparable

public class ZNextFrameOnElapsedFrames
extends ZNextFrameCondition

ZNextFrameOnElapsedFrames allows an animation to schedule its animation rate by frame count instead of by time. That condition is how an animation that wants to be animated on every third frame would communicate that request to the ZAnimationScheduler.

This class will is used internally to support ZAnimation.animationRateByElapsedFrames, you should not normally need to use it directly.

Author:
Jesse Grosjean

Constructor Summary
ZNextFrameOnElapsedFrames(ZAlpha aAlpha, long aFrameCount)
           
 
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
 

Constructor Detail

ZNextFrameOnElapsedFrames

public ZNextFrameOnElapsedFrames(ZAlpha aAlpha,
                                 long aFrameCount)
Method Detail

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.