Class Cycle

  extended by org.jdesktop.animation.timing.Cycle

public class Cycle
extends java.lang.Object

This class defines the duration and resolution of a single timing cycle. It is used, in conjunction with Envelope as an input into the construction of a TimingController object.

Constructor Summary
Cycle(int duration, int resolution)
          Constructs the Cycle object for use in creating a TimingController object.
Method Summary
 int getDuration()
 int getResolution()
 void setDuration(int duration)
 void setResolution(int resolution)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public Cycle(int duration,
             int resolution)
Constructs the Cycle object for use in creating a TimingController object.

duration - number of milliseconds that the cycle should last. This can be any positive integer value or TimingController.INFINITE to represent an unending cycle.
resolution - number of milliseconds between calls to TimingController.timingEvent(). This will help determine the achievable frame rate of the cycle, as the ensuing timingEvent calls will happen at a frequency determined by this resolution value.
java.lang.IllegalArgumentException - if any parameters have invalid values
See Also:
TimingController, TimingController.INFINITE, TimingController.timingEvent(long, long, float)
Method Detail


public int getResolution()


public void setResolution(int resolution)


public int getDuration()


public void setDuration(int duration)