Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8217297

Add support for multiple look and feel for SwingSet SliderDemoTest

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 11
    • Fix Version/s: 13
    • Component/s: client-libs
    • Labels:

      Description

      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 if we use the Keyboard up/down/left/right keys to change the slider values as for all look and feels they change the slider value by single units.

      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 (Assuming this is currently acceptable behavior.)

      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 on any other look and feel.

        Attachments

          Activity

            People

            • Assignee:
              vagarwal Vikrant Agarwal
              Reporter:
              vagarwal Vikrant Agarwal
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: