RFR: 8348760: RadioButton is not shown if JRadioButtonMenuItem is rendered with ImageIcon in WindowsLookAndFeel [v10]
Alexey Ivanov
aivanov at openjdk.org
Wed Feb 12 14:39:14 UTC 2025
On Wed, 12 Feb 2025 03:07:25 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:
>> It just feels wrong… A superclass doesn't need to know, shouldn't know, about its subclasses.
>>
>> Yet this solution could be the simplest one… if achieving the same effect different makes the code too complicated.
>
> Where it is checking for subclasses? It is just checking for if the current lookandfeel is Windows L&F (as I told it is not checking for `instanceof WindowsLookAndFeel` in which case one could have argued that it is trying to know about windows subclass..
>
> Also, having helper method will have effect in only Windows subclass and noop in others and that is unnecessary in my opinion and on top of that, it will need a CSR for that method and that method would be additional maintenance headache and it will prevent backporting this fix if one wants to and considering this is related to JCK issue, people would like it to be backported..
Windows Look-and-Feel is based on Basic L&F implementation — from this point of view, Basic L&F changes its layout to accommodate for customisations that are needed for another L&F that's descends from it.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23324#discussion_r1952779196
More information about the client-libs-dev
mailing list