Re: [9] Review request for 8136998: JComboBox prevents wheel mouse scrolling of JScrollPane
Looks great! Thanks alexp On 5/18/2016 14:55, Alexey Ivanov wrote: Hi Alex, It makes sense, thanks. Updated webrev: http://cr.openjdk.java.net/~aivanov/8136998/jdk9/webrev.01/ Regards, Alexey On 17.05.2016 20:18, Alexander Potochkin wrote: Hello Alexey The scrollerMouseWheelListener field is only initialized in the installScrollerListeners() method which is called from the protected configureScroller(). So if a customer UI delegate overrides configureScroller() method, the scrollerMouseWheelListener may not be initialized. Could you add the null checks? Thanks alexp On 5/11/2016 17:29, Alexey Ivanov wrote: Hello Swing team, Could you please review the fix for jdk9: bug: https://bugs.openjdk.java.net/browse/JDK-8136998 webrev: http://cr.openjdk.java.net/~aivanov/8136998/jdk9/webrev.00/ Problem description: When JComboBox is added into a JScrollPane, scroll pane is not scrolled by mouse wheel if mouse over JComboBox. The fix to https://bugs.openjdk.java.net/browse/JDK-8033069 added MouseWheelListener to JComboBox, and combo box consumes MOUSE_WHEEL events therefore these events do not reach JScrollPane beneath JComboBox. The fix: Remove MouseWheelListener from JComboBox. To prevent the combo box popup from being closed by rotating mouse wheel over the JComboBox, MouseWheelListener is added when the popup is about to be displayed and is removed when the popup is about to be hidden. Regards, Alexey
Re: [9] Review request for 8136998: JComboBox prevents wheel mouse scrolling of JScrollPane
Hi Alex, It makes sense, thanks. Updated webrev: http://cr.openjdk.java.net/~aivanov/8136998/jdk9/webrev.01/ Regards, Alexey On 17.05.2016 20:18, Alexander Potochkin wrote: Hello Alexey The scrollerMouseWheelListener field is only initialized in the installScrollerListeners() method which is called from the protected configureScroller(). So if a customer UI delegate overrides configureScroller() method, the scrollerMouseWheelListener may not be initialized. Could you add the null checks? Thanks alexp On 5/11/2016 17:29, Alexey Ivanov wrote: Hello Swing team, Could you please review the fix for jdk9: bug: https://bugs.openjdk.java.net/browse/JDK-8136998 webrev: http://cr.openjdk.java.net/~aivanov/8136998/jdk9/webrev.00/ Problem description: When JComboBox is added into a JScrollPane, scroll pane is not scrolled by mouse wheel if mouse over JComboBox. The fix to https://bugs.openjdk.java.net/browse/JDK-8033069 added MouseWheelListener to JComboBox, and combo box consumes MOUSE_WHEEL events therefore these events do not reach JScrollPane beneath JComboBox. The fix: Remove MouseWheelListener from JComboBox. To prevent the combo box popup from being closed by rotating mouse wheel over the JComboBox, MouseWheelListener is added when the popup is about to be displayed and is removed when the popup is about to be hidden. Regards, Alexey
Re: [9] Review request for 8136998: JComboBox prevents wheel mouse scrolling of JScrollPane
Hello Alexey The scrollerMouseWheelListener field is only initialized in the installScrollerListeners() method which is called from the protected configureScroller(). So if a customer UI delegate overrides configureScroller() method, the scrollerMouseWheelListener may not be initialized. Could you add the null checks? Thanks alexp On 5/11/2016 17:29, Alexey Ivanov wrote: Hello Swing team, Could you please review the fix for jdk9: bug: https://bugs.openjdk.java.net/browse/JDK-8136998 webrev: http://cr.openjdk.java.net/~aivanov/8136998/jdk9/webrev.00/ Problem description: When JComboBox is added into a JScrollPane, scroll pane is not scrolled by mouse wheel if mouse over JComboBox. The fix to https://bugs.openjdk.java.net/browse/JDK-8033069 added MouseWheelListener to JComboBox, and combo box consumes MOUSE_WHEEL events therefore these events do not reach JScrollPane beneath JComboBox. The fix: Remove MouseWheelListener from JComboBox. To prevent the combo box popup from being closed by rotating mouse wheel over the JComboBox, MouseWheelListener is added when the popup is about to be displayed and is removed when the popup is about to be hidden. Regards, Alexey
Re: [9] Review request for 8136998: JComboBox prevents wheel mouse scrolling of JScrollPane
Looks fine. On 11.05.16 17:29, Alexey Ivanov wrote: Hello Swing team, Could you please review the fix for jdk9: bug: https://bugs.openjdk.java.net/browse/JDK-8136998 webrev: http://cr.openjdk.java.net/~aivanov/8136998/jdk9/webrev.00/ Problem description: When JComboBox is added into a JScrollPane, scroll pane is not scrolled by mouse wheel if mouse over JComboBox. The fix to https://bugs.openjdk.java.net/browse/JDK-8033069 added MouseWheelListener to JComboBox, and combo box consumes MOUSE_WHEEL events therefore these events do not reach JScrollPane beneath JComboBox. The fix: Remove MouseWheelListener from JComboBox. To prevent the combo box popup from being closed by rotating mouse wheel over the JComboBox, MouseWheelListener is added when the popup is about to be displayed and is removed when the popup is about to be hidden. Regards, Alexey -- Best regards, Sergey.
[9] Review request for 8136998: JComboBox prevents wheel mouse scrolling of JScrollPane
Hello Swing team, Could you please review the fix for jdk9: bug: https://bugs.openjdk.java.net/browse/JDK-8136998 webrev: http://cr.openjdk.java.net/~aivanov/8136998/jdk9/webrev.00/ Problem description: When JComboBox is added into a JScrollPane, scroll pane is not scrolled by mouse wheel if mouse over JComboBox. The fix to https://bugs.openjdk.java.net/browse/JDK-8033069 added MouseWheelListener to JComboBox, and combo box consumes MOUSE_WHEEL events therefore these events do not reach JScrollPane beneath JComboBox. The fix: Remove MouseWheelListener from JComboBox. To prevent the combo box popup from being closed by rotating mouse wheel over the JComboBox, MouseWheelListener is added when the popup is about to be displayed and is removed when the popup is about to be hidden. Regards, Alexey