diff options
author | Simon Rettberg | 2015-07-27 18:41:02 +0200 |
---|---|---|
committer | Simon Rettberg | 2015-07-27 18:41:02 +0200 |
commit | de8cb996a0e2fc2546782a8a5944209eb0e56c14 (patch) | |
tree | 592d97079fd7f78ed40a16b613f00d1538bd71fd /dozentenmodul/src/main/java/org/openslx/dozmod/gui/Gui.java | |
parent | Merge branch 'v1.1' of git.openslx.org:openslx-ng/tutor-module into v1.1 (diff) | |
download | tutor-module-de8cb996a0e2fc2546782a8a5944209eb0e56c14.tar.gz tutor-module-de8cb996a0e2fc2546782a8a5944209eb0e56c14.tar.xz tutor-module-de8cb996a0e2fc2546782a8a5944209eb0e56c14.zip |
[client] Swing
Diffstat (limited to 'dozentenmodul/src/main/java/org/openslx/dozmod/gui/Gui.java')
-rw-r--r-- | dozentenmodul/src/main/java/org/openslx/dozmod/gui/Gui.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/Gui.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/Gui.java index 54d4ab4a..34a10ea1 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/Gui.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/Gui.java @@ -105,12 +105,12 @@ public class Gui { } /** - * Get the {@link Monitor} which the given {@link Point} lies in. + * Get the {@link GraphicsDevice} 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, <code>null</code> otherwise - * @return the {@link Monitor} + * @return the {@link GraphicsDevice} */ private static GraphicsDevice getMonitorFromPoint(GraphicsDevice[] screens, Point point, boolean defaultToPrimary) { @@ -129,12 +129,12 @@ public class Gui { } /** - * Get the {@link Monitor} which most of the given rectangle overlaps. + * Get the {@link GraphicsDevice} 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, <code>null</code> otherwise - * @return the {@link Monitor} + * @return the {@link GraphicsDevice} */ public static GraphicsDevice getMonitorFromRectangle(Rectangle rect, boolean defaultToPrimary) { // Make sure rectangle is in bounds. This is not completely accurate @@ -142,7 +142,7 @@ public class Gui { GraphicsDevice[] screens = GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices(); Rectangle bounds = new Rectangle(); for (GraphicsDevice dev : screens) { - bounds.union(dev.getDefaultConfiguration().getBounds()); + bounds = bounds.union(dev.getDefaultConfiguration().getBounds()); } LOGGER.debug("Display bounds are " + bounds.toString() + ", rect is " + rect.toString()); if (rect.x + rect.width >= bounds.x + bounds.width) { |