/** * 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))); }
/** * 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))); }