JDK-8153522 : Update JLightweightFrame to allow non-integer (and X/Y) scales
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2016-04-05
  • Updated: 2016-12-01
  • Resolved: 2016-11-07
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 9
9 b147Fixed
Related Reports
Blocks :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
For more details see http://mail.openjdk.java.net/pipermail/awt-dev/2016-April/010976.html

 LightweightFrame needs to be updated to allow non-integer  (and X/Y) scales.  We'd need this capability to implement "Swing  embedded in FX" correctly on Win8.1+...
Comments
covered by JavaFX SwingNode test suite
07-11-2016

+1
30-07-2016

In that case I am removing the defer request keyword, since that isn't a good reason to defer. Also, JDK-8162551 is almost ready to go in (just one last issue on the unit test).
29-07-2016

Yes, of cause, the JDK-8162551 is the only obstacle I have.
29-07-2016

Semyon, can we fix it after your fix of JDK-8162551 ?
29-07-2016

9-defer-request since it is blocked by FX JDK-8162551.
29-07-2016

This can also affect JFXPanel. Currently we adapt ourselves to the non-integer scales that come from the SurfaceData of the SG2D, so we scale correctly, but if you override the AWT scale with J2D_UISCALE and don't apply the same override using FX's -Dglass.win.uiScale=N then we will disagree on where the popups should be. We need to consolidate those somehow, similar to the way we fix popup positioning in SwingNode per my previous comment...
07-04-2016

Another related issue is that we'll need a way to translate the bounds of the JLightweightFrame into the same "screen coordinate space" that AWT uses so that it can accurately place its popups. (Popups are created as AWT-native window even though the main Swing frame is actually a JComponent embedded in an FX scene graph.) We'd need a way to translate our FX Screen objects into AWT GraphicsDevice objects and then to interpret "FX thinks this component is at x,y,w,h in the scene graph, which translates into sx,sy,sw,sh in our Screen object's coordinate space, which translates into jx,jy,jw,jh in the coordinate space of the corresponding AWT screen associated with the same physical monitor"...
05-04-2016