/** * Invokes the simulation's start method and then starts the animation thread. Simulations should * not override this method. Override the start method to perform custom actions just before a * thread starts. * * @deprecated */ public void startAnimation() { if (showStepsPerDisplay) { stepsPerDisplay = control.getInt("steps per display"); } start(); startRunning(); super.startAnimation(); }
/** * Steps the simulation. * * <p>This method is final in order to insure that all AbsractSimulations invoke startRunning(), * doStep(), stepCounter++ and stopRunning() in the correct order. */ public final void stepAnimation() { if (showStepsPerDisplay) { stepsPerDisplay = control.getInt("steps per display"); } startRunning(); super.stepAnimation(); stepCounter++; stopRunning(); org.opensourcephysics.display.GUIUtils.repaintAnimatedFrames(); }