com.jogamp.opengl.util
Class AnimatorBase

java.lang.Object
  extended by com.jogamp.opengl.util.AnimatorBase
All Implemented Interfaces:
GLAnimatorControl
Direct Known Subclasses:
Animator, FPSAnimator

public abstract class AnimatorBase
extends Object
implements GLAnimatorControl

Base implementation of GLAnimatorControl


Nested Class Summary
static interface AnimatorBase.AnimatorImpl
           
 
Constructor Summary
AnimatorBase()
          Creates a new, empty Animator.
 
Method Summary
 List acquireDrawables()
           
 void add(GLAutoDrawable drawable)
           
 long getCurrentTime()
           
 long getDuration()
           
 long getStartTime()
           
 Thread getThread()
           
 int getTotalFrames()
           
 void releaseDrawables()
           
 void remove(GLAutoDrawable drawable)
           
 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

AnimatorBase

public AnimatorBase()
Creates a new, empty Animator.

Method Detail

add

public void add(GLAutoDrawable drawable)

remove

public void remove(GLAutoDrawable drawable)

acquireDrawables

public List acquireDrawables()

releaseDrawables

public void releaseDrawables()

getCurrentTime

public long getCurrentTime()
Specified by:
getCurrentTime in interface GLAnimatorControl
Returns:
Time of the last display call in milliseconds. This value is reset if started or resumed.
See Also:
GLAnimatorControl.start(), GLAnimatorControl.resume()

getDuration

public long getDuration()
Specified by:
getDuration in interface GLAnimatorControl
Returns:
Duration getCurrentTime() - getStartTime().
See Also:
GLAnimatorControl.getStartTime(), GLAnimatorControl.getCurrentTime()

getStartTime

public long getStartTime()
Specified by:
getStartTime in interface GLAnimatorControl
Returns:
Time of the first display call in milliseconds. This value is reset if started or resumed.
See Also:
GLAnimatorControl.start(), GLAnimatorControl.resume()

getTotalFrames

public int getTotalFrames()
Specified by:
getTotalFrames in interface GLAnimatorControl
Returns:
Number of frame cycles displayed since the first display call, ie getStartTime(). This value is reset if started or resumed.
See Also:
GLAnimatorControl.start(), GLAnimatorControl.resume()

resetCounter

public void resetCounter()
Description copied from interface: GLAnimatorControl
Reset all performance counter (startTime, currentTime, frame number)

Specified by:
resetCounter in interface GLAnimatorControl

getThread

public final Thread getThread()
Specified by:
getThread in interface GLAnimatorControl
Returns:
The animation thread if started, ie running.
See Also:
GLAnimatorControl.start(), GLAnimatorControl.stop()

setIgnoreExceptions

public void setIgnoreExceptions(boolean ignoreExceptions)
Sets a flag causing this Animator to ignore exceptions produced while redrawing the drawables. By default this flag is set to false, causing any exception thrown to halt the Animator.


setPrintExceptions

public 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. Defaults to false.


toString

public String toString()
Overrides:
toString in class Object


Copyright 2010 JogAmp Community.