public interface GLAnimatorControl extends FPSCounter
GLAutoDrawable
animation.Modifier and Type | Interface and Description |
---|---|
static interface |
GLAnimatorControl.UncaughtExceptionHandler
A
registered
GLAnimatorControl.UncaughtExceptionHandler instance is invoked when an animator abruptly stops
due to an uncaught exception from one of its GLAutoDrawable s. |
DEFAULT_FRAMES_PER_INTERVAL
Modifier and Type | Method and Description |
---|---|
void |
add(GLAutoDrawable drawable)
Adds a drawable to this animator's list of rendering drawables.
|
Thread |
getThread() |
GLAnimatorControl.UncaughtExceptionHandler |
getUncaughtExceptionHandler()
Returns the
GLAnimatorControl.UncaughtExceptionHandler invoked when this animator abruptly stops
due to an uncaught exception from one of its GLAutoDrawable s. |
boolean |
isAnimating()
Indicates whether this animator
is started and is not paused . |
boolean |
isPaused()
Indicates whether this animator
is started
and either manually paused or paused
automatically due to no added GLAutoDrawable s. |
boolean |
isStarted()
Indicates whether this animator has been
started . |
boolean |
pause()
Pauses this animator.
|
void |
remove(GLAutoDrawable drawable)
Removes a drawable from the animator's list of rendering drawables.
|
boolean |
resume()
Resumes animation if paused.
|
void |
setUncaughtExceptionHandler(GLAnimatorControl.UncaughtExceptionHandler handler)
Set the handler invoked when this
animator abruptly stops
due to an uncaught exception from one of its GLAutoDrawable s. |
boolean |
start()
Starts this animator, if not running.
|
boolean |
stop()
Stops this animator.
|
getFPSStartTime, getLastFPS, getLastFPSPeriod, getLastFPSUpdateTime, getTotalFPS, getTotalFPSDuration, getTotalFPSFrames, getUpdateFPSFrames, resetFPSCounter, setUpdateFPSFrames
boolean isStarted()
started
.start()
,
stop()
,
isPaused()
,
pause()
,
resume()
boolean isAnimating()
is started
and is not paused
.boolean isPaused()
is started
and either manually paused
or paused
automatically due to no added
GLAutoDrawable
s.Thread getThread()
boolean start()
In most situations this method blocks until completion, except when called from the animation thread itself or in some cases from an implementation-internal thread like the AWT event queue thread.
Note that an animator w/o added drawables
will be paused automatically.
If started, all counters (time, frames, ..) are reset to zero.
stop()
,
isAnimating()
,
isPaused()
,
getThread()
boolean stop()
In most situations this method blocks until completion, except when called from the animation thread itself or in some cases from an implementation-internal thread like the AWT event queue thread.
start()
,
isAnimating()
,
getThread()
boolean pause()
In most situations this method blocks until completion, except when called from the animation thread itself or in some cases from an implementation-internal thread like the AWT event queue thread.
resume()
,
isAnimating()
boolean resume()
In most situations this method blocks until completion, except when called from the animation thread itself or in some cases from an implementation-internal thread like the AWT event queue thread.
If resumed, all counters (time, frames, ..) are reset to zero.
pause()
,
isAnimating()
void add(GLAutoDrawable drawable)
This allows the animator thread to become animating
,
in case the first drawable is added and the animator is started
.
drawable
- the drawable to be addedIllegalArgumentException
- if drawable was already added to this animatorvoid remove(GLAutoDrawable drawable)
This method should get called in case a drawable becomes invalid, and will not be recovered.
This allows the animator thread to become not animating
,
in case the last drawable has been removed.
drawable
- the drawable to be removedIllegalArgumentException
- if drawable was not added to this animatorGLAnimatorControl.UncaughtExceptionHandler getUncaughtExceptionHandler()
GLAnimatorControl.UncaughtExceptionHandler
invoked when this animator
abruptly stops
due to an uncaught exception from one of its GLAutoDrawable
s.
Default is null
.
void setUncaughtExceptionHandler(GLAnimatorControl.UncaughtExceptionHandler handler)
animator
abruptly stops
due to an uncaught exception from one of its GLAutoDrawable
s.handler
- the GLAnimatorControl.UncaughtExceptionHandler
to use as this animator
's uncaught exception
handler. Pass null
to unset the handler.GLAnimatorControl.UncaughtExceptionHandler.uncaughtException(GLAnimatorControl, GLAutoDrawable, Throwable)
Copyright 2010 JogAmp Community.