public class WDDMan
extends java.lang.Object
Constructor and Description |
---|
WDDMan()
The constructor WindowsHandler() detects the operating system from
System.getProperty("os.name") and initializes class variables.
|
WDDMan(OperatingSystem operatingSystem)
The constructor WindowsHandler(OperatingSystem operatingSystem)
initializes class variables according to operatingSystem.
|
Modifier and Type | Method and Description |
---|---|
boolean |
changeCurrentDesktopByName(java.lang.String name)
The function changeCurrentDesktopByName(String name) changes the current
desktop according to the parameter name.
|
boolean |
changeCurrentDesktopByPosition(int position)
The function changeCurrentDesktopByPosition(int position) changes the
current desktop according to the parameter position.
|
Desktop |
findDesktopByName(java.lang.String name)
The function findDesktopByName(String name) finds and returns a desktop
with the same title as the parameter title (case sensitive).
|
Desktop |
findDesktopByPosition(int position)
The function findDesktopByPosition(int position) finds and returns a
desktop with the same position as the parameter position.
|
Desktop |
getCurrentDesktop()
The function returns the current desktop
|
int |
getDesktopCount()
The function returns the number of desktops
|
java.util.List<Desktop> |
getDesktops()
The function getDesktops() returns a List of all current desktops.
|
java.util.List<Display> |
getDisplays()
The function getDesktops() returns a List of all current displays.
|
int |
getDisplaysCount()
The function getDisplaysCount() returns the number of displays.
|
OperatingSystem |
getRunningOperatingSystem()
The function getRunningOperatingSystem() returns the type of used
operating system.
|
int |
getScreenHeight()
The function getScreenWidth() returns the height of the display area.
|
int |
getScreenWidth()
The function getScreenWidth() returns the width of the display area.
|
java.util.List<Window> |
getVisibleWindows()
The function getWindows() returns a List of all current visible windows.
|
Window |
getWindowByTitle(java.lang.String title)
The function getWindowByTitle() finds and returns a window with the same
title as the parameter title (case sensitive).
|
java.util.List<Window> |
getWindows()
The function getWindows() returns a List of all current windows.
|
java.util.List<Window> |
getWindowsByTitle(java.lang.String title)
The function getWindowsByTitle() finds and returns a List of all windows
with the same title as the parameter title (case sensitive).
|
void |
moveWindowToDesktop(Window window,
Desktop desktop)
The function moveWindowToDesktop(Window window, Desktop desktop) moves
the window window to the desktop desktop.
|
public WDDMan() throws UnsupportedOperatingSystemException
UnsupportedOperatingSystemException
- when using an unsupported
operating system or the detected system is nullpublic WDDMan(OperatingSystem operatingSystem)
operatingSystem
- the version of the operating system that will be
usedpublic java.util.List<Window> getWindows() throws WDDManException
WDDManException
- when there is an error; the message contains a
description of the errorpublic java.util.List<Window> getVisibleWindows() throws WDDManException
WDDManException
- when there is an error; the message contains a
description of the errorpublic Window getWindowByTitle(java.lang.String title) throws WDDManException
title
- the title of the sought windowWDDManException
- when there is an error; the message contains a
description of the errorpublic java.util.List<Window> getWindowsByTitle(java.lang.String title) throws WDDManException
title
- the title of the sought windowsWDDManException
- when there is an error; the message contains a
description of the errorpublic java.util.List<Desktop> getDesktops() throws WDDManException
WDDManException
- when there is an error; the message contains a
description of the errorpublic int getDesktopCount() throws WDDManException
WDDManException
- when there is an error; the message contains a
description of the errorpublic Desktop getCurrentDesktop() throws WDDManException
WDDManException
- when there is an error; the message contains a
description of the errorpublic Desktop findDesktopByName(java.lang.String name) throws WDDManException
name
- the name of the sought desktopWDDManException
- when there is an error; the message contains a
description of the errorpublic Desktop findDesktopByPosition(int position) throws WDDManException
position
- the position of the sought desktopWDDManException
- when there is an error; the message contains a
description of the errorpublic boolean changeCurrentDesktopByPosition(int position) throws WDDManException
position
- the intended positionWDDManException
- when there is an error; the message contains a
description of the errorpublic boolean changeCurrentDesktopByName(java.lang.String name) throws WDDManException
name
- the intended nameWDDManException
- when there is an error; the message contains a
description of the errorpublic void moveWindowToDesktop(Window window, Desktop desktop) throws WDDManException
window
- the window to be moveddesktop
- the target desktopWDDManException
- when there is an error; the message contains a
description of the errorpublic int getScreenWidth() throws WDDManException
WDDManException
- when there is an error; the message contains a
description of the errorpublic int getScreenHeight() throws WDDManException
WDDManException
- when there is an error; the message contains a
description of the errorpublic int getDisplaysCount() throws WDDManException
WDDManException
- when there is an error; the message contains a
description of the errorpublic java.util.List<Display> getDisplays() throws WDDManException
WDDManException
- when there is an error; the message contains a
description of the errorpublic OperatingSystem getRunningOperatingSystem()