teamdev.jxdesktop
Class WindowManager

java.lang.Object
  extended byteamdev.jxdesktop.WindowManager

public abstract class WindowManager
extends java.lang.Object

This class defines the functions that allow retrieving a specified UI element on the screen.


Constructor Summary
protected WindowManager()
           
 
Method Summary
abstract  UIElement findWindow(java.lang.String titleName)
          Searches a window by a specified title.
abstract  UIElement getActiveWindow()
          Returns a foreground window (the window with which the user is currently working).
abstract  java.util.List getAllWindows()
          Returns the list of all top-level windows on the screen.
abstract  UIElement getDesktopWindow()
          Returns a desktop window.
abstract  UIElement getFullScreen()
          Returns the full screen window (including multiple monitors).
static WindowManager getInstance()
           
abstract  UIElement getWindowAtPoint(java.awt.Point point)
          Returns the window that contains the specified point.
abstract  void showDesktop()
          Hides all windows on desktop.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WindowManager

protected WindowManager()
Method Detail

getInstance

public static WindowManager getInstance()

getDesktopWindow

public abstract UIElement getDesktopWindow()
Returns a desktop window. The desktop window covers the entire screen. The desktop window is the area on top of which other windows are painted.

Returns:
desktop window. If the method fails - the return value is null

getActiveWindow

public abstract UIElement getActiveWindow()
Returns a foreground window (the window with which the user is currently working).

If no foreground window this method returns full screen window (see getFullScreen() method).

Returns:
foreground window. If no foreground window this method returns full screen window (see getFullScreen() method).

getAllWindows

public abstract java.util.List getAllWindows()
Returns the list of all top-level windows on the screen.

Returns:
list of all top-level windows on the screen. If the method fails, the return list is empty

getWindowAtPoint

public abstract UIElement getWindowAtPoint(java.awt.Point point)
Returns the window that contains the specified point. The method does not get the hidden or disabled window, even if the point is within the window.

Parameters:
point - the specified point
Returns:
the window that contains the specified point. If no window exists at the given point, the return value is null

getFullScreen

public abstract UIElement getFullScreen()
Returns the full screen window (including multiple monitors).

Returns:
full screen window. If the method fails, the return value is null

findWindow

public abstract UIElement findWindow(java.lang.String titleName)
Searches a window by a specified title.

Parameters:
titleName - the title of window
Returns:
the window with a specified title

showDesktop

public abstract void showDesktop()
Hides all windows on desktop.

On Windows platform such operation equals to Win+D command.
On Mac OS X platform such operation equals to F11 command.