The Animator execution thread does not run as a daemon thread,
so it is able to keep an application from terminating.
Call stop() to terminate the animation and it's execution thread.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv class |
| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private boolean | |
| private volatile boolean | |
| private final boolean | |
| private volatile boolean | |
| private FPSAnimator. | |
| private Timer | |
| pack-priv static int | |
| private final AnimatorBase. | |
| private final AnimatorBase. | |
| private final AnimatorBase. | |
| private final AnimatorBase. | |
| private final AnimatorBase. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | FPSAnimator(final int fps, final boolean scheduleAtFixedRate)
Creates an FPSAnimator with a given target frames-per-second value and a flag indicating whether to use fixed-rate scheduling. |
| public | FPSAnimator(final GLAutoDrawable drawable, final int fps)
Creates an FPSAnimator with a given target frames-per-second value and an initial drawable to animate. |
| public | FPSAnimator(final GLAutoDrawable drawable, final int fps, final boolean scheduleAtFixedRate)
Creates an FPSAnimator with a given target frames-per-second value, an initial drawable to animate, and a flag indicating whether to use fixed-rate scheduling. |
| Modifier and Type | Method and Description |
|---|---|
| protected String | getBaseName(final String prefix)
Implements abstract com. |
| public final int | |
| public final synchronized boolean | isAnimating()
Implements com. is started and is not paused.
|
| private final boolean | |
| public final synchronized boolean | isPaused()
Implements com. is started
and either manually paused or paused
automatically due to no added GLAutoDrawables.
|
| public final synchronized boolean | |
| public final synchronized boolean | |
| public final void | |
| public final synchronized boolean | |
| public final synchronized boolean |
| fps | back to summary |
|---|---|
| private int fps | |
| isAnimating | back to summary |
|---|---|
| private boolean isAnimating | |
| pauseIssued | back to summary |
|---|---|
| private volatile boolean pauseIssued | |
| scheduleAtFixedRate | back to summary |
|---|---|
| private final boolean scheduleAtFixedRate | |
| stopIssued | back to summary |
|---|---|
| private volatile boolean stopIssued | |
| task | back to summary |
|---|---|
| private FPSAnimator. | |
| timer | back to summary |
|---|---|
| private Timer timer | |
| timerNo | back to summary |
|---|---|
| pack-priv static int timerNo | |
| waitForPausedCondition | back to summary |
|---|---|
| private final AnimatorBase. | |
| waitForResumeCondition | back to summary |
|---|---|
| private final AnimatorBase. | |
| waitForStartedAddedCondition | back to summary |
|---|---|
| private final AnimatorBase. | |
| waitForStartedEmptyCondition | back to summary |
|---|---|
| private final AnimatorBase. | |
| waitForStoppedCondition | back to summary |
|---|---|
| private final AnimatorBase. | |
| FPSAnimator | back to summary |
|---|---|
| public FPSAnimator(final int fps) Creates an FPSAnimator with a given target frames-per-second
value. Equivalent to | |
| FPSAnimator | back to summary |
|---|---|
| public FPSAnimator(final int fps, final boolean scheduleAtFixedRate) Creates an FPSAnimator with a given target frames-per-second
value and a flag indicating whether to use fixed-rate
scheduling. Equivalent to | |
| FPSAnimator | back to summary |
|---|---|
| public FPSAnimator(final GLAutoDrawable drawable, final int fps) Creates an FPSAnimator with a given target frames-per-second
value and an initial drawable to animate. Equivalent to
| |
| FPSAnimator | back to summary |
|---|---|
| public FPSAnimator(final GLAutoDrawable drawable, final int fps, final boolean scheduleAtFixedRate) Creates an FPSAnimator with a given target frames-per-second value, an initial drawable to animate, and a flag indicating whether to use fixed-rate scheduling. | |
| getBaseName | back to summary |
|---|---|
| protected String getBaseName(final String prefix) Implements abstract com.
| |
| getFPS | back to summary |
|---|---|
| public final int getFPS() | |
| isAnimating | back to summary |
|---|---|
| public final synchronized boolean isAnimating() Implements com. Doc from com. Indicates whether this animator
| |
| isAnimatingImpl | back to summary |
|---|---|
| private final boolean isAnimatingImpl() | |
| isPaused | back to summary |
|---|---|
| public final synchronized boolean isPaused() Implements com. Doc from com. Indicates whether this animator
| |
| pause | back to summary |
|---|---|
| public final synchronized boolean pause() Implements com. Doc from com. Pauses this animator. 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 | back to summary |
|---|---|
| public final synchronized boolean resume() Implements com. Doc from com. Resumes animation if paused. 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.
| |
| setFPS | back to summary |
|---|---|
public final void setFPS(final int fps) throws GLException
| |
| start | back to summary |
|---|---|
| public final synchronized boolean start() Implements com. Doc from com. Starts this animator, if not running. 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 If started, all counters (time, frames, ..) are reset to zero.
| |
| stop | back to summary |
|---|---|
| public final synchronized boolean stop() Implements com. Stops this FPSAnimator. Due to the implementation of the FPSAnimator it is not guaranteed that the FPSAnimator will be completely stopped by the time this method returns.
| |
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private boolean | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| public void | run()
Implements abstract java. Implements java. |
| public void | |
| public final String |
| alreadyPaused | back to summary |
|---|---|
| private boolean alreadyPaused | |
| alreadyStopped | back to summary |
|---|---|
| private boolean alreadyStopped | |
| justStarted | back to summary |
|---|---|
| private boolean justStarted | |
| MainTask | back to summary |
|---|---|
| public MainTask() | |
| isActive | back to summary |
|---|---|
| public boolean isActive() | |
| run | back to summary |
|---|---|
| public void run() Implements abstract java. Implements java. Doc from java. The action to be performed by this timer task.
| |
| start | back to summary |
|---|---|
| public void start(final Timer timer) | |
| toString | back to summary |
|---|---|
| public final String toString() Overrides java. Doc from java. Returns a string representation of the object. | |