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
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)
-
Nested Class Summary
Nested classes/interfaces inherited from class javafx.application.Application
javafx.application.Application.Parameters -
Field Summary
Fields inherited from class AbstractDemo
viewerFields inherited from class javafx.application.Application
STYLESHEET_CASPIAN, STYLESHEET_MODENA -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected javafx.scene.layout.VBoxbooleanReturns true if the simulation is currently playing.voidpause()Pauses the simulation.voidplay()Starts or resumes the simulation.voidsetSpeed(double speed) Sets the simulation speed (e.g., 1.0 for normal, 2.0 for double).voidstep()Advances the simulation by a single step.voidstop()Stops and resets the simulation.Methods inherited from class AbstractDemo
createViewerNode, getCategory, getDescription, getLongDescription, getName, getViewerParameters, isDemo, show, startMethods inherited from class javafx.application.Application
getHostServices, getParameters, getUserAgentStylesheet, init, launch, launch, notifyPreloader, setUserAgentStylesheetMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Viewer
getParameter, setParameter
-
Constructor Details
-
AbstractSimulationDemo
public AbstractSimulationDemo()
-
-
Method Details
-
createControlPanel
protected javafx.scene.layout.VBox createControlPanel()- Overrides:
createControlPanelin classAbstractDemo
-
play
public void play()Description copied from interface:SimulatableStarts or resumes the simulation.- Specified by:
playin interfaceSimulatable
-
pause
public void pause()Description copied from interface:SimulatablePauses the simulation.- Specified by:
pausein interfaceSimulatable
-
stop
public void stop()Description copied from interface:SimulatableStops and resets the simulation.- Specified by:
stopin interfaceSimulatable- Overrides:
stopin classjavafx.application.Application
-
step
public void step()Description copied from interface:SimulatableAdvances the simulation by a single step.- Specified by:
stepin interfaceSimulatable
-
isPlaying
public boolean isPlaying()Description copied from interface:SimulatableReturns true if the simulation is currently playing.- Specified by:
isPlayingin interfaceSimulatable
-
setSpeed
public void setSpeed(double speed) Description copied from interface:SimulatableSets the simulation speed (e.g., 1.0 for normal, 2.0 for double).- Specified by:
setSpeedin interfaceSimulatable
-