From 55e56e992fe9e43c277051719ef9badb9d84c155 Mon Sep 17 00:00:00 2001 From: "Blake J. Harnden" Date: Thu, 29 Nov 2018 13:53:02 -0800 Subject: [PATCH] corefx - quick change to display session id in title bar when joined --- corefx/src/main/java/com/core/Controller.java | 4 ++++ corefx/src/main/java/com/core/Main.java | 1 + 2 files changed, 5 insertions(+) diff --git a/corefx/src/main/java/com/core/Controller.java b/corefx/src/main/java/com/core/Controller.java index e234999b..d6334c12 100644 --- a/corefx/src/main/java/com/core/Controller.java +++ b/corefx/src/main/java/com/core/Controller.java @@ -10,6 +10,7 @@ import com.core.utils.ConfigUtils; import com.core.utils.Configuration; import com.core.utils.NodeTypeConfig; import com.core.websocket.CoreWebSocket; +import com.jfoenix.controls.JFXDecorator; import com.jfoenix.controls.JFXProgressBar; import javafx.application.Application; import javafx.application.Platform; @@ -49,6 +50,7 @@ public class Controller implements Initializable { @FXML private JFXProgressBar progressBar; private Application application; + private JFXDecorator decorator; private Stage window; private Configuration configuration; private Map> defaultServices = new HashMap<>(); @@ -189,6 +191,8 @@ public class Controller implements Initializable { Platform.runLater(() -> bottom.getChildren().add(mobilityPlayer)); } } + + decorator.setTitle(String.format("CORE (Session %s)", sessionId)); } public boolean startSession() throws IOException { diff --git a/corefx/src/main/java/com/core/Main.java b/corefx/src/main/java/com/core/Main.java index 626a3ffa..41b84e40 100644 --- a/corefx/src/main/java/com/core/Main.java +++ b/corefx/src/main/java/com/core/Main.java @@ -56,6 +56,7 @@ public class Main extends Application { Controller controller = loader.getController(); controller.setApplication(this); controller.setWindow(window); + controller.setDecorator(decorator); // configure window window.setOnCloseRequest(event -> {