<Swing Dev> [8] Review request for 4199622 RFE: JComboBox shouldn't sending ActionEvents for keyboard navigation
Vladislav Karnaukhov
Vladislav.Karnaukhov at oracle.com
Wed Jan 30 10:36:33 UTC 2013
Hello Alexandr, all,
please find a new version here:
http://cr.openjdk.java.net/~vkarnauk/4199622/webrev.05/
On 1/29/2013 07:26 PM, Alexander Scherbatiy wrote:
>
> - WindowsLookAndFeel and ComboBox.noActionOnKeyNavigation property is set
> Press down. Next item is selected and the action listener is
> invoked. Is it expected behavior (the drop down list is not shown in
> this case)?
Yes, it's expected. Customer would like to turn off event firing only
when popup is open. To keep consistency over different LAFs, I only
handle the new flag when drop-down is showing. Under Windows, if drop
list wasn't shown, JComboBox will work as usual even if the flag was set.
>
> - It seems that the code below can have a shorter form:
> if
> (UIManager.getBoolean("ComboBox.noActionOnKeyNavigation")) {
> if (!comboBox.isPopupVisible()) {
> comboBox.setSelectedIndex(si+1);
> }
> } else {
> comboBox.setSelectedIndex(si+1);
> }
> ->
> if ( !(UIManager.getBoolean("ComboBox.noActionOnKeyNavigation") &&
> comboBox.isPopupVisible()) ) {
> comboBox.setSelectedIndex(si+1);
> }
Agree; fixed.
>
> - doTest() method in the test throws some exception. It can throw robot
> and toolkit exceptions as well.
Agree; fixed.
>
> Thanks,
> Alexandr.
>
More information about the swing-dev
mailing list