@Override public void windowClosing(WindowEvent e) { fpsAnimator.stop(); } @Override
@Override public void windowClosing(WindowEvent e) { fpsAnimator.stop(); }
public void stop() { animator.stop(); }
public void run() { animator.stop(); mainFrame.dispose(); } }).start();
public boolean stopThread() { if (drawExceptionHandler != null) { drawExceptionHandler.interrupt(); drawExceptionHandler = null; } if (animator != null) { return animator.stop(); } else { return false; } }
@Override public void windowClosing(WindowEvent e){ System.out.println("WindowClosing..."); gameplayTimer.cancel(); animator.stop(); //System.out.println("glExecutorThread.join()..."); //System.out.println("ThreadManager: WindowClosing Done."); } });
/** * Called back before the OpenGL context is d */ @Override public void dispose(GLAutoDrawable drawable) { if(animator!=null) { animator.stop(); } drawable.removeGLEventListener(this); }
@Override public void dispose(JOGLCanvas3D canvas) { if(animator!=null) { animator.stop(); try { animator.remove(canvas); } catch(Exception ex) { // if it fails, we already removed it } } canvas.removeGLEventListener(this); }
public void stop() { mAnimator.setIgnoreExceptions(true); mAnimator.pause(); mAnimator.stop(); while (mAnimator.isAnimating()) Thread.yield(); }
@Override public void close() throws GLException { try { try { runOnEDT(false, () -> { mAnimator.stop(); }); } catch (final Throwable e) { System.err.println(e.getLocalizedMessage()); } try { setVisible(false); } catch (final Throwable e) { System.err.println(e.getLocalizedMessage()); } if (mGlWindow.isRealized()) runOnEDT(false, () -> { try { mGlWindow.destroy(); } catch (Throwable e) { } }); } catch (final Throwable e) { System.err.println(e.getLocalizedMessage()); } }
@Override public void windowClosing( WindowEvent e ) { animator.stop( ); leftPanel.disposeAttached( ); rightPanel.disposeAttached( ); leftPanel.destroy( ); rightPanel.destroy( ); } };
public void run() { if (animator.isStarted()) animator.stop(); // stop the animator loop System.exit(0);
public void setFrameRate(float fps) { if (fps < 1) { PGraphics.showWarning( "The OpenGL renderer cannot have a frame rate lower than 1.\n" + "Your sketch will run at 1 frame per second."); fps = 1; } else if (fps > 1000) { PGraphics.showWarning( "The OpenGL renderer cannot have a frame rate higher than 1000.\n" + "Your sketch will run at 1000 frames per second."); fps = 1000; } if (animator != null) { animator.stop(); animator.setFPS((int)fps); pgl.setFps(fps); animator.start(); } }
animator.stop();