<Swing Dev> [8] Review request for 4199622 RFE: JComboBox shouldn't sending ActionEvents for keyboard navigation
Sergey Bylokhov
Sergey.Bylokhov at oracle.com
Wed Jan 16 15:20:49 UTC 2013
Hi, Vladislav.
From the bug description:
"When the user pops up a JComboBox (hits the spacebar for Metal L&F),
and then tries to navigate with the arrow keys, any ActionListeners for
that CB will have their actionPerformed methods called, and there isn't
any information in the given ActionEvent to show that this was only a
navigation action rather than a selection (spacebar) action."
I do not see a problem here, because "navigation action" is an action
and so ActionEvent is posted in this case. Does somebody complains about it?
I am not sure but what about the case when the user change selection
view mouseover? Is it possible?
16.01.2013 18:04, Vladislav Karnaukhov wrote:
> Hello Alex,
>
> thanks for the review.
>
> Please find a new version here:
> http://cr.openjdk.java.net/~vkarnauk/4199622/webrev.01/
>
> Regards,
> - Vlad
>
> On 1/16/2013 05:45 PM, Alexander Potochkin wrote:
>> Hello Vlad
>>
>> The fix overall looks good,
>> however there are some comments:
>>
>> it is better to use UIManager.getBoolean() in this case,
>> it will enable you to skip the null check
>>
>> in the test you should use SunToolkit.realSync() instead of sleep()
>> (please also call realSync in the very beginning of the test method
>> to wait for focus to come)
>> and define boolean noAction as volatile since you are accessing it on
>> two threads
>>
>> Thanks
>> alexp
>>
>> On 1/16/2013 4:58 PM, Vladislav Karnaukhov wrote:
>>> Hello,
>>>
>>> could you please review the fix:
>>> bug: http://bugs.sun.com/view_bug.do?bug_id=4199622
>>> webrev: http://cr.openjdk.java.net/~vkarnauk/4199622/webrev.00/
>>>
>>> The fix uses new property to disable ActionEvent generation in
>>> JComboBox' drop-down window when an user navigates with keyboard.
>>> The fix works only when property is explicitly set by a developer;
>>> otherwise default JComboBox' behavior doesn't change.
>>>
>>> Regards,
>>> - Vlad
>
>
--
Best regards, Sergey.
More information about the swing-dev
mailing list