|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jogamp.opengl.util.AnimatorBase
public abstract class AnimatorBase
Base implementation of GLAnimatorControl
The change synchronization is done via synchronized blocks on the AnimatorBase instance.
Status get / set activity is synced with a RecursiveLock, used as a memory barrier.
This is suitable, since all change requests are allowed to be expensive
as they are not expected to be called at every frame.
Nested Class Summary | |
---|---|
static interface |
AnimatorBase.AnimatorImpl
|
Constructor Summary | |
---|---|
AnimatorBase()
Creates a new, empty Animator. |
Method Summary | |
---|---|
void |
add(GLAutoDrawable drawable)
|
long |
getCurrentTime()
|
long |
getDuration()
|
long |
getStartTime()
|
Thread |
getThread()
|
int |
getTotalFrames()
|
void |
remove(GLAutoDrawable drawable)
Removes a drawable from the animator's list of rendering drawables. This method should get called in case a drawable becomes invalid, and will not be recovered. This allows the animator thread to become idle in case the last drawable has reached it's end of life. |
void |
resetCounter()
Reset all performance counter (startTime, currentTime, frame number) |
void |
setIgnoreExceptions(boolean ignoreExceptions)
Sets a flag causing this Animator to ignore exceptions produced while redrawing the drawables. |
void |
setPrintExceptions(boolean printExceptions)
Sets a flag indicating that when exceptions are being ignored by this Animator (see setIgnoreExceptions(boolean) ), to print the
exceptions' stack traces for diagnostic information. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface javax.media.opengl.GLAnimatorControl |
---|
isAnimating, isPaused, isStarted, pause, resume, start, stop |
Constructor Detail |
---|
public AnimatorBase()
Method Detail |
---|
public void add(GLAutoDrawable drawable)
public void remove(GLAutoDrawable drawable)
GLAnimatorControl
remove
in interface GLAnimatorControl
drawable
- the to be removed drawablepublic long getCurrentTime()
getCurrentTime
in interface GLAnimatorControl
GLAnimatorControl.start()
,
GLAnimatorControl.resume()
public long getDuration()
getDuration
in interface GLAnimatorControl
getCurrentTime() - getStartTime()
.GLAnimatorControl.getStartTime()
,
GLAnimatorControl.getCurrentTime()
public long getStartTime()
getStartTime
in interface GLAnimatorControl
GLAnimatorControl.start()
,
GLAnimatorControl.resume()
public int getTotalFrames()
getTotalFrames
in interface GLAnimatorControl
getStartTime()
.
This value is reset if started or resumed.GLAnimatorControl.start()
,
GLAnimatorControl.resume()
public final Thread getThread()
getThread
in interface GLAnimatorControl
GLAnimatorControl.start()
,
GLAnimatorControl.stop()
public void resetCounter()
GLAnimatorControl
resetCounter
in interface GLAnimatorControl
public void setIgnoreExceptions(boolean ignoreExceptions)
public void setPrintExceptions(boolean printExceptions)
setIgnoreExceptions(boolean)
), to print the
exceptions' stack traces for diagnostic information. Defaults to
false.
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |