From f1240b0ddef62b03da3ca9d87812e3be2ff36e15 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 15 Jul 2015 11:56:41 +0200 Subject: [client] Clean up SWT resources when exiting --- .../src/main/java/org/openslx/dozmod/App.java | 6 +- .../src/main/java/org/openslx/dozmod/gui/Gui.java | 269 +++++++++++++++++++++ .../java/org/openslx/dozmod/gui/MainWindow.java | 52 ++-- .../java/org/openslx/dozmod/gui/helper/Gui.java | 193 --------------- .../openslx/dozmod/gui/window/ImageListWindow.java | 2 +- .../org/openslx/dozmod/gui/window/LoginWindow.java | 2 +- .../gui/window/layout/ImageListWindowLayout.java | 2 +- .../gui/window/layout/LoginWindowLayout.java | 2 +- .../layout/VirtualizerNoticeWindowLayout.java | 2 +- .../dozmod/gui/wizard/page/ImageMetaDataPage.java | 2 +- .../dozmod/gui/wizard/page/ImageUploadPage.java | 2 +- .../org/openslx/dozmod/util/ResourceLoader.java | 2 +- 12 files changed, 304 insertions(+), 232 deletions(-) create mode 100644 dozentenmodul/src/main/java/org/openslx/dozmod/gui/Gui.java delete mode 100644 dozentenmodul/src/main/java/org/openslx/dozmod/gui/helper/Gui.java diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/App.java b/dozentenmodul/src/main/java/org/openslx/dozmod/App.java index dd9aa3ce..6666d747 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/App.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/App.java @@ -12,8 +12,8 @@ import org.apache.log4j.FileAppender; import org.apache.log4j.Logger; import org.apache.log4j.PatternLayout; import org.apache.log4j.spi.LoggingEvent; +import org.openslx.dozmod.gui.Gui; import org.openslx.dozmod.gui.MainWindow; -import org.openslx.dozmod.gui.helper.Gui; import org.openslx.dozmod.util.ProxyConfigurator; import org.openslx.thrifthelper.ThriftManager; @@ -121,9 +121,11 @@ public class App { // setup global thrift connection error handler before anything else // Set master server to use (TODO: make configurable via command line) ThriftManager.setMasterServerAddress("bwlp-masterserver.ruf.uni-freiburg.de"); + + MainWindow.open(); // start the main window - MainWindow.mainloop(); + Gui.mainloop(); } private static void showAwtMessage(String message, Throwable e) { diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/Gui.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/Gui.java new file mode 100644 index 00000000..8e5231ae --- /dev/null +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/Gui.java @@ -0,0 +1,269 @@ +package org.openslx.dozmod.gui; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.concurrent.atomic.AtomicReference; + +import org.apache.log4j.Logger; +import org.eclipse.swt.SWT; +import org.eclipse.swt.graphics.Point; +import org.eclipse.swt.graphics.Rectangle; +import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.MessageBox; +import org.eclipse.swt.widgets.Monitor; +import org.eclipse.swt.widgets.Shell; +import org.openslx.dozmod.gui.helper.MessageType; + +public class Gui { + + private static final Logger LOGGER = Logger.getLogger(Gui.class); + + /** + * The one and only display to use throughout the application + */ + public static final Display display = new Display(); + + /** + * All active shells - we don't use display.getShells() as it is slow... + */ + private static final List shells = new ArrayList<>(); + + private static volatile int exitCode = 0; + + /** + * Center the given shell on the {@link Monitor} it is displayed on. + * + * @param shell Some shell + */ + public static void centerShell(Shell shell) { + Monitor activeMonitor = getMonitorFromRectangle(shell.getBounds(), true); + Rectangle bounds = activeMonitor.getClientArea(); + Rectangle rect = shell.getBounds(); + int x = bounds.x + (bounds.width - rect.width) / 2; + int y = bounds.y + (bounds.height - rect.height) / 2; + shell.setLocation(x, y); + } + + /** + * Make sure the given shell fits the {@link Monitor} it is displayed on. + * + * @param shell Some shell + */ + public static void limitShellSize(Shell shell) { + Monitor activeMonitor = getMonitorFromRectangle(shell.getBounds(), true); + Rectangle bounds = activeMonitor.getClientArea(); + Rectangle rect = shell.getBounds(); + boolean changed = false; + if (rect.width + 20 > bounds.width) { + rect.width = bounds.width - 20; + changed = true; + } + if (rect.height + 20 > bounds.height) { + rect.height = bounds.height - 20; + changed = true; + } + if (changed) { + shell.setSize(rect.width, rect.height); + rect = shell.getBounds(); + } + changed = false; + if (rect.x + rect.width >= bounds.x + bounds.width) { + rect.x = 5; + changed = true; + } + if (rect.y + rect.height >= bounds.y + bounds.height) { + rect.y = 5; + changed = true; + } + if (changed) { + shell.setLocation(rect.x, rect.y); + } + } + + /** + * Get the {@link Monitor} which the given {@link Point} lies in. + * + * @param point The point in question + * @param defaultToPrimary if no monitor matches the check, return the + * primary monitor if true, null otherwise + * @return the {@link Monitor} + */ + public static Monitor getMonitorFromPoint(Point point, boolean defaultToPrimary) { + Monitor[] monitors = display.getMonitors(); + for (Monitor monitor : monitors) { + Rectangle bounds = monitor.getBounds(); + if (bounds.contains(point)) + return monitor; + } + if (defaultToPrimary) + return display.getPrimaryMonitor(); + return null; + } + + /** + * Get the {@link Monitor} which most of the given rectangle overlaps. + * + * @param rect The rectangle to check + * @param defaultToPrimary if no monitor matches the check, return the + * primary monitor if true, null otherwise + * @return the {@link Monitor} + */ + public static Monitor getMonitorFromRectangle(Rectangle rect, boolean defaultToPrimary) { + // Make sure rectangle is in bounds. This is not completely accurate + // in case there are multiple monitors that have different resolutions. + Rectangle bounds = display.getBounds(); + if (rect.x + rect.width >= bounds.x + bounds.width) { + rect.width -= (rect.x + rect.width) - (bounds.x + bounds.width); + if (rect.width < 1) + rect.width = 1; + } + if (rect.y + rect.height >= bounds.y + bounds.height) { + rect.height -= (rect.y + rect.height) - (bounds.y + bounds.height); + if (rect.height < 1) + rect.height = 1; + } + if (rect.x < bounds.x) { + rect.width -= bounds.x - rect.x; + rect.x = bounds.x; + } + if (rect.y < bounds.y) { + rect.height -= bounds.y - rect.y; + rect.y = bounds.y; + } + // Now just use the same code as *FromPoint by using the rectangle's center + return getMonitorFromPoint(new Point(rect.x + rect.width / 2, rect.y + rect.height / 2), + defaultToPrimary); + } + + /** + * Run given task in the GUI thread, blocking the calling thread until the + * task is done. + * + * @param task Task to run + * @return return value of the task + */ + public static T syncExec(final GuiCallable task) { + final AtomicReference instance = new AtomicReference<>(); + display.syncExec(new Runnable() { + @Override + public void run() { + try { + instance.set(task.run()); + } catch (Throwable e) { + LOGGER.warn("syncExec failed!", e); + } + } + }); + return instance.get(); + } + + /** + * Run given task as soon as possible in the GUI thread, but don't block + * calling thread. + * + * @param task Task to run + */ + public static void asyncExec(final Runnable task) { + display.asyncExec(task); + } + + /** + * Pretty much the same as Callable, but no exceptions are allowed. + * + * @param return value + */ + public static interface GuiCallable { + T run(); + } + + /** + * Generic helper to show a message box to the user, and optionally log the + * message to the log file. + * + * @param parent parent shell this message box belongs to + * @param message Message to display. Can be multiline. + * @param messageType Type of message (warning, information) + * @param logger Logger instance to log to. Can be null. + * @param exception Exception related to this message. Can be null. + * @return true if OK, YES or RETRY was clicked, false for CANCEL or NO + */ + public static boolean showMessageBox(Shell parent, String message, MessageType messageType, + Logger logger, Throwable exception) { + if (logger != null) + logger.log(messageType.logPriority, message, exception); + if (exception != null) + message += "\n\n" + exception.getClass().getSimpleName() + " (Siehe Logdatei)"; + MessageBox box = new MessageBox(parent, messageType.style); + box.setMessage(message); + box.setText(messageType.title); + int ret = box.open(); + return ret == SWT.OK || ret == SWT.RETRY || ret == SWT.YES; + } + + /** + * Run the GUI mainloop as long as a window exists. This method does not + * return. + */ + public static void mainloop() { + do { + Iterator it = shells.iterator(); + while (it.hasNext()) { + if (it.next().isDisposed()) + it.remove(); + } + if (!display.readAndDispatch()) + display.sleep(); + } while (!shells.isEmpty()); + display.dispose(); + System.exit(exitCode); + } + + /** + * Exit application - dispose all shells, so mainloop will terminate. + * + * @param code + */ + public static void exit(int code) { + exitCode = code; + asyncExec(new Runnable() { + @Override + public void run() { + for (Shell shell : shells) { + shell.dispose(); + } + } + }); + } + + /** + * Wrapper to get a new shell. This adds the shell to the list of shells, + * which we need to determine whether the app should still be running. + * + * @param style the style of the {@link Shell} + * @return a new {@link Shell} that has no other {@link Shell} as its + * parent. + */ + public static Shell newShell(int style) { + Shell shell = new Shell(display, style); + shells.add(shell); + return shell; + } + + /** + * Wrapper to get a new shell that is a child of another shell. This adds + * the shell to the list of shells, which we need to determine whether the + * app should still be running. + * + * @param parent the parent {@link Shell} + * @param style the style of the {@link Shell} + * @return a new {@link Shell} that has no other {@link Shell} as its + * parent. + */ + public static Shell newShell(Shell parent, int style) { + Shell shell = new Shell(parent, style); + shells.add(shell); + return shell; + } + +} 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 07cfd292..c7135d66 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/MainWindow.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/MainWindow.java @@ -6,8 +6,6 @@ import java.util.concurrent.ConcurrentHashMap; import org.apache.log4j.Logger; import org.eclipse.swt.SWT; -import org.eclipse.swt.events.DisposeEvent; -import org.eclipse.swt.events.DisposeListener; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.layout.GridData; @@ -19,9 +17,8 @@ import org.eclipse.swt.widgets.Menu; import org.eclipse.swt.widgets.MenuItem; import org.eclipse.swt.widgets.Shell; import org.openslx.dozmod.Config; +import org.openslx.dozmod.gui.Gui.GuiCallable; import org.openslx.dozmod.gui.helper.CompositePage; -import org.openslx.dozmod.gui.helper.Gui; -import org.openslx.dozmod.gui.helper.Gui.GuiCallable; import org.openslx.dozmod.gui.helper.MessageType; import org.openslx.dozmod.gui.window.DisclaimerWindow; import org.openslx.dozmod.gui.window.ImageListWindow; @@ -31,12 +28,14 @@ import org.openslx.dozmod.gui.window.VirtualizerNoticeWindow; import org.openslx.dozmod.thrift.Session; import org.openslx.thrifthelper.ThriftManager; import org.openslx.thrifthelper.ThriftManager.ErrorCallback; +import org.openslx.util.QuickTimer; public abstract class MainWindow { private final static Logger LOGGER = Logger.getLogger(MainWindow.class); private static final Shell mainShell; + private static CompositePage currentPage; private static final Map, CompositePage> pages = new ConcurrentHashMap<>(); @@ -61,7 +60,8 @@ public abstract class MainWindow { if (currentPage == null) { showMessageBox("Tried to show unknown page " + clazz.getSimpleName(), MessageType.ERROR, LOGGER, null); - System.exit(1); + Gui.exit(1); + return; } // sets the starting preferred size. @@ -72,8 +72,12 @@ public abstract class MainWindow { } /** + * * @param clazz Class to open as a popup over the main window. * MUST be a subclass of Composite. + * @param modal modal mode - other windows will be blocked until this popup + * is closed + * @param noclose don't allow closing the popup via the (X) in the title bar */ public static void openPopup(Class clazz, boolean modal, boolean noclose) { int style = SWT.TITLE | SWT.BORDER | SWT.RESIZE; @@ -81,7 +85,7 @@ public abstract class MainWindow { style |= SWT.APPLICATION_MODAL; if (!noclose) style |= SWT.CLOSE; - Shell dialogShell = new Shell(mainShell, style); + Shell dialogShell = Gui.newShell(mainShell, style); // populate dialogShell dialogShell.setLayout(new GridLayout(1, false)); LOGGER.debug(clazz.getDeclaredClasses()); @@ -113,14 +117,14 @@ public abstract class MainWindow { } /** - * Initialises the GUI by creating the main window, adding the menu and + * Initializes the GUI by creating the main window, adding the menu and * creating the login mask as the first content window. * Further sets up the global thrift error callback to catch any * connection errors during the communication with the servers. */ static { // init SWT stuff - mainShell = new Shell(Gui.display, SWT.SHELL_TRIM | SWT.CENTER); + mainShell = Gui.newShell(SWT.SHELL_TRIM | SWT.CENTER); // Catch the close button (X) mainShell.addListener(SWT.Close, new Listener() { @@ -163,16 +167,10 @@ public abstract class MainWindow { Gui.display.addFilter(SWT.KeyDown, new Listener() { @Override public void handleEvent(Event event) { - if (event.character == 17) // Ctrl-Q = Quit + if (event.character == 17) { // Ctrl-Q = Quit askApplicationQuit(); - } - }); - - mainShell.addDisposeListener(new DisposeListener() { - - @Override - public void widgetDisposed(DisposeEvent e) { - askApplicationQuit(); + event.doit = false; + } } }); @@ -203,24 +201,16 @@ public abstract class MainWindow { } } - /** - * Run the GUI mainloop as long as the main window exists. - */ - public static void mainloop() { - while (!mainShell.isDisposed()) { - if (!Gui.display.readAndDispatch()) - Gui.display.sleep(); - } - } - /** * Request application quit. Will show a message box asking the user for * confirmation. */ protected static void askApplicationQuit() { // TODO: Only ask if an upload or download is running,, wizard is open etc.. - if (showMessageBox("Are you sure you want to quit?", MessageType.QUESTION_YESNO, null, null)) - System.exit(0); + if (showMessageBox("Are you sure you want to quit?", MessageType.QUESTION_YESNO, null, null)) { + QuickTimer.cancel(); + Gui.exit(0); + } } /** @@ -300,4 +290,8 @@ public abstract class MainWindow { return Gui.showMessageBox(mainShell, message, messageType, logger, exception); } + public static void open() { + mainShell.open(); + } + } diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/helper/Gui.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/helper/Gui.java deleted file mode 100644 index 04b9ed2b..00000000 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/helper/Gui.java +++ /dev/null @@ -1,193 +0,0 @@ -package org.openslx.dozmod.gui.helper; - -import java.util.concurrent.atomic.AtomicReference; - -import org.apache.log4j.Logger; -import org.eclipse.swt.SWT; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.graphics.Rectangle; -import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.MessageBox; -import org.eclipse.swt.widgets.Monitor; -import org.eclipse.swt.widgets.Shell; - -public class Gui { - - private static final Logger LOGGER = Logger.getLogger(Gui.class); - - /** - * The one and only display to use throughout the application - */ - public static final Display display = new Display(); - - /** - * Center the given shell on the {@link Monitor} it is displayed on. - * - * @param shell Some shell - */ - public static void centerShell(Shell shell) { - Monitor activeMonitor = getMonitorFromRectangle(shell.getBounds(), true); - Rectangle bounds = activeMonitor.getClientArea(); - Rectangle rect = shell.getBounds(); - int x = bounds.x + (bounds.width - rect.width) / 2; - int y = bounds.y + (bounds.height - rect.height) / 2; - shell.setLocation(x, y); - } - - /** - * Make sure the given shell fits the {@link Monitor} it is displayed on. - * - * @param shell Some shell - */ - public static void limitShellSize(Shell shell) { - Monitor activeMonitor = getMonitorFromRectangle(shell.getBounds(), true); - Rectangle bounds = activeMonitor.getClientArea(); - Rectangle rect = shell.getBounds(); - boolean changed = false; - if (rect.width + 20 > bounds.width) { - rect.width = bounds.width - 20; - changed = true; - } - if (rect.height + 20 > bounds.height) { - rect.height = bounds.height - 20; - changed = true; - } - if (changed) { - shell.setSize(rect.width, rect.height); - rect = shell.getBounds(); - } - changed = false; - if (rect.x + rect.width >= bounds.x + bounds.width) { - rect.x = 5; - changed = true; - } - if (rect.y + rect.height >= bounds.y + bounds.height) { - rect.y = 5; - changed = true; - } - if (changed) { - shell.setLocation(rect.x, rect.y); - } - } - - /** - * Get the {@link Monitor} which the given {@link Point} lies in. - * - * @param point The point in question - * @param defaultToPrimary if no monitor matches the check, return the - * primary monitor if true, null otherwise - * @return the {@link Monitor} - */ - public static Monitor getMonitorFromPoint(Point point, boolean defaultToPrimary) { - Monitor[] monitors = display.getMonitors(); - for (Monitor monitor : monitors) { - Rectangle bounds = monitor.getBounds(); - if (bounds.contains(point)) - return monitor; - } - if (defaultToPrimary) - return display.getPrimaryMonitor(); - return null; - } - - /** - * Get the {@link Monitor} which most of the given rectangle overlaps. - * - * @param rect The rectangle to check - * @param defaultToPrimary if no monitor matches the check, return the - * primary monitor if true, null otherwise - * @return the {@link Monitor} - */ - public static Monitor getMonitorFromRectangle(Rectangle rect, boolean defaultToPrimary) { - // Make sure rectangle is in bounds. This is not completely accurate - // in case there are multiple monitors that have different resolutions. - Rectangle bounds = display.getBounds(); - if (rect.x + rect.width >= bounds.x + bounds.width) { - rect.width -= (rect.x + rect.width) - (bounds.x + bounds.width); - if (rect.width < 1) - rect.width = 1; - } - if (rect.y + rect.height >= bounds.y + bounds.height) { - rect.height -= (rect.y + rect.height) - (bounds.y + bounds.height); - if (rect.height < 1) - rect.height = 1; - } - if (rect.x < bounds.x) { - rect.width -= bounds.x - rect.x; - rect.x = bounds.x; - } - if (rect.y < bounds.y) { - rect.height -= bounds.y - rect.y; - rect.y = bounds.y; - } - // Now just use the same code as *FromPoint by using the rectangle's center - return getMonitorFromPoint(new Point(rect.x + rect.width / 2, rect.y + rect.height / 2), - defaultToPrimary); - } - - /** - * Run given task in the GUI thread, blocking the calling thread until the - * task is done. - * - * @param task Task to run - * @return return value of the task - */ - public static T syncExec(final GuiCallable task) { - final AtomicReference instance = new AtomicReference<>(); - display.syncExec(new Runnable() { - @Override - public void run() { - try { - instance.set(task.run()); - } catch (Throwable e) { - LOGGER.warn("syncExec failed!", e); - } - } - }); - return instance.get(); - } - - /** - * Run given task as soon as possible in the GUI thread, but don't block - * calling thread. - * - * @param task Task to run - */ - public static void asyncExec(final Runnable task) { - display.asyncExec(task); - } - - /** - * Pretty much the same as Callable, but no exceptions are allowed. - * - * @param return value - */ - public static interface GuiCallable { - T run(); - } - - /** - * Generic helper to show a message box to the user, and optionally log the - * message to the log file. - * - * @param parent parent shell this message box belongs to - * @param message Message to display. Can be multiline. - * @param messageType Type of message (warning, information) - * @param logger Logger instance to log to. Can be null. - * @param exception Exception related to this message. Can be null. - * @return true if OK, YES or RETRY was clicked, false for CANCEL or NO - */ - public static boolean showMessageBox(Shell parent, String message, MessageType messageType, - Logger logger, Throwable exception) { - if (logger != null) - logger.log(messageType.logPriority, message, exception); - if (exception != null) - message += "\n\n" + exception.getClass().getSimpleName() + " (Siehe Logdatei)"; - MessageBox box = new MessageBox(parent, messageType.style); - box.setMessage(message); - box.setText(messageType.title); - int ret = box.open(); - return ret == SWT.OK || ret == SWT.RETRY || ret == SWT.YES; - } - -} diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageListWindow.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageListWindow.java index 0aaa81f3..23acd65a 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageListWindow.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageListWindow.java @@ -16,8 +16,8 @@ import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.widgets.Shell; import org.openslx.bwlp.thrift.iface.ImagePermissions; import org.openslx.bwlp.thrift.iface.ImageSummaryRead; +import org.openslx.dozmod.gui.Gui; import org.openslx.dozmod.gui.MainWindow; -import org.openslx.dozmod.gui.helper.Gui; import org.openslx.dozmod.gui.helper.ImageListComparator; import org.openslx.dozmod.gui.helper.ImageListFilter; import org.openslx.dozmod.gui.helper.MessageType; 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 568954c1..8066c599 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 @@ -21,8 +21,8 @@ import org.openslx.dozmod.authentication.EcpAuthenticator; import org.openslx.dozmod.authentication.ShibbolethEcp; import org.openslx.dozmod.authentication.ShibbolethEcp.ReturnCode; import org.openslx.dozmod.authentication.TestAccountAuthenticator; +import org.openslx.dozmod.gui.Gui; import org.openslx.dozmod.gui.MainWindow; -import org.openslx.dozmod.gui.helper.Gui; import org.openslx.dozmod.gui.helper.MessageType; import org.openslx.dozmod.gui.window.layout.LoginWindowLayout; import org.openslx.dozmod.thrift.OrganizationCache; diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImageListWindowLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImageListWindowLayout.java index bccbb509..aa50a425 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImageListWindowLayout.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/ImageListWindowLayout.java @@ -14,8 +14,8 @@ import org.eclipse.swt.widgets.Group; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.Text; +import org.openslx.dozmod.gui.Gui; import org.openslx.dozmod.gui.helper.CompositePage; -import org.openslx.dozmod.gui.helper.Gui; import org.openslx.dozmod.gui.helper.ImageListFilter; public abstract class ImageListWindowLayout extends CompositePage { diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LoginWindowLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LoginWindowLayout.java index 7d637b37..544e84bb 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LoginWindowLayout.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LoginWindowLayout.java @@ -12,7 +12,7 @@ import org.eclipse.swt.widgets.Group; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Text; -import org.openslx.dozmod.gui.helper.Gui; +import org.openslx.dozmod.gui.Gui; public abstract class LoginWindowLayout extends Composite { diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/VirtualizerNoticeWindowLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/VirtualizerNoticeWindowLayout.java index 7d2a1aa6..ef6818d7 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/VirtualizerNoticeWindowLayout.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/VirtualizerNoticeWindowLayout.java @@ -9,7 +9,7 @@ import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Shell; -import org.openslx.dozmod.gui.helper.Gui; +import org.openslx.dozmod.gui.Gui; public abstract class VirtualizerNoticeWindowLayout extends Composite { private final String title = "Hinweis VMWare Player"; diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageMetaDataPage.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageMetaDataPage.java index 8c0d5cc5..5012fdb9 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageMetaDataPage.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageMetaDataPage.java @@ -12,7 +12,7 @@ import org.eclipse.swt.widgets.Composite; import org.openslx.bwlp.thrift.iface.ImagePermissions; import org.openslx.bwlp.thrift.iface.OperatingSystem; import org.openslx.bwlp.thrift.iface.ShareMode; -import org.openslx.dozmod.gui.helper.Gui; +import org.openslx.dozmod.gui.Gui; import org.openslx.dozmod.gui.wizard.layout.ImageMetaDataPageLayout; import org.openslx.dozmod.state.UploadWizardState; import org.openslx.dozmod.thrift.MetaDataCache; diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageUploadPage.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageUploadPage.java index e0838031..ac92ec4a 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageUploadPage.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageUploadPage.java @@ -14,8 +14,8 @@ import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.FileDialog; import org.openslx.dozmod.Config; +import org.openslx.dozmod.gui.Gui; import org.openslx.dozmod.gui.MainWindow; -import org.openslx.dozmod.gui.helper.Gui; import org.openslx.dozmod.gui.helper.MessageType; import org.openslx.dozmod.gui.wizard.layout.ImageUploadPageLayout; import org.openslx.dozmod.state.UploadWizardState; diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/util/ResourceLoader.java b/dozentenmodul/src/main/java/org/openslx/dozmod/util/ResourceLoader.java index 1fd705c1..ca48e55b 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/util/ResourceLoader.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/util/ResourceLoader.java @@ -9,7 +9,7 @@ import org.eclipse.swt.graphics.Font; import org.eclipse.swt.graphics.GC; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.graphics.ImageData; -import org.openslx.dozmod.gui.helper.Gui; +import org.openslx.dozmod.gui.Gui; /** * Helper class for loading resources. This should be error safe loaders with a -- cgit v1.2.3-55-g7522