diff options
| author | Jonathan Bauer | 2015-06-22 13:40:02 +0200 |
|---|---|---|
| committer | Jonathan Bauer | 2015-06-22 13:40:02 +0200 |
| commit | bb09d09546c00fe8b0c21d525af31c87097367d4 (patch) | |
| tree | 61fd648989bcde8ed32b3bf426870d9846e948cb /dozentenmodul/src/main/java/gui/GuiManager.java | |
| parent | [server] Implement getOperatingSystems and getVirtualizers (diff) | |
| download | tutor-module-bb09d09546c00fe8b0c21d525af31c87097367d4.tar.gz tutor-module-bb09d09546c00fe8b0c21d525af31c87097367d4.tar.xz tutor-module-bb09d09546c00fe8b0c21d525af31c87097367d4.zip | |
[client] rebasing the whole app...
Diffstat (limited to 'dozentenmodul/src/main/java/gui/GuiManager.java')
| -rw-r--r-- | dozentenmodul/src/main/java/gui/GuiManager.java | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/dozentenmodul/src/main/java/gui/GuiManager.java b/dozentenmodul/src/main/java/gui/GuiManager.java new file mode 100644 index 00000000..41d5c711 --- /dev/null +++ b/dozentenmodul/src/main/java/gui/GuiManager.java @@ -0,0 +1,31 @@ +package gui; + +import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Shell; + +public abstract class GuiManager { + + private static Display _display; + private static Shell _mainShell; + private static Shell _containerShell; + + public static void initGui() { + // init display, shell + _display = new Display(); + _mainShell = new Shell(_display); + + // add static gui elements + _containerShell = _mainShell; + + // pack (aka size widgets) and open + _mainShell.pack(); + _mainShell.open(); + + // main loop + while (!_mainShell.isDisposed()) { + if (!_display.readAndDispatch()) + _display.sleep(); + } + _display.dispose(); + } +}
\ No newline at end of file |
