Class SettingsController

java.lang.Object
controller.SettingsController

public class SettingsController extends Object
Controller class for handling the settings UI interactions. Provides methods to update simulation parameters through sliders.
  • Field Details

    • tableAmountField

      public javafx.scene.control.TextField tableAmountField
    • tableSizeField

      public javafx.scene.control.TextField tableSizeField
  • Constructor Details

    • SettingsController

      public SettingsController()
  • Method Details

    • initialize

      public void initialize()
      Initializes the settings view.
    • setEngine

      public void setEngine(IEngine engine)
      Sets the engine for the controller.
      Parameters:
      engine - the engine to set
    • setMainController

      public void setMainController(ControllerForFxml mainController)
      Sets the main controller for the controller.
      Parameters:
      mainController - the main controller to set
    • updateSliderValue

      public void updateSliderValue(javafx.scene.control.Slider slider, String type)
      Updates the simulation parameters based on the slider value.
      Parameters:
      slider - the slider to update
      type - the type of parameter to update
    • getMaxGroupSize

      public int getMaxGroupSize()
      Returns the maximum group size.
      Returns:
      the maximum group size
    • getTableAmount

      public int getTableAmount()
      Returns the table amount.
      Returns:
      the table amount
    • getTableSize

      public int getTableSize()
    • setTableAmount

      public void setTableAmount(int tableAmount)
    • setTableSize

      public void setTableSize(int tableSize)
    • decrementValue

      public void decrementValue(javafx.scene.control.TextField field)
      Decrements the value of the given text field by one.
      Parameters:
      field - the text field to decrement
    • incrementValue

      public void incrementValue(javafx.scene.control.TextField field)
      Increments the value of the given text field by one.
      Parameters:
      field - the text field to increment
    • handleButtonAction

      public void handleButtonAction(javafx.event.ActionEvent event)
      Handles the button actions for incrementing and decrementing values.
      Parameters:
      event - the action event
    • updateSettingsView

      public void updateSettingsView(javafx.scene.control.TextField field)
      Updates the settings view based on the given text field.
      Parameters:
      field - the text field to update
    • setGroupSize

      public void setGroupSize(int size)
      Sets the maximum group size to the given value.
      Parameters:
      size - the maximum group size
    • updateTextFields

      public void updateTextFields()
      Updates the text fields with the current settings values.