public class WindowInfo
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getClassName()
Returns the window class name.
|
long |
getHwnd()
Returns the window handle.
|
int |
getStyle()
Returns the window style.
|
static java.util.Collection<WindowInfo> |
getTopLevelWindows(long processId)
Returns all visible top level windows of the process with the supplied process id.
|
java.lang.String |
getWindowTitle()
Returns the window title.
|
static boolean |
isTabletMode()
Checks if Windows 10 is currently used in tablet mode.
|
java.lang.String |
toString() |
static boolean |
waitForMaximizableWindow(java.io.File executablePath,
long timeout,
java.util.concurrent.TimeUnit unit)
Wait until a process with the given path displays a maximizable window.
|
public static java.util.Collection<WindowInfo> getTopLevelWindows(long processId)
processId
- the process idpublic static boolean isTabletMode()
true
if tablet mode is activatedpublic static boolean waitForMaximizableWindow(java.io.File executablePath, long timeout, java.util.concurrent.TimeUnit unit)
executablePath
- the executable pathtimeout
- a timeout value or 0 if no timeout should occurunit
- the unit of the timeout valuetrue
if a process with the given executable path was found that displays a maximizable window within the timeout period, false
otherwise.public long getHwnd()
public int getStyle()
GetWindowLongPtr
and GWL_STYLE
.public java.lang.String getClassName()
public java.lang.String getWindowTitle()
public java.lang.String toString()
toString
in class java.lang.Object