<Swing Dev> [9] Review request for 8072767 DefaultCellEditor for comboBox creates ActionEvent with wrong source object
Sergey Bylokhov
Sergey.Bylokhov at oracle.com
Fri Apr 10 15:16:10 UTC 2015
Hi, Alexander
The fix looks fine. But create a separate CR to document this property.
On 03.04.15 15:45, Alexander Scherbatiy wrote:
> On 4/3/2015 2:42 PM, Alexander Scherbatiy wrote:
>>
>> Hello,
>>
>> Could you review the fix:
>> bug: https://bugs.openjdk.java.net/browse/JDK-8072767
>> webrev: http://cr.openjdk.java.net/~alexsch/8072767/webrev.00
>>
>> This is a regression from the fix 8019180 Use JComboBox as it's own
>> ActionListener leads to unexpected behaviour
>>
>> JComboBox has unexpected behaviour if it is used as it's own
>> ActionListener: the selected value is empty and
>> the drop down popup is closed after each up/down key event.
>>
>> The original fix filters action events which source does not equal
>> JComboBox editor or editor component.
>> However, in case of the JTable the event source is
>> DefaultCellEditor which is different from the JComboBox editors.
>>
>> The suggested solution is to revert the fix for the issue 8019180
>> back and fix the JComboBox unexpected behaviour.
>> - Update the editor value for the new selected item.
>> - "JComboBox.isTableCellEditor" UIManager property can be used
>> in a user application to avoid action events firing
>> on each key navigation.
> Small correction. The "ComboBox.noActionOnKeyNavigation" UIManager
> property should be used instead.
>
> Thanks,
> Alexandr.
>>
>>
>> Thanks,
>> Alexandr.
>>
>
--
Best regards, Sergey.
More information about the swing-dev
mailing list