|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface GLAnimatorControl
An animator control interface,
which implementation may drive a GLAutoDrawable
animation.
Note that the methods start()
, stop()
, pause()
and resume()
shall be implemented to fail-fast, ie start()
fails if not started, etc.
This way an implementation can find implementation errors faster.
Method Summary | |
---|---|
long |
getCurrentTime()
|
long |
getDuration()
|
long |
getStartTime()
|
Thread |
getThread()
|
int |
getTotalFrames()
|
boolean |
isAnimating()
Indicates whether this animator is currently running and not paused. |
boolean |
isPaused()
Indicates whether this animator is currently running and paused. |
boolean |
isStarted()
Indicates whether this animator is currently running, ie started. |
void |
pause()
Pauses this animator. |
void |
resetCounter()
Reset all performance counter (startTime, currentTime, frame number) |
void |
resume()
Resumes animation if paused. |
void |
start()
Starts this animator, if not running. |
void |
stop()
Stops this animator. |
Method Detail |
---|
long getStartTime()
start()
,
resume()
long getCurrentTime()
start()
,
resume()
long getDuration()
getCurrentTime() - getStartTime()
.getStartTime()
,
getCurrentTime()
int getTotalFrames()
getStartTime()
.
This value is reset if started or resumed.start()
,
resume()
void resetCounter()
boolean isStarted()
start()
,
stop()
,
pause()
,
resume()
boolean isAnimating()
start()
,
stop()
,
pause()
,
resume()
boolean isPaused()
start()
,
stop()
,
pause()
,
resume()
Thread getThread()
start()
,
stop()
void 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.
If started, all counters (time, frames, ..) are reset to zero.
GLException
- if started alreadystop()
,
isAnimating()
,
getThread()
void 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.
GLException
- if not startedstart()
,
isAnimating()
,
getThread()
void 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.
GLException
- if not started or not animating or already pausedresume()
,
isAnimating()
void 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.
GLException
- if not started or not pausedpause()
,
isAnimating()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |