<Swing Dev> [13] RFR [JDK-8217297] Add support for multiple look and feel for SwingSet SliderDemoTest

Vikrant Agarwal vikrant.v.agarwal at oracle.com
Thu Jan 17 07:04:32 UTC 2019


Hi All,

 

Please review this fix for SwingSet3 SliderDemoTest:

Bug: https://bugs.openjdk.java.net/browse/JDK-8217297

Webrev: http://cr.openjdk.java.net/~vagarwal/8217297/webrev.0/

 

Summary: This fix enables support for multiple look and feel along with some other related fixes for SwingSet SliderDemoTest. 

 

1.DefaultDriverInstaller:

Using KeyboardJSliderScrollDriver instead of JSliderDriver.

This is because for non metal look and feel's, every mouse click leads to a jump in slider value and thus when we try to move slider by a value which is not a multiple of the jump magnitude, the slider does not reach this value. The slider instead finally stops at one of the integral multiples of the jump value.

This issue is resolved by using KeyboardJSliderScrollDriver as it uses the Keyboard keys to change the slider values.

 

2.SliderDemoTest:

a) Added support for Multiple look and feel testing.

b) Skipped check for page up and page down keys for Motif look and feel as they do not have any effect on the slider position in Motif Look and Feel

 

3.SliderDemo:

Added UIManager.put("Slider.paintValue", Boolean.FALSE);

This ensures that the slider value is not painted above the slider handle.

This is required because in GTK look and feel the slider value is painted above the slider handle, due to which the current test for checking slider by dragging the mouse fails as it expects the slider to be at the center of the enclosing rectangle vertically.

The slider value is not painted above the slider handle by default for any other look and feel. 

 

 

Best Regards,

Vikrant
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/swing-dev/attachments/20190116/cd37f7de/attachment.html>


More information about the swing-dev mailing list