com.sun.opengl.util
Class FPSAnimator
An Animator subclass which attempts to achieve a target
frames-per-second rate to avoid using all CPU time. The target FPS
is only an estimate and is not guaranteed.
FPSAnimator(int fps) - Creates an FPSAnimator with a given target frames-per-second
value.
|
FPSAnimator(int fps, boolean scheduleAtFixedRate) - Creates an FPSAnimator with a given target frames-per-second
value and a flag indicating whether to use fixed-rate
scheduling.
|
FPSAnimator(GLAutoDrawable drawable, int fps) - Creates an FPSAnimator with a given target frames-per-second
value and an initial drawable to animate.
|
FPSAnimator(GLAutoDrawable drawable, int fps, boolean scheduleAtFixedRate) - Creates an FPSAnimator with a given target frames-per-second
value, an initial drawable to animate, and a flag indicating
whether to use fixed-rate scheduling.
|
boolean | isAnimating() - Indicates whether this FPSAnimator is currently running.
|
void | start() - Starts this FPSAnimator.
|
void | stop() - Stops this FPSAnimator.
|
FPSAnimator
public FPSAnimator(int fps)
Creates an FPSAnimator with a given target frames-per-second
value. Equivalent to FPSAnimator(null, fps)
.
FPSAnimator
public FPSAnimator(int fps,
boolean scheduleAtFixedRate)
Creates an FPSAnimator with a given target frames-per-second
value and a flag indicating whether to use fixed-rate
scheduling. Equivalent to FPSAnimator(null, fps,
scheduleAtFixedRate)
.
FPSAnimator
public FPSAnimator(GLAutoDrawable drawable,
int fps)
Creates an FPSAnimator with a given target frames-per-second
value and an initial drawable to animate. Equivalent to
FPSAnimator(null, fps, false)
.
FPSAnimator
public FPSAnimator(GLAutoDrawable drawable,
int fps,
boolean scheduleAtFixedRate)
Creates an FPSAnimator with a given target frames-per-second
value, an initial drawable to animate, and a flag indicating
whether to use fixed-rate scheduling.
isAnimating
public boolean isAnimating()
Indicates whether this FPSAnimator is currently running. This
should only be used as a heuristic to applications because in
some circumstances the FPSAnimator may be in the process of
shutting down and this method will still return true.
- isAnimating in interface Animator
start
public void start()
Starts this FPSAnimator.
- start in interface Animator
stop
public void stop()
Stops this FPSAnimator. Due to the implementation of the
FPSAnimator it is not guaranteed that the FPSAnimator will be
completely stopped by the time this method returns.
- stop in interface Animator
Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.