<Swing Dev> [9] Review Request for 7072653: JComboBox popup mispositioned if its height exceeds the screen height
Alexander Zvegintsev
alexander.zvegintsev at oracle.com
Tue Apr 21 14:17:54 UTC 2015
Hello Semyon,
it looks like that second call to getBorder() is unnecessary, we already
have its result in popupBorder variable.
borderHeight looks strange to me, it is initialized with left and right
insets(related to width) and then used as height.
The test uses full screen bounds and does not subtracts screen insets.
Thanks,
Alexander.
On 04/16/2015 04:14 PM, Semyon Sadetsky wrote:
> Subject corrected.
>
> On 4/16/2015 3:55 PM, Semyon Sadetsky wrote:
>> Hello,
>>
>> Please review fix for JDK9:
>>
>> bug: https://bugs.openjdk.java.net/browse/JDK-7072653
>> webrev: http://cr.openjdk.java.net/~ssadetsky/7072653/webrev.00/
>>
>> *THE ROOT CAUSE
>> Incorrect bounds calculation of heavy weight popup window in the
>> BasicComboPopup when the requested popup menu height exceeds screen
>> height.
>> Additional issue found: popup border thickness is not taken into
>> account when popup direction switched to up as the result popup
>> overlaps its combo-box by 2 pixels.
>> Also in multi-monitor desktop if screen are arranged vertically popup
>> can be shown on another monitor.
>>
>> *SOLUTION
>> The popup location algorithm is corrected to take into account the
>> current screen height and border insets.
>>
>> *TESTING
>> Test is added to ensure popup window height when combo-box contains
>> 1000 items.
>>
>> --Semyon
>>
>
More information about the swing-dev
mailing list