@Override public void setWindowMask(Component c, final Shape shape) { if (c instanceof Window) { Window w = (Window)c; OSXMaskingContentPane content = installMaskingPane(w); content.setMask(shape); setBackgroundTransparent(w, shape != MASK_NONE, "setWindowMask"); } else { // not yet implemented } }
/** * 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(); }
@Override public void removeNotify() { super.removeNotify(); disposeBackingStore(); } @Override
public void setTransparent(boolean transparent) { super.setTransparent(transparent); if (!transparent) { disposeBackingStore(); } } protected void paintDirect(BufferedImage buf, Rectangle bounds) {
/** Indicate a window can have a global alpha setting. */ public static boolean isWindowAlphaSupported() { return getInstance().isWindowAlphaSupported(); }
/** * 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); }
/** * 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); }
/** * 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); } }
/** * 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); }
public void setWindowMask(Component c, final Shape shape) { if (c instanceof Window) { Window w = (Window)c; OSXMaskingContentPane content = installMaskingPane(w); content.setMask(shape); setBackgroundTransparent(w, shape != MASK_NONE, "setWindowMask"); } else { // not yet implemented } }
/** * Returns a {@link GraphicsConfiguration} comptible with alpha * compositing. */ public static GraphicsConfiguration getAlphaCompatibleGraphicsConfiguration() { return getInstance().getAlphaCompatibleGraphicsConfiguration(); }
public void removeNotify() { super.removeNotify(); disposeBackingStore(); } public void setTransparent(boolean transparent) {
@Override public void setTransparent(boolean transparent) { super.setTransparent(transparent); if (!transparent) { disposeBackingStore(); } } @Override
/** Indicate a window can have a global alpha setting. */ public static boolean isWindowAlphaSupported() { return getInstance().isWindowAlphaSupported(); }
/** * 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); }
/** * 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, Icon 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, Icon mask) { getInstance().setWindowMask(w, mask); }