Added ChatApp class, ChatController class and the fxml representing the view of the chat gui.

This commit is contained in:
Sebastian Lenzlinger
2022-04-16 10:49:40 +02:00
parent 6986a9906f
commit b30f44df6c
3 changed files with 128 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
package ch.unibas.dmi.dbis.cs108.multiplayer.client.gui.chat;
import javafx.application.Application;
import javafx.stage.Stage;
public class ChatApp extends Application {
/**
* The main entry point for all JavaFX applications. The start method is called after the init
* method has returned, and after the system is ready for the application to begin running.
*
* <p>
* NOTE: This method is called on the JavaFX Application Thread.
* </p>
*
* @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.
* @throws Exception if something goes wrong
*/
@Override
public void start(Stage primaryStage) throws Exception {
}
}

View File

@@ -0,0 +1,37 @@
package ch.unibas.dmi.dbis.cs108.multiplayer.client.gui.chat;
import java.net.URL;
import java.util.ResourceBundle;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.Button;
import javafx.scene.control.TextArea;
import javafx.scene.control.TextField;
import javafx.scene.layout.VBox;
public class ChatController implements Initializable {
@FXML
private VBox vBoxChatMessages;
@FXML
private Button sendButton;
@FXML
private TextField whisperTargetSelectField;
@FXML
private TextArea chatMsgField;
/**
* Called to initialize a controller after its root element has been completely processed.
*
* @param location The location used to resolve relative paths for the root object, or {@code
* null} if the location is not known.
* @param resources The resources used to localize the root object, or {@code null} if
*/
@Override
public void initialize(URL location, ResourceBundle resources) {
}
}