JDK-6234439 : Ambigious spec for Frame.setExtendedState()
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.4.0,5.0,6
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris_2.5,solaris_2.6,solaris_9
  • CPU: sparc
  • Submitted: 2005-03-01
  • Updated: 2017-05-16
  • Resolved: 2011-05-17
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 7
7 b21Fixed
Related Reports
Duplicate :  
Duplicate :  
Duplicate :  
Description
The current spec for Frame.setExtendedState() states:

   Note that if the state is not supported on a given platform, nothing will
   happen. The application may determine if a specific state is available via
   the java.awt.Toolkit#isFrameStateSupported(int state)  method.

It's unclear what "nothing will happen" mean - in particular, whether
the value of the state property (as returned by getExtendedState()) will
also not change if the particular state is unsupported.

Also, it seems that the @see link to that Toolkit method is incorrect.

###@###.### 2005-03-01 18:13:29 GMT

Additionally, according to Denis, only the negative result of the Toolkit check
is 100% correct; if isFrameStateSupported() returns true, the window management
system may still not support the requested state. This should also be made clear
in the spec.

Comments
EVALUATION CR 4977351 also requires spec clarification. Worth fixing together.
07-06-2007

EVALUATION It would be worth fixing the CR 4633463 at the same time.
07-06-2007

EVALUATION metacity doesn't follow the wm spec in case _NET_WM_ALLOWED_ACTIONS protocol. It says that it supports it, but most of windows do not have it sets. There is a bug against metacity (http://bugzilla.gnome.org/show_bug.cgi?id=115247) which was/will be fixed in metacity >= 2.19.3
21-05-2007

EVALUATION The link to the Toolkit.isFrameStateSupported() seems to be correct at this time.
17-05-2007

EVALUATION This method does nothing and returns: public synchronized void setExtendedState(int state) { if ( !isFrameStateSupported( state ) ) { return; } Extended state of the Frame will not change. ###@###.### 2005-03-09 10:07:07 GMT Before setExtendedState was added, this API followed "beans" pattern - you get what you set. Right now, both setState and setExtendedState first check if the state is supported, and then set it. "Nothing will happen" in this case means that neither property value nor state of the Frame is changing. This applies both to setState and setExtendedState. The comments need to be updated for both methods ###@###.### 2005-03-31 16:50:15 GMT
09-03-2005