@Override public boolean eval() { // end waiting if stopped as well return isStarted() && ( !drawablesEmpty && !isAnimating2 || drawablesEmpty && !pauseIssued2 ) ; } }; }
@Override public boolean eval() { // end waiting if stopped as well return isStarted() && ( !drawablesEmpty && !isAnimating || drawablesEmpty && !pauseIssued ) ; } }; }
@Override public boolean eval() { // end waiting if stopped as well return isStarted() && isAnimating2; } };
@Override public boolean eval() { // end waiting if stopped as well return isStarted() && ( !drawablesEmpty && !isAnimating || drawablesEmpty && !pauseIssued ) ; } }; }
@Override public boolean eval() { // end waiting if stopped as well return isStarted() && isAnimating; } };
@Override public boolean eval() { // end waiting if stopped as well return isStarted() && isAnimating; } };
@Override public boolean eval() { return !isStarted() || (!drawablesEmpty && !isAnimating2) ; } };
@Override public boolean eval() { return !isStarted() || (!drawablesEmpty && !isAnimating) ; } };
@Override public final synchronized boolean stop() { if ( !isStarted() ) { return false; } stopIssued = true; return finishLifecycleAction(waitForStoppedCondition, 0); } private final Condition waitForStoppedCondition = new Condition() {
/** * Set a {@link ThreadGroup} for the {@link #getThread() animation thread}. * * @param tg the {@link ThreadGroup} * @throws GLException if the animator has already been started */ public final synchronized void setThreadGroup(final ThreadGroup tg) throws GLException { if ( isStarted() ) { throw new GLException("Animator already started."); } threadGroup2 = tg; }
@Override public final synchronized boolean pause() { if ( !isStarted() || pauseIssued2 ) { return false; } pauseIssued2 = true; return finishLifecycleAction(waitForPausedCondition, 0); } private final Condition waitForPausedCondition = new Condition() {
@Override public final synchronized boolean pause() { if ( !isStarted() || pauseIssued ) { return false; } pauseIssued = true; return finishLifecycleAction(waitForPausedCondition, 0); } private final Condition waitForPausedCondition = new Condition() {
@Override public final synchronized boolean stop() { if ( !isStarted() ) { return false; } stopIssued2 = true; return finishLifecycleAction(waitForStoppedCondition, 0); } private final Condition waitForStoppedCondition = new Condition() {
/** * Set a {@link ThreadGroup} for the {@link #getThread() animation thread}. * * @param tg the {@link ThreadGroup} * @throws GLException if the animator has already been started */ public final synchronized void setThreadGroup(final ThreadGroup tg) throws GLException { if ( isStarted() ) { throw new GLException("Animator already started."); } threadGroup = tg; }
@Override public final synchronized boolean pause() { if ( !isStarted() || pauseIssued ) { return false; } pauseIssued = true; return finishLifecycleAction(waitForPausedCondition, 0); } private final Condition waitForPausedCondition = new Condition() {
@Override public final synchronized boolean resume() { if ( !isStarted() || !pauseIssued2 ) { return false; } pauseIssued2 = false; return finishLifecycleAction(waitForResumeCondition, 0); } private final Condition waitForResumeCondition = new Condition() {
@Override public final synchronized boolean stop() { if ( !isStarted() ) { return false; } stopIssued = true; return finishLifecycleAction(waitForStoppedCondition, 0); } private final Condition waitForStoppedCondition = new Condition() {
@Override public final synchronized boolean resume() { if ( !isStarted() || !pauseIssued ) { return false; } pauseIssued = false; return finishLifecycleAction(waitForResumeCondition, 0); } private final Condition waitForResumeCondition = new Condition() {
/** * Set a {@link ThreadGroup} for the {@link #getThread() animation thread}. * * @param tg the {@link ThreadGroup} * @throws GLException if the animator has already been started */ public final synchronized void setThreadGroup(final ThreadGroup tg) throws GLException { if ( isStarted() ) { throw new GLException("Animator already started."); } threadGroup = tg; }
@Override public final synchronized boolean resume() { if ( !isStarted() || !pauseIssued ) { return false; } pauseIssued = false; return finishLifecycleAction(waitForResumeCondition, 0); } private final Condition waitForResumeCondition = new Condition() {