diff options
author | Simon Rettberg | 2015-07-29 15:14:08 +0200 |
---|---|---|
committer | Simon Rettberg | 2015-07-29 15:14:08 +0200 |
commit | e0ca8b7a3fd299505ad964a1d20d1631920c2a8f (patch) | |
tree | 1975709d3e7954ed694a90813ae5a15e263d6846 /dozentenmodul/src/main/java/org/openslx/dozmod/gui/MainWindow.java | |
parent | [client] Add JTable helper class ListTable (diff) | |
download | tutor-module-e0ca8b7a3fd299505ad964a1d20d1631920c2a8f.tar.gz tutor-module-e0ca8b7a3fd299505ad964a1d20d1631920c2a8f.tar.xz tutor-module-e0ca8b7a3fd299505ad964a1d20d1631920c2a8f.zip |
[client] ImageListWindow ported to Swing
Diffstat (limited to 'dozentenmodul/src/main/java/org/openslx/dozmod/gui/MainWindow.java')
-rw-r--r-- | dozentenmodul/src/main/java/org/openslx/dozmod/gui/MainWindow.java | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/MainWindow.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/MainWindow.java index 496c1e25..035cea60 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/MainWindow.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/MainWindow.java @@ -27,6 +27,7 @@ import org.openslx.dozmod.gui.Gui.GuiCallable; import org.openslx.dozmod.gui.helper.CompositePage; import org.openslx.dozmod.gui.helper.MessageType; import org.openslx.dozmod.gui.window.DisclaimerWindow; +import org.openslx.dozmod.gui.window.LectureListWindow; import org.openslx.dozmod.gui.window.LoginWindow; import org.openslx.dozmod.gui.window.MainMenuWindow; import org.openslx.dozmod.gui.window.VirtualizerNoticeWindow; @@ -39,7 +40,7 @@ public abstract class MainWindow { private final static Logger LOGGER = Logger.getLogger(MainWindow.class); - private static final JFrame mainWindow = new JFrame("bwLehrstuhl"); + private static final JFrame mainWindow; private static final JPanel mainContainer = new JPanel(); private static CompositePage currentPage; @@ -79,6 +80,16 @@ public abstract class MainWindow { Gui.centerShellOverShell(mainWindow, shell); } + static { + JFrame ret = Gui.syncExec(new GuiCallable<JFrame>() { + @Override + public JFrame run() { + return new JFrame("bwLehrstuhl"); + } + }); + mainWindow = ret; + } + /** * Initializes the GUI by creating the main window, adding the menu and * creating the login mask as the first content window. @@ -151,7 +162,7 @@ public abstract class MainWindow { // register all pages of the main window registerPage(new MainMenuWindow()); //registerPage(new ImageListWindow()); - //registerPage(new LectureListWindow()); + registerPage(new LectureListWindow()); // center the window on the primary monitor mainWindow.getContentPane().add(mainContainer, BorderLayout.CENTER); @@ -159,7 +170,7 @@ public abstract class MainWindow { Gui.centerShell(mainWindow); Gui.limitShellSize(mainWindow); - + // here we can check for Session information if (Session.getSatelliteToken() != null) { // Wait for proxy server init @@ -172,7 +183,7 @@ public abstract class MainWindow { // User did not login, show the login mask LoginWindow.open(mainWindow); } - + // Show main menu by default showPage(MainMenuWindow.class); } @@ -185,7 +196,6 @@ public abstract class MainWindow { // TODO: Only ask if an upload or download is running,, wizard is open etc.. if (Gui.showMessageBox(mainWindow, "Are you sure you want to quit?", MessageType.QUESTION_YESNO, null, null)) { - QuickTimer.cancel(); Gui.exit(0); } } |