From 02aac4f4e95c89b7db79151295cec61119170398 Mon Sep 17 00:00:00 2001 From: Nathan McRae Date: Sun, 29 Dec 2024 12:42:34 -0800 Subject: [PATCH] 'Number station' -> 'Numbers station' Seems to be the more common terminology --- .../java/name/nathanmcrae/NumbersStation.fxml | 99 +++++++++++ .../java/name/nathanmcrae/NumbersStation.java | 21 +++ .../nathanmcrae/NumbersStationConfig.fxml | 108 ++++++++++++ .../nathanmcrae/NumbersStationController.java | 36 ++++ .../nathanmcrae/NumbersStationListener.fxml | 100 ++++++++++++ .../NumbersStationListenerConfig.fxml | 154 ++++++++++++++++++ 6 files changed, 518 insertions(+) create mode 100644 src/main/java/name/nathanmcrae/NumbersStation.fxml create mode 100644 src/main/java/name/nathanmcrae/NumbersStation.java create mode 100644 src/main/java/name/nathanmcrae/NumbersStationConfig.fxml create mode 100644 src/main/java/name/nathanmcrae/NumbersStationController.java create mode 100644 src/main/java/name/nathanmcrae/NumbersStationListener.fxml create mode 100644 src/main/java/name/nathanmcrae/NumbersStationListenerConfig.fxml diff --git a/src/main/java/name/nathanmcrae/NumbersStation.fxml b/src/main/java/name/nathanmcrae/NumbersStation.fxml new file mode 100644 index 0000000..8627566 --- /dev/null +++ b/src/main/java/name/nathanmcrae/NumbersStation.fxml @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/name/nathanmcrae/NumbersStationController.java b/src/main/java/name/nathanmcrae/NumbersStationController.java new file mode 100644 index 0000000..71efe72 --- /dev/null +++ b/src/main/java/name/nathanmcrae/NumbersStationController.java @@ -0,0 +1,36 @@ +package name.nathanmcrae; + +import javafx.fxml.FXML; +import javafx.fxml.FXMLLoader; +import javafx.scene.Parent; +import javafx.scene.Scene; +import javafx.stage.Stage; +import javafx.scene.control.Label; + +public class NumbersStationController { + @FXML + private Label lastRetrievedLabel; + + private Stage configStage; + + @FXML + private void handleButtonPress() { + System.out.println("Button pressed!"); + lastRetrievedLabel.setText("Button pressed!"); + + if (configStage == null || !configStage.isShowing()) { + try { + FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("NumbersStationConfig.fxml")); + Parent root = fxmlLoader.load(); + configStage = new Stage(); + configStage.setTitle("Numbers Station Config"); + configStage.setScene(new Scene(root)); + configStage.show(); + } catch (Exception e) { + e.printStackTrace(); + } + } else { + configStage.toFront(); + } + } +} diff --git a/src/main/java/name/nathanmcrae/NumbersStationListener.fxml b/src/main/java/name/nathanmcrae/NumbersStationListener.fxml new file mode 100644 index 0000000..4dae3d2 --- /dev/null +++ b/src/main/java/name/nathanmcrae/NumbersStationListener.fxml @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +