org.jdesktop.animation.timing
Class Cycle
java.lang.Object
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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Cycle
public Cycle(int duration,
int resolution)
- Constructs the Cycle object for use in creating a
TimingController object.
- Parameters:
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.
- Throws:
java.lang.IllegalArgumentException - if any parameters have invalid
values- See Also:
TimingController,
TimingController.INFINITE,
TimingController.timingEvent(long, long, float)
getResolution
public int getResolution()
setResolution
public void setResolution(int resolution)
getDuration
public int getDuration()
setDuration
public void setDuration(int duration)