Class ReplayGeneratorButton

All Implemented Interfaces:
EventListener, javafx.event.EventHandler<javafx.event.ActionEvent>

public class ReplayGeneratorButton extends Object implements javafx.event.EventHandler<javafx.event.ActionEvent>
ReplayGeneratorButton acts as the event handler for the actual JavaFx button that will replay the game.
  • Constructor Details

    • ReplayGeneratorButton

      public ReplayGeneratorButton(@NotNull @NotNull ReplayGeneratorInterpreter interpreter, @NotNull @NotNull Toggler toggler, @NotNull Toggler.ToggleableComponent componentToToggle)
      Create a new ReplayGeneratorButton.
      interpreter - the interpreter for the replay generator button.
      toggler - the toggler used to close the user interface once pressed.
      componentToToggle - the component that needs to be toggled
  • Method Details

    • handle

      public void handle(javafx.event.ActionEvent event)
      this method is called when the button is pressed. It passes control to the appropriate interpreter.
      Specified by:
      handle in interface javafx.event.EventHandler<javafx.event.ActionEvent>
      event - the event which occurred