JDK-6594131 : Provide a non-public API to support translucent windows
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 6u4
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2007-08-17
  • Updated: 2017-05-19
  • Resolved: 2008-01-24
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6u10Resolved
Related Reports
Duplicate :  
Relates :  
Description
The JavaFX needs to support translucent top-level windows. As it's going to be implemented on top of the JDK6, the 6u4 release needs this feature integrated. It is supposed to be a non-public API like the following:

**********************************************************
package com.sun.awt;

import java.awt.Window;

public class AWTUtilities {
   public setOpacity(Window window, int opacity);
}
**********************************************************

Comments
EVALUATION It seems that using a float to represent the level of opacity will be more consistent with the existing APIs. Also a boolean isTranslucencySupported() method may be useful. The logic of the method is as follows: 1. MS Windows platform: Return true if we're running Windows 2000 or later (the support for layered windows is required to set the opacity value). 2. X11 platform: Check the _NET_SUPPORTED property on the root window. If it contains the _NET_WM_WINDOW_OPACITY atom, then the compositing manager seems to support translucency.
17-09-2007

SUGGESTED FIX http://sa.sfbay.sun.com/projects/awt_data/6u5/6594131/
17-09-2007

EVALUATION The following API introduced: ********************************************************** package com.sun.awt; import java.awt.Window; public class AWTUtilities { public static void setWindowOpacity(Window window, double opacity); public static double getWindowOpacity(Window window); } ********************************************************** Also, the following method is added: public void java.awt.peer.WindowPeer.setOpacity(double opacity);
29-08-2007