From 20dd60820257af9aef8ff3eeab1c03736252e284 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 25 Nov 2010 03:02:26 +0100 Subject: Relax GLAnimatorControl, ie remove fail fast for start()/stop(), return (boolean)success instead. --- .../classes/javax/media/opengl/GLAnimatorControl.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/jogl/classes/javax/media') diff --git a/src/jogl/classes/javax/media/opengl/GLAnimatorControl.java b/src/jogl/classes/javax/media/opengl/GLAnimatorControl.java index 0282b3ad0..2c8c7cca3 100644 --- a/src/jogl/classes/javax/media/opengl/GLAnimatorControl.java +++ b/src/jogl/classes/javax/media/opengl/GLAnimatorControl.java @@ -31,10 +31,6 @@ package javax.media.opengl; /** * An animator control interface, * which implementation may drive a {@link javax.media.opengl.GLAutoDrawable} animation. - *

- * Note that the methods {@link #start()} and {@link #stop()} - * shall be implemented fail-fast, ie {@link #start()} fails if not started, etc. - * This way an implementation can find implementation errors faster. */ public interface GLAnimatorControl { @@ -127,12 +123,14 @@ public interface GLAnimatorControl { *

* If started, all counters (time, frames, ..) are reset to zero. * + * @return true is started due to this call, + * otherwise false, ie started already or unable to start. + * * @see #stop() * @see #isAnimating() * @see #getThread() - * @throws GLException if started already */ - void start(); + boolean start(); /** * Stops this animator. @@ -142,12 +140,14 @@ public interface GLAnimatorControl { * or in some cases from an implementation-internal thread like the * AWT event queue thread. * + * @return true is stopped due to this call, + * otherwise false, ie not started or unable to stop. + * * @see #start() * @see #isAnimating() * @see #getThread() - * @throws GLException if not started */ - void stop(); + boolean stop(); /** * Pauses this animator. -- cgit v1.2.3