Package com.mg105.user_interface
Class ReplayGeneratorButton
java.lang.Object
com.mg105.user_interface.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 Summary
ConstructorDescriptionReplayGeneratorButton
(@NotNull ReplayGeneratorInterpreter interpreter, @NotNull Toggler toggler, @NotNull Toggler.ToggleableComponent componentToToggle) Create a new ReplayGeneratorButton. -
Method Summary
Modifier and TypeMethodDescriptionvoid
handle
(javafx.event.ActionEvent event) this method is called when the button is pressed.
-
Constructor Details
-
ReplayGeneratorButton
public ReplayGeneratorButton(@NotNull @NotNull ReplayGeneratorInterpreter interpreter, @NotNull @NotNull Toggler toggler, @NotNull Toggler.ToggleableComponent componentToToggle) Create a new ReplayGeneratorButton.- Parameters:
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 interfacejavafx.event.EventHandler<javafx.event.ActionEvent>
- Parameters:
event
- the event which occurred
-