ClientUI JavaDocs finished

This commit is contained in:
Leonardo Brandenberger 2022-04-16 07:10:03 +02:00
parent 7c8bdb3b33
commit 2acfa708e9
1 changed files with 17 additions and 0 deletions

View File

@ -6,15 +6,32 @@ import javafx.scene.Scene;
import javafx.scene.layout.Pane; import javafx.scene.layout.Pane;
import javafx.stage.Stage; 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 { public class ClientUI extends Application {
private final ClientMessageList clientMessageList = new ClientMessageList(); private final ClientMessageList clientMessageList = new ClientMessageList();
private final ClientConnectionHandler connectionHandler = new ClientConnectionHandler(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 @Override
public void start(Stage primaryStage) { public void start(Stage primaryStage) {
chatWindow(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) { private void chatWindow(Stage primaryStage) {
try { try {
FXMLLoader loader = new FXMLLoader(getClass().getResource("ChatWindow.fxml")); FXMLLoader loader = new FXMLLoader(getClass().getResource("ChatWindow.fxml"));