diff options
| author | Simon Rettberg | 2015-07-10 17:48:24 +0200 |
|---|---|---|
| committer | Simon Rettberg | 2015-07-10 17:48:24 +0200 |
| commit | 15411084aaf1eb0a3c653a8e6f031c9bd55e79ca (patch) | |
| tree | ea30d11b051f3a5e612c0807ad97bee52ccf3e53 | |
| parent | [*] Move common classes to master-sync-shared (diff) | |
| download | tutor-module-15411084aaf1eb0a3c653a8e6f031c9bd55e79ca.tar.gz tutor-module-15411084aaf1eb0a3c653a8e6f031c9bd55e79ca.tar.xz tutor-module-15411084aaf1eb0a3c653a8e6f031c9bd55e79ca.zip | |
[client] Use QuickTimer for async list fetching
| -rw-r--r-- | dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LoginWindow.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LoginWindow.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LoginWindow.java index ee928b5b..2f1271c9 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LoginWindow.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LoginWindow.java @@ -27,6 +27,8 @@ import org.openslx.dozmod.gui.helper.MessageType; import org.openslx.dozmod.gui.window.layout.LoginWindowLayout; import org.openslx.dozmod.thrift.OrganizationCache; import org.openslx.thrifthelper.ThriftManager; +import org.openslx.util.QuickTimer; +import org.openslx.util.QuickTimer.Task; import edu.kit.scc.dei.ecplean.ECPAuthenticationException; @@ -58,12 +60,12 @@ public class LoginWindow extends LoginWindowLayout { idpCombo.add("Initialisiere..."); idpCombo.select(0); idpCombo.setEnabled(false); - new Thread() { + QuickTimer.scheduleOnce(new Task() { List<Organization> orgs = null; - public void run() { + @Override + public void fire() { try { - Thread.sleep(2000); orgs = OrganizationCache.getAll(); } catch (Exception e) { LoginWindow.LOGGER.error("Error during execution: ", e); @@ -71,12 +73,13 @@ public class LoginWindow extends LoginWindowLayout { // now send the organisations back to the LoginWindow // through populateIdpCombo() Gui.display.asyncExec(new Runnable() { + @Override public void run() { populateIdpCombo(orgs); } }); } - }.start(); + }); // check if we had saved an authentication method String savedAuthMethod = Config.getAuthenticationMethod(); |
