Class SimulationPageController

java.lang.Object
controller.SimulationPageController

public class SimulationPageController extends Object
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 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

      public void setPauseButtonText(String text)
      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

      public void showOrderBook(OrderBook.OrderBookSnapshot snapshot)
      Shows one order book snapshot in the table on the simulation page.
      Parameters:
      snapshot - the current order book snapshot from the engine
    • updateGraph

      public void updateGraph(OrderBook.OrderBookSnapshot snapshot)
    • 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 snapshot
      record - the final database record with metrics