Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.util.swing
Class ScreenInformation

java.lang.Object
  extended by net.java.sip.communicator.util.swing.ScreenInformation

public class ScreenInformation
extends Object

A class which reads the screen bounds and provides this information.

Author:
Ingo Bauersachs

Constructor Summary
ScreenInformation()
           
 
Method Summary
static Rectangle getScreenBounds()
          Calculates the bounding box of all available screens.
static boolean isTitleOnScreen(Rectangle window)
          Checks whether the top edge of the rectangle is contained in any of the available screens.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScreenInformation

public ScreenInformation()
Method Detail

getScreenBounds

public static Rectangle getScreenBounds()
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.

Returns:
A polygon of the usable screen area.

isTitleOnScreen

public static boolean isTitleOnScreen(Rectangle window)
Checks whether the top edge of the rectangle is contained in any of the available screens.

Parameters:
window - The bounding box of the window.
Returns:
True when the top edge is in a visible screen area; false otherwise

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.