|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.opengl.util.Animator
An Animator can be attached to one or more GLAutoDrawable
s to drive their display() methods in a loop.
The Animator class creates a background thread in which the
calls to display()
are performed. After each drawable
has been redrawn, a brief pause is performed to avoid swamping the
CPU, unless setRunAsFastAsPossible(boolean)
has been called.
Field Summary | |
protected boolean |
ignoreExceptions
|
protected boolean |
printExceptions
|
Constructor Summary | |
Animator()
Creates a new, empty Animator. |
|
Animator(GLAutoDrawable drawable)
Creates a new Animator for a particular drawable. |
Method Summary | |
void |
add(GLAutoDrawable drawable)
Adds a drawable to the list managed by this Animator. |
protected void |
display()
Called every frame to cause redrawing of all of the GLAutoDrawables this Animator manages. |
Iterator |
drawableIterator()
Returns an iterator over the drawables managed by this Animator. |
boolean |
isAnimating()
Indicates whether this animator is currently running. |
void |
remove(GLAutoDrawable drawable)
Removes a drawable from the list managed by this Animator. |
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. |
void |
setRunAsFastAsPossible(boolean runFast)
Sets a flag in this Animator indicating that it is to run as fast as possible. |
void |
start()
Starts this animator. |
void |
stop()
Stops this animator. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected boolean ignoreExceptions
protected boolean printExceptions
Constructor Detail |
public Animator()
public Animator(GLAutoDrawable drawable)
Method Detail |
public void add(GLAutoDrawable drawable)
public void remove(GLAutoDrawable drawable)
public Iterator drawableIterator()
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 final void setRunAsFastAsPossible(boolean runFast)
protected void display()
public void start()
public boolean isAnimating()
public void stop()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |