<Swing Dev> [8] Review request for 4199622 RFE: JComboBox shouldn't sending ActionEvents for keyboard navigation

Alexander Scherbatiy alexandr.scherbatiy at oracle.com
Tue Jan 29 15:26:37 UTC 2013


- 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)?

- 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);
      }

- doTest() method in the test throws some exception. It can throw robot 
and toolkit exceptions as well.

Thanks,
  Alexandr.


On 1/29/2013 6:17 PM, Vladislav Karnaukhov wrote:
> Hello Alexander, all,
>
> please review a new version: 
> http://cr.openjdk.java.net/~vkarnauk/4199622/webrev.04/
>
> On 1/24/2013 05:57 PM, Alexander Scherbatiy wrote:
>>
>> - MetalLookAndFeel and ComboBox.noActionOnKeyNavigation property is set
>>      Press down, select an item, press enter. The drop down list is not
>> closed
> Fixed.
>
>> - WindowsLookAndFeel and ComboBox.noActionOnKeyNavigation property is 
>> set
>>     Home/End and PgUp/PgDn keys do not work
>>
> Fixed.
>
> The reg test was completely re-written. 2 additional runs were added: 
> one with Windows LAF if under Microsoft OS; another when editable flag 
> is set. I've checked on Mac OS X to ensure cross-platform compatibility.
>
> Regards,
> - Vlad




More information about the swing-dev mailing list