New proposal for #ReflectiveAccessToNonExportedTypes: Open modules & open packages
Alan Bateman
Alan.Bateman at oracle.com
Fri Oct 28 09:48:41 UTC 2016
On 27/10/2016 19:10, Alan Snyder wrote:
> :
> I’m wondering if it would be possible to open the package(s) used by Swing Look and Feels, to better support custom look and feels.
>
> The most obvious candidates are the packages containing the Portable Look and Feel. The PLAF design is somewhat schizophrenic. It is clearly designed for reuse, yet it has encapsulations that sometimes get in the way of reuse. (You can see examples in the Aqua LAF, originally coded by Apple, where there are workarounds with comments like “bad Sun”.)
>
> Other candidates are AWT support packages, which I have found useful in implementing a custom platform-specific look and feel.
>
> The basic issue for my look and feel is whether I will need to include instructions for developers on special command line arguments to allow the code to run in JDK 9. Obviously, I would rather not have to do this.
>
These are really topics for swing-dev and awt-dev. All the supported
APIs in the java.desktop module are already exported unconditionally.
The packages for those APIs are not proposed to be open. AFAIK, the name
of the LAFs are a supported interface (as the Swing API requires the
class name) but directly using or extending is not. JEP 272 [1] defines
several new APIs for desktop applications that would have traditionally
needed to use unsupported APIs. In addition, Phil Race has proposed a
jdk.desktop module [2] to provide a solution for yet more cases where
applications have been hacking into JDK internals.
-Alan
[1] http://openjdk.java.net/jeps/272
[2] http://mail.openjdk.java.net/pipermail/awt-dev/2016-October/012089.html
More information about the jigsaw-dev
mailing list