<Swing Dev> [jdk16] RFR: 8259237: Demo selection changes with left/right arrow key. No need to press space for selection. [v3]

Pankaj Bansal pbansal at openjdk.java.net
Mon Jan 11 13:40:00 UTC 2021


On Mon, 11 Jan 2021 11:57:49 GMT, Pankaj Bansal <pbansal at openjdk.org> wrote:

>> Quick question: why we special casing JRadioButton case? Is there any reason we should call the action on them?
>
>> Quick question: why we special casing JRadioButton case? Is there any reason we should call the action on them?
> 
> This was the behaviour which was there before JDK-8249548 for JRadioButton and I am just reverting to it. As explained in the PR description, the behaviour before JDK-8249548 was as below
> 
> Before fix for JDK-8249548
> JToggleButton:
>     For all L&Fs, user can not navigate/select the buttons added to ButtonGroup properly as mentioned in the JDK-8249548.
> JRadioButton:
>     For Synth L&F (Nimbus L&F), user can not navigate/select the buttons added to ButtonGroup.
>     For AquaL&F, user can select the buttons added to ButtonGroup by pressing left/right key and needs to press the "space" to perform the set Action.
>     For Other L&Fs, user can select/navigate the buttons and the set Action is also performed without pressing "space"

I have removed the duplicate code for AquaL&F. I think during the fix made for JDK-8226892, it was a mistake to not change the AquaL&F code. So, the behaviour of JRadioButton should be similar across L&Fs and the duplicate code in AquaL&F is not needed. A mach5 job with all jtreg/jck tests is being run and I will will update when it finishes.

-------------

PR: https://git.openjdk.java.net/jdk16/pull/99


More information about the swing-dev mailing list