JDK-4262946 : API Change: remove constructors for ownerless Windows in java.awt.Window
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.2.2,1.3.0
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris_7,windows_98
  • CPU: other,x86,sparc
  • Submitted: 1999-08-17
  • Updated: 1999-08-27
  • Resolved: 1999-08-27
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.
Other
1.3.0 kestrelFixed
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Description
This RFE replaces RFE 4261172.

CCC proposal 4131642 for Kestrel included two new public constructors in the java.awt.Window class that allowed Windows to be created without specifying an owning Window or Frame. These are the public Window() and public Window(GraphicsConfiguration) constructors.

* The no-argument constructor was to be used for creating Windows displayable in full-screen mode.  Here's the relevant snippet from the original request:

          java.awt.Window:
               /**
                * Create a window in fullscreen mode in the default
                * GraphicsConfiguration.
                */
               public Window()

* The constructor taking only a GraphicsConfiguration reference was added for multi-screen support, and to match the JWindow API.
	  
          /**
           * Construct a new invisible window in full screen
           * mode with the
           * specified GraphicsConfiguration.
           * @param gc the GraphicsConfiguration that is used
           * to construct the new Window with. If gc is null,
           * the system default GraphicsConfiguration is assumed.
           * @exception IllegalArgumentException if gc is not from
           * a screen device.
           * @since 1.3
           */
          public Window(GraphicsConfiguration gc)
       
There are several compelling reasons to remove these constructors from the public API in Kestrel.
       
* Ownerless Windows were not part of the original spec for the Window class.  Attempted creation of unowned Windows has lead to bug 4256840, and could produce other unforseen bugs.
         
* On a related note, the static method in java.awt.Frame, getFrames() returns a list of all top-level entities (Frames) in the application.  In combination with the Window method getOwnedWindows(), it is possible to obtain the entire tree of GUI components in a Java app.  Adding the ability to create Windows which are not owned by any Frame will prevent this tree from being available through Frame.getFrames().  To preserve this functionality, a method would need to be added to Window such as getWindows() to provide access to these unowned Windows as well as the Frames from getFrames().  The getFrames() method should also be deprecated in this case.  This all results in further changes to the public API.
          
* Upon further analysis, there are alternate ways of adding full-screen support to AWT - adding a java.awt.Window.setFullscreenMode(boolean), for instance.  Implementing full-screen Windows in this way would not affect the Window's ownership.  Considering this, the original need for  the no-arg Window() constructor is greatly diminished.
     
* Removal of these constructors does not result in any loss of functionality.  Borderless Windows  can still be created with the present Window(Window owner) and Window(Frame owner) constructors.  Windows requiring a specific GraphicsConfiguration (as needed by Java3D) are constructed with the new Window(Window owner, GraphicsConfiguration) constructor.
     	
* Again, this is not a modification to the current public API (1.2), but a modification to another change request for Kestrel.

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: kestrel FIXED IN: kestrel INTEGRATED IN: kestrel
14-06-2004

EVALUATION This needs to be completed for kestrel-FCS. brent.christian@eng 1999-08-16 Done. Also added a super() call in Frame(String title, GraphicsConfiguration gc), replacing some duplicate code in Window(GraphicsConfigurtion gc) and streamling the constructor chain a little. brent.christian@eng 1999-08-24
24-08-1999