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

JSlider should has ability to set value that was exactly clicked on the track

XMLWordPrintable

      A DESCRIPTION OF THE REQUEST :
      When one clicks on the JSlider's track the value is changed in a step o 10% ((maxValue - minValue) / 10 - according to BasicSliderUI). This value should be configurable in JSlider (e.g. slider.setStep(int step)) and then read in the BasicSliderUI.scrollByBlock() method. This method could be also used to set 'no block' mode, i.e. what value one clicks one the track that value is slider set on, without dragging or pressing mouse (The effect should be like in winamp's song progress bar).

      JUSTIFICATION :
      In some cases it's necessary to set exact value in one click (e.g. in music players, when setting playing position), not in few steps.


      CUSTOMER SUBMITTED WORKAROUND :
      One can try to subclass BasicSliderUI and try to override some methods, but it's pretty hard in case that BasicSliderUI is provided by L&F, not created 'by hand'

            malenkov Sergey Malenkov (Inactive)
            igor Igor Nekrestyanov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: