diff options
| author | Jonathan Bauer | 2014-10-15 13:43:40 +0200 |
|---|---|---|
| committer | Jonathan Bauer | 2014-10-15 13:43:40 +0200 |
| commit | 34ecda4a5938a99442799e5e9084aedac898e904 (patch) | |
| tree | 773d701b38de9665b1ab2171bd9960316a1db01a | |
| parent | [client] Login_GUI: update text of radio button & remove dead code (diff) | |
| download | tutor-module-34ecda4a5938a99442799e5e9084aedac898e904.tar.gz tutor-module-34ecda4a5938a99442799e5e9084aedac898e904.tar.xz tutor-module-34ecda4a5938a99442799e5e9084aedac898e904.zip | |
[client] Login_GUI: oops, reactivate the Login by pressing Enter on either the username or the password fields.
| -rw-r--r-- | dozentenmodul/src/main/java/gui/intro/Login_GUI.java | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/dozentenmodul/src/main/java/gui/intro/Login_GUI.java b/dozentenmodul/src/main/java/gui/intro/Login_GUI.java index 71aaaa2d..035710e8 100644 --- a/dozentenmodul/src/main/java/gui/intro/Login_GUI.java +++ b/dozentenmodul/src/main/java/gui/intro/Login_GUI.java @@ -153,7 +153,7 @@ public class Login_GUI extends JFrame { JButton BtnLogin = new JButton("Login"); BtnLogin.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { - performLogin(); + performLogin(bgLoginType.getSelection().getActionCommand()); }// end actionPerformed }); @@ -186,14 +186,11 @@ public class Login_GUI extends JFrame { lblusername.setColumns(10); // Lese Benutzername aus der Konfigurationsdatei lblusername.setText(Config.getUsername()); - - // this next block did nothing? since the action is triggered by the - // login button and not the JTextField containing the username -// lblusername.addActionListener(new ActionListener() { -// public void actionPerformed(ActionEvent arg0) { -// performLogin(); -// } -// }); + lblusername.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent arg0) { + performLogin(bgLoginType.getSelection().getActionCommand()); + } + }); panel.add(lblusername); // Erzeugen und Hinzufuegen des Labels @@ -207,7 +204,7 @@ public class Login_GUI extends JFrame { lblpass.setToolTipText("Bitte geben Sie Ihr bwIDM-Passwort ein."); lblpass.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { - performLogin(); + performLogin(bgLoginType.getSelection().getActionCommand()); } }); panel.add(lblpass); @@ -235,7 +232,6 @@ public class Login_GUI extends JFrame { @Override public void actionPerformed(ActionEvent e) { toggleLoginType(e.getActionCommand()); - } }; @@ -283,8 +279,8 @@ public class Login_GUI extends JFrame { }// end LoginGUI() // Versuche den Benutzer einzuloggen - public void performLogin() { - LOGGER.info("Trying login of type: " + bgLoginType.getSelection().getActionCommand()); + public void performLogin(final String loginType) { + LOGGER.info("Trying login of type: " + loginType); org.openslx.imagemaster.thrift.iface.SessionData result = null; // Connect to Master MasterThriftConnection thrift = new MasterThriftConnection(); @@ -293,6 +289,7 @@ public class Login_GUI extends JFrame { if (client == null) { // Thrift connection to master could not be established setStatus(Color.red, "Fehler: Masterserver nicht erreichbar.", null); + LOGGER.info("Thrift client could not be initialized, is the masterserver up and running?"); return; } |
