From 58ce543c41e0d4720918d0f76efe8d90cedc2c49 Mon Sep 17 00:00:00 2001 From: seandias Date: Wed, 11 Sep 2024 14:03:27 +0800 Subject: [PATCH] Added Javadoc --- src/main/java/skd/components/MainWindow.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/java/skd/components/MainWindow.java b/src/main/java/skd/components/MainWindow.java index 06bb5fac5e..9567eeae27 100644 --- a/src/main/java/skd/components/MainWindow.java +++ b/src/main/java/skd/components/MainWindow.java @@ -29,7 +29,14 @@ public class MainWindow extends AnchorPane { private Image userImage = new Image(this.getClass().getResourceAsStream("/images/DaUser.png")); private Image dukeImage = new Image(this.getClass().getResourceAsStream("/images/DaDuke.png")); - @SuppressWarnings("checkstyle:MissingJavadocMethod") + /** + * Initializes the main window by binding the scroll pane to automatically scroll to the latest message, + * displays a welcome message, and clears the user input field. + * This method binds the vertical value property of the scroll pane to the height of the dialog container, + * ensuring that the latest message is always visible. It also adds a welcome message to the dialog container + * and resets the user input field. + * This method is automatically called after the FXML file has been loaded. + */ @FXML public void initialize() { scrollPane.vvalueProperty().bind(dialogContainer.heightProperty());