Class AbstractSimulationDemo

java.lang.Object
javafx.application.Application
org.episteme.core.ui.AbstractDemo
org.episteme.core.ui.AbstractSimulationDemo
All Implemented Interfaces:
App, Simulatable, Viewer
Direct Known Subclasses:
ArchitectureStabilityDemo, AudioViewerDemo, BioMotionDemo, CarTrafficDemo, ChemicalKineticsDemo, ClothSimulationDemo, DigitalLogicDemo, FluidDynamicsDemo, GalaxyDemo, GaltonBoardDemo, GameOfLifeDemo, GeneticAlgorithmDemo, LorenzDemo, LotkaVolterraDemo, LSystemDemo, MechanicsDemo, NewtonianMechanicsLabDemo, PsychologyReactionTestDemo, RigidBodyDemo, StarSystemDemo

public abstract class AbstractSimulationDemo extends AbstractDemo implements Simulatable
Abstract base class for simulation demos that require playback controls. It implements Simulatable by delegating to the viewer (if applicable). Subclasses can override these methods if they manage simulation logic differently.
Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Constructor Details

    • AbstractSimulationDemo

      public AbstractSimulationDemo()
  • Method Details

    • createControlPanel

      protected javafx.scene.layout.VBox createControlPanel()
      Overrides:
      createControlPanel in class AbstractDemo
    • play

      public void play()
      Description copied from interface: Simulatable
      Starts or resumes the simulation.
      Specified by:
      play in interface Simulatable
    • pause

      public void pause()
      Description copied from interface: Simulatable
      Pauses the simulation.
      Specified by:
      pause in interface Simulatable
    • stop

      public void stop()
      Description copied from interface: Simulatable
      Stops and resets the simulation.
      Specified by:
      stop in interface Simulatable
      Overrides:
      stop in class javafx.application.Application
    • step

      public void step()
      Description copied from interface: Simulatable
      Advances the simulation by a single step.
      Specified by:
      step in interface Simulatable
    • isPlaying

      public boolean isPlaying()
      Description copied from interface: Simulatable
      Returns true if the simulation is currently playing.
      Specified by:
      isPlaying in interface Simulatable
    • setSpeed

      public void setSpeed(double speed)
      Description copied from interface: Simulatable
      Sets the simulation speed (e.g., 1.0 for normal, 2.0 for double).
      Specified by:
      setSpeed in interface Simulatable