<AWT Dev> [15] Review Request: 8238276 ComponentPeer.xxxImage are not implemented in some peers
Sergey Bylokhov
Sergey.Bylokhov at oracle.com
Fri Jan 31 08:49:23 UTC 2020
Hello.
Please review the small cleanup for JDK 15.
Bug: https://bugs.openjdk.java.net/browse/JDK-8238276
Fix: http://cr.openjdk.java.net/~serb/8238276/webrev.00
I have found that ComponentPeer.xxxImage methods are not implemented in some peers.
For example on macOS the CFileDialog#check/create/prepareImage are noop,
but the same methods are implemented in other toolkits.
When I tried to implement it I realize that all peers on all platforms implements
these methods in the same way on top of Toolkit.xxxImage methods.
These peers methods are called from the Component class if the H/W peer exists,
otherwise the toolkit methods are called. Actually this logic is redundant since
at the end we call toolkits methods anyway:
- directly from the Component
- indirectly via the peers.
In the fix, I have dropped the peers methods and always use toolkits.
--
Best regards, Sergey.
More information about the awt-dev
mailing list