From 2acfa708e9074afb970a941d988b4bec7c73df31 Mon Sep 17 00:00:00 2001 From: Leonardo Brandenberger Date: Sat, 16 Apr 2022 07:10:03 +0200 Subject: [PATCH] ClientUI JavaDocs finished --- .../ch/zhaw/pm2/multichat/client/ClientUI.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/client/src/main/java/ch/zhaw/pm2/multichat/client/ClientUI.java b/client/src/main/java/ch/zhaw/pm2/multichat/client/ClientUI.java index 5fbdbf5..e252877 100644 --- a/client/src/main/java/ch/zhaw/pm2/multichat/client/ClientUI.java +++ b/client/src/main/java/ch/zhaw/pm2/multichat/client/ClientUI.java @@ -6,15 +6,32 @@ import javafx.scene.Scene; import javafx.scene.layout.Pane; import javafx.stage.Stage; +/** + * Class in charge of initializing and loading elements needed for the GUI. + * Also Launching the chat window with pre-given parameters + */ public class ClientUI extends Application { private final ClientMessageList clientMessageList = new ClientMessageList(); private final ClientConnectionHandler connectionHandler = new ClientConnectionHandler(clientMessageList); + /** + * Start method will only run the chatWindow method. + * + * @param primaryStage the primary stage for this application, onto which + * the application scene can be set. + * Applications may create other stages, if needed, but they will not be + * primary stages. + */ @Override public void start(Stage primaryStage) { chatWindow(primaryStage); } + /** + * Method is in charge of loading the FXML file and then initializing the controllers and setting some parameters for the stage. + * + * @param primaryStage of the Application onto which the Scene is set. + */ private void chatWindow(Stage primaryStage) { try { FXMLLoader loader = new FXMLLoader(getClass().getResource("ChatWindow.fxml"));