minor changes in ChatWindow and SettingsScreen

This commit is contained in:
delvh 2019-11-09 09:52:27 +01:00
parent 2d3d595164
commit 59fc855364
2 changed files with 12 additions and 11 deletions

View File

@ -255,7 +255,8 @@ public class ChatWindow extends JFrame {
} }
/** /**
* Posts a {@link Message}. Is used only twice: Once for clicking on the {@code postButton}<br> * Posts a {@link Message}. Is used only twice: Once for clicking on the
* {@code postButton}<br>
* and once for pressing the KeyStroke(s) to send a message ( (ctrl+)enter) * 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}

View File

@ -33,25 +33,25 @@ public class SettingsScreen extends JDialog {
* *
* @since Envoy v0.1-alpha * @since Envoy v0.1-alpha
*/ */
public static void open() { public static void open() { open(new SettingsScreen()); }
SettingsScreen dialog = new SettingsScreen();
dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
dialog.setVisible(true);
}
/** /**
* Opens the Settings screen.<br> * Opens the Settings screen.<br>
* Use preferreably since everyone is already initialised.<br> * Use preferably since everyone is already initialised.<br>
* It personalises the screen more. * 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 * @param Email The Email that is associated with that Account
* @since Envoy v0.1-alpha * @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! // 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.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
dialog.setModal(true);
dialog.setVisible(true); dialog.setVisible(true);
} }