aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip/communicator/plugin/desktoputil
diff options
context:
space:
mode:
authorIngo Bauersachs <ingo@jitsi.org>2014-05-14 17:17:03 +0200
committerIngo Bauersachs <ingo@jitsi.org>2014-05-14 17:17:03 +0200
commit767cb91dc3dab13a60c9945b168ce04b8e5d2f53 (patch)
tree65d6aaeb6edb43376d1d55a178b1a56ed9c649f9 /src/net/java/sip/communicator/plugin/desktoputil
parentbac4d9426752ca4962527cbbc19b2e80be77abae (diff)
downloadjitsi-767cb91dc3dab13a60c9945b168ce04b8e5d2f53.zip
jitsi-767cb91dc3dab13a60c9945b168ce04b8e5d2f53.tar.gz
jitsi-767cb91dc3dab13a60c9945b168ce04b8e5d2f53.tar.bz2
Fix line endings
Diffstat (limited to 'src/net/java/sip/communicator/plugin/desktoputil')
-rw-r--r--src/net/java/sip/communicator/plugin/desktoputil/ScreenInformation.java136
1 files changed, 68 insertions, 68 deletions
diff --git a/src/net/java/sip/communicator/plugin/desktoputil/ScreenInformation.java b/src/net/java/sip/communicator/plugin/desktoputil/ScreenInformation.java
index f1e8f11..0020bb2 100644
--- a/src/net/java/sip/communicator/plugin/desktoputil/ScreenInformation.java
+++ b/src/net/java/sip/communicator/plugin/desktoputil/ScreenInformation.java
@@ -1,68 +1,68 @@
-/*
- * Jitsi, the OpenSource Java VoIP and Instant Messaging client.
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package net.java.sip.communicator.plugin.desktoputil;
-
-import java.awt.*;
-
-/**
- * A class which reads the screen bounds and provides this information.
- *
- * @author Ingo Bauersachs
- */
-public class ScreenInformation
-{
- /**
- * Calculates the bounding box of all available screens. This method is
- * highly inaccurate when screens of different sizes are used or not evenly
- * aligned. A correct implementation should generate a polygon.
- *
- * @return A polygon of the usable screen area.
- */
- public static Rectangle getScreenBounds()
- {
- final GraphicsEnvironment ge = GraphicsEnvironment
- .getLocalGraphicsEnvironment();
-
- Rectangle bounds = new Rectangle();
- for(GraphicsDevice gd : ge.getScreenDevices())
- {
- GraphicsConfiguration gc = gd.getDefaultConfiguration();
- bounds = bounds.union(gc.getBounds());
- }
- return bounds;
- }
-
- /**
- * Checks whether the top edge of the rectangle is contained in any of the
- * available screens.
- *
- * @param window The bounding box of the window.
- * @return True when the top edge is in a visible screen area; false
- * otherwise
- */
- public static boolean isTitleOnScreen(Rectangle window)
- {
- final GraphicsEnvironment ge = GraphicsEnvironment
- .getLocalGraphicsEnvironment();
-
- boolean leftInside = false;
- boolean rightInside = false;
- Point left = new Point(window.x, window.y);
- Point right = new Point(window.x, window.y + window.width);
- for(GraphicsDevice gd : ge.getScreenDevices())
- {
- GraphicsConfiguration gc = gd.getDefaultConfiguration();
- if(gc.getBounds().contains(left))
- leftInside = true;
- if(gc.getBounds().contains(right))
- rightInside = true;
- if(leftInside && rightInside)
- return true;
- }
- return leftInside && rightInside;
- }
-}
+/*
+ * Jitsi, the OpenSource Java VoIP and Instant Messaging client.
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package net.java.sip.communicator.plugin.desktoputil;
+
+import java.awt.*;
+
+/**
+ * A class which reads the screen bounds and provides this information.
+ *
+ * @author Ingo Bauersachs
+ */
+public class ScreenInformation
+{
+ /**
+ * Calculates the bounding box of all available screens. This method is
+ * highly inaccurate when screens of different sizes are used or not evenly
+ * aligned. A correct implementation should generate a polygon.
+ *
+ * @return A polygon of the usable screen area.
+ */
+ public static Rectangle getScreenBounds()
+ {
+ final GraphicsEnvironment ge = GraphicsEnvironment
+ .getLocalGraphicsEnvironment();
+
+ Rectangle bounds = new Rectangle();
+ for(GraphicsDevice gd : ge.getScreenDevices())
+ {
+ GraphicsConfiguration gc = gd.getDefaultConfiguration();
+ bounds = bounds.union(gc.getBounds());
+ }
+ return bounds;
+ }
+
+ /**
+ * Checks whether the top edge of the rectangle is contained in any of the
+ * available screens.
+ *
+ * @param window The bounding box of the window.
+ * @return True when the top edge is in a visible screen area; false
+ * otherwise
+ */
+ public static boolean isTitleOnScreen(Rectangle window)
+ {
+ final GraphicsEnvironment ge = GraphicsEnvironment
+ .getLocalGraphicsEnvironment();
+
+ boolean leftInside = false;
+ boolean rightInside = false;
+ Point left = new Point(window.x, window.y);
+ Point right = new Point(window.x, window.y + window.width);
+ for(GraphicsDevice gd : ge.getScreenDevices())
+ {
+ GraphicsConfiguration gc = gd.getDefaultConfiguration();
+ if(gc.getBounds().contains(left))
+ leftInside = true;
+ if(gc.getBounds().contains(right))
+ rightInside = true;
+ if(leftInside && rightInside)
+ return true;
+ }
+ return leftInside && rightInside;
+ }
+}