From 59fc855364a6c349e348a08cf567aca7a3b843ce Mon Sep 17 00:00:00 2001 From: delvh Date: Sat, 9 Nov 2019 09:52:27 +0100 Subject: [PATCH] minor changes in ChatWindow and SettingsScreen --- src/main/java/envoy/client/ui/ChatWindow.java | 5 +++-- .../java/envoy/client/ui/SettingsScreen.java | 18 +++++++++--------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/main/java/envoy/client/ui/ChatWindow.java b/src/main/java/envoy/client/ui/ChatWindow.java index 90bb87d..1e43245 100644 --- a/src/main/java/envoy/client/ui/ChatWindow.java +++ b/src/main/java/envoy/client/ui/ChatWindow.java @@ -255,10 +255,11 @@ public class ChatWindow extends JFrame { } /** - * Posts a {@link Message}. Is used only twice: Once for clicking on the {@code postButton}
+ * Posts a {@link Message}. Is used only twice: Once for clicking on the + * {@code postButton}
* and once for pressing the KeyStroke(s) to send a message ( (ctrl+)enter) * - * @param client the client who wants to send a {@link Message} + * @param client the client who wants to send a {@link Message} * @param messageList the chat in which this {@link Message} belongs * @since Envoy v0.1-alpha */ diff --git a/src/main/java/envoy/client/ui/SettingsScreen.java b/src/main/java/envoy/client/ui/SettingsScreen.java index 8761160..7d5de28 100644 --- a/src/main/java/envoy/client/ui/SettingsScreen.java +++ b/src/main/java/envoy/client/ui/SettingsScreen.java @@ -33,25 +33,25 @@ public class SettingsScreen extends JDialog { * * @since Envoy v0.1-alpha */ - public static void open() { - SettingsScreen dialog = new SettingsScreen(); - dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - dialog.setVisible(true); - } + public static void open() { open(new SettingsScreen()); } /** * Opens the Settings screen.
- * Use preferreably since everyone is already initialised.
+ * Use preferably since everyone is already initialised.
* It personalises the screen more. * - * @param Username The name of the User + * @param username The name of the User * @param Email The Email that is associated with that Account * @since Envoy v0.1-alpha */ - public static void open(String Username) {// , String Email) {AUSKLAMMERN, WENN ANMELDUNG PER + public static void open(String username) {// , String Email) {AUSKLAMMERN, WENN ANMELDUNG PER // EMAIL IMPLEMENTIERT IST! - SettingsScreen dialog = new SettingsScreen(Username); + open(new SettingsScreen(username)); + } + + public static void open(SettingsScreen dialog) { dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); + dialog.setModal(true); dialog.setVisible(true); }