Class Controller

java.lang.Object
controller.Controller
All Implemented Interfaces:
IModelToViewController, IViewToModelController

public class Controller extends Object implements IViewToModelController, IModelToViewController
Controls the simulation logic for the simulation page. This class creates the engine, starts the run, changes speed, pauses and resumes the run, and sends engine updates to the UI.
  • Constructor Details

    • Controller

      public Controller(SimulationPageController simulationPageController)
      Creates a controller for one simulation page.
      Parameters:
      simulationPageController - the simulation page that receives UI updates
    • Controller

      public Controller(MainPageController mainPageController)
      Creates a controller for the main page.
      Parameters:
      mainPageController - the main page that sends user input to this controller
    • Controller

      public Controller(ResultsPageController resultsPageController)
      Creates a controller for the results page.
      Parameters:
      resultsPageController - the results page that shows final simulation output
    • Controller

      public Controller(HistoryPageController historyPageController)
      Creates a controller for the history page.
      Parameters:
      historyPageController - the history page that handles navigation
  • Method Details