public static class FrameSequencer.ConstantRate extends Object implements FrameSequencer
FrameSequencer.ConstantRate| Constructor and Description |
|---|
ConstantRate(double framesPerSecond,
boolean loop)
Creates a constant rate frame sequencer with the desired target frames per second.
|
| Modifier and Type | Method and Description |
|---|---|
void |
fastForward(long timeDelta)
Called if the display is paused for some length of time and then unpaused.
|
int |
init(MultiFrameImage source)
Called prior to the execution of an animation sequence (not necessarily immediately, so
time stamps should be obtained in the first call to tick).
|
int |
tick(long tickStamp)
Called every display frame, the frame sequencer should return the index of the animation
frame that should be displayed during this tick.
|
public ConstantRate(double framesPerSecond,
boolean loop)
framesPerSecond - the target frames per second.loop - if false, the sequencer will report the end of the animation after
progressing through all of the frames once, otherwise it will loop indefinitely.public int init(MultiFrameImage source)
FrameSequencerinit in interface FrameSequencersource - the multi-frame image that is providing the animation frames.public int tick(long tickStamp)
FrameSequencertick in interface FrameSequencerpublic void fastForward(long timeDelta)
FrameSequencerfastForward in interface FrameSequencerCopyright © 2015. All rights reserved.