/**
  * 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();
 }
 /**
  * Initializes the animation. Simulations should invoke the initialize method.
  *
  * @deprecated
  */
 public void initializeAnimation() {
   if (control == null) {
     return; // control can be null in applet mode so check for this
   }
   super.initializeAnimation();
   initialize();
   stepCounter = 0;
 }
 /**
  * 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();
 }
 /**
  * Resets the animation to its default condition. Simulations should invoke the reset method.
  *
  * @deprecated
  */
 public void resetAnimation() {
   if (control == null) {
     return; // control can be null in applet mode so check for this
   }
   super.resetAnimation();
   stepsPerDisplay = 1;
   if (showStepsPerDisplay) {
     control.setAdjustableValue("steps per display", stepsPerDisplay);
   }
   reset();
 }
 /**
  * Stops the animation thread and then invokes the simulations stop method.\ Simulations should
  * not override this method. They should override the stop method.
  *
  * @deprecated
  */
 public void stopAnimation() {
   super.stopAnimation();
   stopRunning();
   stop();
 }