Package com.mg105.user_interface
Class MapGeneratorButton
java.lang.Object
com.mg105.user_interface.MapGeneratorButton
- All Implemented Interfaces:
EventListener
,javafx.event.EventHandler<javafx.event.ActionEvent>
public class MapGeneratorButton
extends Object
implements javafx.event.EventHandler<javafx.event.ActionEvent>
MapGeneratorButton acts as the event handler for the actual JavaFX button that will generate a map.
-
Constructor Summary
ConstructorDescriptionMapGeneratorButton
(@NotNull MapGeneratorInterpreterInterface interpreter, @NotNull Toggler toggler) Create a new MapGeneratorButton. -
Method Summary
Modifier and TypeMethodDescriptionvoid
handle
(javafx.event.ActionEvent event) This method is called when the button is pressed.
-
Constructor Details
-
MapGeneratorButton
public MapGeneratorButton(@NotNull @NotNull MapGeneratorInterpreterInterface interpreter, @NotNull @NotNull Toggler toggler) Create a new MapGeneratorButton.- Parameters:
interpreter
- the interpreter for the map generator buttontoggler
- the toggler used to close the user interface once pressed.
-
-
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
-