<AWT Dev> [15] Review Request: 8238276 ComponentPeer.xxxImage are not implemented in some peers
Alexey Ivanov
alexey.ivanov at oracle.com
Thu Feb 6 21:23:59 UTC 2020
Hi Sergey,
Looks good to me.
On 31/01/2020 08:49, Sergey Bylokhov wrote:
> 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.
>
>
--
Regards,
Alexey
More information about the awt-dev
mailing list