Package org.bidib.wizard.utils
Class WindowUtils
- java.lang.Object
-
- org.bidib.wizard.utils.WindowUtils
-
public class WindowUtils extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWindowUtils.WindowPosFlags
-
Constructor Summary
Constructors Constructor Description WindowUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidbringWindowToFront(Window window)Brings the provided window to the front.static voidcenterOnCurrentScreen(Component parent, Component view)Center the view on the current screen of the parent component.static RectanglegetMaximumScreenBounds()static InsetsgetScreenInsets(Window windowOrNull)getScreenInsets, This returns the insets of the screen, which are defined by any task bars that have been set up by the user.static RectanglegetScreenTotalArea(Window windowOrNull)getScreenTotalArea, This returns the total area of the screen.static RectanglegetScreenWorkingArea(Window windowOrNull)getScreenWorkingArea, This returns the working area of the screen.static booleanisValidScreenLocation(Rectangle location)static booleansendToTheTop(com.sun.jna.Pointer pointer)Move the window to the top of the z-order.static booleansendToTheTopWin32(com.sun.jna.Pointer pointer)Move the window to the top of the z-order.
-
-
-
Method Detail
-
bringWindowToFront
public static void bringWindowToFront(Window window)
Brings the provided window to the front.- Parameters:
window- the window instance to bring to front
-
sendToTheTop
public static boolean sendToTheTop(com.sun.jna.Pointer pointer)
Move the window to the top of the z-order.- Parameters:
pointer- The pointer to the window to bring into background.- Returns:
- true if successful.
-
sendToTheTopWin32
public static boolean sendToTheTopWin32(com.sun.jna.Pointer pointer)
Move the window to the top of the z-order.- Parameters:
pointer- The pointer to the window to bring into background.- Returns:
- true if the window could placed set on top.
-
isValidScreenLocation
public static boolean isValidScreenLocation(Rectangle location)
-
getMaximumScreenBounds
public static Rectangle getMaximumScreenBounds()
-
getScreenInsets
public static Insets getScreenInsets(Window windowOrNull)
getScreenInsets, This returns the insets of the screen, which are defined by any task bars that have been set up by the user. This function accounts for multi-monitor setups. If a window is supplied, then the the monitor that contains the window will be used. If a window is not supplied, then the primary monitor will be used.
-
getScreenWorkingArea
public static Rectangle getScreenWorkingArea(Window windowOrNull)
getScreenWorkingArea, This returns the working area of the screen. (The working area excludes any task bars.) This function accounts for multi-monitor setups. If a window is supplied, then the the monitor that contains the window will be used. If a window is not supplied, then the primary monitor will be used.
-
getScreenTotalArea
public static Rectangle getScreenTotalArea(Window windowOrNull)
getScreenTotalArea, This returns the total area of the screen. (The total area includes any task bars.) This function accounts for multi-monitor setups. If a window is supplied, then the the monitor that contains the window will be used. If a window is not supplied, then the primary monitor will be used.
-
-