JDK-6594127 : Provide a non-public API to support shaped 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: 2011-01-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 shaped 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;
import java.awt.Shape;

public class AWTUtilities {
   public setShape(Window window, Shape shape);
}
**********************************************************

Comments
EVALUATION The following API is proposed: /** * <b>WARNING</b>: This interface is an implementation detail and only meant * for use within the core platform. You should NOT depend upon it! This * API may change drastically between dot dot release, and it may even be * removed. * * The interface represents an API that is used by the AWTUtilities * implementation to provide the native system with a shape for a * top=level window of the given size. */ public interface Shaper { /** * Returns the shape of the window of the given size. * Note: the origin of the shape itself should be (0, 0). I.e. * the (0, 0) point of the window corresponds to the (0, 0) * point of the shape. The x and y arguments are provided for * informational purposes. These should be used only if * the shape should depend on the location of the window. */ Shape getShape(int x, int y, int width, int height); } public final class AWTUtilities { /** * Returns whether the windowing system supports changing the shape * of top-level windows. * Note that this method may sometimes return true, but the native * windowing system may still not support the concept of * shaping (due to the bugs in the windowing system). */ public static boolean isWindowShapingSupported(); /** * Returns the object implementing the Shaper interface previously * set with the call to the setWindowShaper() method. * If no shpaer has been set yet, this method returns the reference * to the default shaper object that provides a rectangular shape * of any given size. */ public static Shaper getWindowShaper(Window window); /** * Sets a shaper object for the given window. * If the shaper argument is null, this methods resets * the previously set shaper making the window rectangular. */ public static void setWindowShaper(Window window, Shaper shaper); }
21-09-2007