Class SimulationPageController
java.lang.Object
controller.SimulationPageController
JavaFX controller for the simulation page.
Responsibilities:
- connect controls from simulation_view.fxml to Java code
- forward user commands such as pause and speed changes to
Controller
- expose UI update methods for timer, queues, and order book data-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsetPauseButtonText(String text) Changes the text on the pause button.voidshowOrderBook(OrderBook.OrderBookSnapshot snapshot) Shows one order book snapshot in the table on the simulation page.voidshowResultsPage(StatisticsCollector.Snapshot snapshot, Records.StatisticsAndMetricsRecord record) Opens the results page and sends final simulation data there.voidstartSimulation(eds.config.SimulationConfig config) Starts the simulation page with the selected configuration.voidupdateGraph(OrderBook.OrderBookSnapshot snapshot) voidupdateQueueLengths(int[] queueLengths) Updates the queue labels on the simulation page.voidupdateSimulationTime(double time) Updates the timer label on the simulation page.
-
Constructor Details
-
SimulationPageController
public SimulationPageController()
-
-
Method Details
-
startSimulation
public void startSimulation(eds.config.SimulationConfig config) Starts the simulation page with the selected configuration.- Parameters:
config- the configuration values chosen on the main page
-
setPauseButtonText
Changes the text on the pause button.- Parameters:
text- the new button text
-
updateSimulationTime
public void updateSimulationTime(double time) Updates the timer label on the simulation page.- Parameters:
time- the current simulation time from the engine
-
updateQueueLengths
public void updateQueueLengths(int[] queueLengths) Updates the queue labels on the simulation page.- Parameters:
queueLengths- queue values for validation, market, limit, and execution
-
showOrderBook
Shows one order book snapshot in the table on the simulation page.- Parameters:
snapshot- the current order book snapshot from the engine
-
updateGraph
-
showResultsPage
public void showResultsPage(StatisticsCollector.Snapshot snapshot, Records.StatisticsAndMetricsRecord record) Opens the results page and sends final simulation data there.- Parameters:
snapshot- the final simulation snapshotrecord- the final database record with metrics
-