/** * Applies the given mask to the given window. Does nothing if the * operation is not supported. The mask is treated as a bitmap and * ignores transparency. */ public static void setWindowMask(Window w, Shape mask) { getInstance().setWindowMask(w, mask); }
/** * Applies the given mask to the given window. Does nothing if the * operation is not supported. The mask is treated as a bitmap and * ignores transparency. */ public static void setWindowMask(Window w, Shape mask) { getInstance().setWindowMask(w, mask); }
/** * Returns a {@link GraphicsConfiguration} comptible with alpha * compositing. */ public static GraphicsConfiguration getAlphaCompatibleGraphicsConfiguration() { return getInstance().getAlphaCompatibleGraphicsConfiguration(); }
/** * Detects the size of an icon. * * @param hIcon * The icon handle type. * @return Either the requested icon's dimension or an {@link Dimension} * instance of {@code (0, 0)}. */ public static Dimension getIconSize(final HICON hIcon) { return getInstance().getIconSize(hIcon); }
/** * Applies the given mask to the given heavyweight component. Does nothing * if the operation is not supported. The mask is treated as a bitmap and * ignores transparency. */ public static void setComponentMask(Component c, Shape mask) { getInstance().setWindowMask(c, mask); }
/** * Obtains the set icon for the window associated with the specified * window handle. * * @param hwnd * The concerning window handle. * @return Either the window's icon or {@code null} if an error * occurred. */ public static BufferedImage getWindowIcon(final HWND hwnd) { return getInstance().getWindowIcon(hwnd); }
/** * Tries to obtain the Window's title which belongs to the specified window * handle. * * @param hwnd * The concerning window handle. * @return Either the title or an empty string of no title was found or an * error occurred. */ public static String getWindowTitle(final HWND hwnd) { return getInstance().getWindowTitle(hwnd); }
/** * Returns a {@link GraphicsConfiguration} comptible with alpha * compositing. */ public static GraphicsConfiguration getAlphaCompatibleGraphicsConfiguration() { return getInstance().getAlphaCompatibleGraphicsConfiguration(); }
/** * Applies the given mask to the given heavyweight component. Does nothing * if the operation is not supported. The mask is treated as a bitmap and * ignores transparency. */ public static void setComponentMask(Component c, Shape mask) { getInstance().setWindowMask(c, mask); }
/** * Detects the full file path of the process associated with the specified * window handle. * * @param hwnd * The concerning window handle for which the PE file path is * required. * @return The full file path of the PE file that is associated with the * specified window handle. */ public static String getProcessFilePath(final HWND hwnd) { return getInstance().getProcessFilePath(hwnd); }
/** Indicate a window can have a global alpha setting. */ public static boolean isWindowAlphaSupported() { return getInstance().isWindowAlphaSupported(); }
/** * Applies the given mask to the given window. Does nothing if the * operation is not supported. The mask is treated as a bitmap and * ignores transparency. */ public static void setWindowMask(Window w, Icon mask) { getInstance().setWindowMask(w, mask); }
/** * Requests the location and size of the window associated with the * specified window handle. * * @param hwnd * The concerning window handle. * @return The location and size of the window. */ public static Rectangle getWindowLocationAndSize(final HWND hwnd) { return getInstance().getWindowLocationAndSize(hwnd); } }
/** Indicate a window can have a global alpha setting. */ public static boolean isWindowAlphaSupported() { return getInstance().isWindowAlphaSupported(); }
/** * Applies the given mask to the given window. Does nothing if the * operation is not supported. The mask is treated as a bitmap and * ignores transparency. */ public static void setWindowMask(Window w, Icon mask) { getInstance().setWindowMask(w, mask); }
/** * Set the window to be transparent. Only explicitly painted pixels * will be non-transparent. All pixels will be composited with * whatever is under the window using their alpha values. * * On OSX, the property <code>apple.awt.draggableWindowBackground</code> * must be set to its final value <em>before</em> the heavyweight peer for * the Window is created. Once {@link Component#addNotify} has been * called on the component, causing creation of the heavyweight peer, * changing this property has no effect. * @see <a href="http://developer.apple.com/technotes/tn2007/tn2196.html#APPLE_AWT_DRAGGABLEWINDOWBACKGROUND">Apple Technote 2007</a> */ public static void setWindowTransparent(Window w, boolean transparent) { getInstance().setWindowTransparent(w, transparent); }
/** * Set the overall window transparency. An alpha of 1.0 is fully * opaque, 0.0 fully transparent. The alpha level is applied equally * to all window pixels.<p> * NOTE: Windows requires that <code>sun.java2d.noddraw=true</code> * in order for alpha to work.<p> * NOTE: On OSX, the property * <code>apple.awt.draggableWindowBackground</code> must be set to its * final value <em>before</em> the heavyweight peer for the Window is * created. Once {@link Component#addNotify} has been called on the * component, causing creation of the heavyweight peer, changing this * property has no effect. * @see <a href="http://developer.apple.com/technotes/tn2007/tn2196.html#APPLE_AWT_DRAGGABLEWINDOWBACKGROUND">Apple Technote 2007</a> */ public static void setWindowAlpha(Window w, float alpha) { getInstance().setWindowAlpha(w, Math.max(0f, Math.min(alpha, 1f))); }
/** * Requests a list of all currently available Desktop windows. * * @param onlyVisibleWindows * Specifies whether only currently visible windows will be * considered ({@code true}). That are windows which are not * minimized. The {@code WS_VISIBLE} flag will be checked (see: * <a href= * "https://msdn.microsoft.com/de-de/library/windows/desktop/ms633530%28v=vs.85%29.aspx" * >User32.IsWindowVisible(HWND)</a>). * * @return A list with all windows and some detailed information. */ public static List<DesktopWindow> getAllWindows( final boolean onlyVisibleWindows) { return getInstance().getAllWindows(onlyVisibleWindows); }
/** * Set the window to be transparent. Only explicitly painted pixels * will be non-transparent. All pixels will be composited with * whatever is under the window using their alpha values. * * On OSX, the property <code>apple.awt.draggableWindowBackground</code> * must be set to its final value <em>before</em> the heavyweight peer for * the Window is created. Once {@link Component#addNotify} has been * called on the component, causing creation of the heavyweight peer, * changing this property has no effect. * @see <a href="http://developer.apple.com/technotes/tn2007/tn2196.html#APPLE_AWT_DRAGGABLEWINDOWBACKGROUND">Apple Technote 2007</a> */ public static void setWindowTransparent(Window w, boolean transparent) { getInstance().setWindowTransparent(w, transparent); } }
/** * Set the overall window transparency. An alpha of 1.0 is fully * opaque, 0.0 fully transparent. The alpha level is applied equally * to all window pixels.<p> * NOTE: Windows requires that <code>sun.java2d.noddraw=true</code> * in order for alpha to work.<p> * NOTE: On OSX, the property * <code>apple.awt.draggableWindowBackground</code> must be set to its * final value <em>before</em> the heavyweight peer for the Window is * created. Once {@link Component#addNotify} has been called on the * component, causing creation of the heavyweight peer, changing this * property has no effect. * @see <a href="http://developer.apple.com/technotes/tn2007/tn2196.html#APPLE_AWT_DRAGGABLEWINDOWBACKGROUND">Apple Technote 2007</a> */ public static void setWindowAlpha(Window w, float alpha) { getInstance().setWindowAlpha(w, Math.max(0f, Math.min(alpha, 1f))); }