JDK-8029455 : [JLightweightFrame] support scaled painting
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 8,9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: os_x
  • Submitted: 2013-12-03
  • Updated: 2014-07-29
  • Resolved: 2014-06-11
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 8 JDK 9
8u20Fixed 9 b22Fixed
Description
In order to support HiDPI Mac Retina displays, JLF should be able to paint with a scale factor specified by a host application (namely, JavaFX SwingNode). 
Comments
Attaching diff-setHostBounds.patch with additional changes needed for proper support of multi-screen environments.
16-05-2014

This fix is needed in JDK 8u20 for JavaFX. So I'm bumping the priority to P3.
16-05-2014

Sent for review: http://mail.openjdk.java.net/pipermail/awt-dev/2014-May/007734.html
13-05-2014

Well, it isn't a technical problem per se, I agree. Rather, we would need to re-configure our Hudson and make all developers use a 8u20 build for this to work, which may take some time. So I'm evaluating if it's easier to use reflection as Steve suggests in JIRA ( https://javafx-jira.kenai.com/browse/RT-32597 ).
13-05-2014

> we will require building and running with a newer build of the JDK Why do you think this is a problem? We will just have to specify the version in the gradle scripts.
13-05-2014

The JDK part of the fix introduces changes to the LightweightContent interface which make it incompatible with the code we currently have in FX. Similarly, if we update the code in FX, we're no longer compatible with older JDK builds. This particular issue could easily be worked around by using default methods in the interface declaration and also implementing a stub method in the "new FX". However, there's a new method introduced in JLightweightFrame, and the "new FX" code just calls it. I don't see how we could work around this issue. Which means that once we implement the change in FX, we will require building and running with a newer build of the JDK. The code simply won't compile or run with an older JDK.
12-05-2014