4

Hi i was wondering if any has heard of a Java component that provides a range slider. A slider, that is, with two knobs that define a range in the min max values rather than just one.

I found on the web a JRangeSlider in the perfuse library but i have two issues with it.

First (and not that important) is that it has it's own visual style and does not change and blend in with the used look and feel.

Second (and REALLY important for my app) is that when you setEnable(false) on it nothing happens!! You can still use the slider. The reason i want to disable it is that i have a new thread running at some point in my program that alters a value that the range slider also affects. I want to simply disable the slider while my thread is running and enable it after that.

Any thoughts?

Savvas Dalkitsis
  • 11,476
  • 16
  • 65
  • 104

4 Answers4

2

I believe you are using an older version of RangeSlider. If you still need it, please make sure you check out the latest release. Here is a screenshot of it under different look and feel. Regarding the look is not so good, we are now using the same look and the JSlider of the L&F you are using. The screenshot below are from under Windows 7, Mac OS X Aqua, Windows XP and Metal respectively.

Screenshot of RangeSlider from JIDE Common Layer

jidesoft
  • 202
  • 1
  • 3
  • Thanks for your reply even though it's 2 and a half years late :) Even though I don't need it anymore, I'm glad you have changed the way the lnf is handled. I also hope you have fixed that annoying bug of not being able to disable the slider. – Savvas Dalkitsis Nov 04 '11 at 20:29
  • Is there a version for a slider with 3 knobs (Left, Center and Right value)? – Royi Jul 27 '18 at 16:00
1

JIDE has an open-source RangeSlider in its Common Layer. You can try it out by downloading JIDE's webstart demo.

Amanda S
  • 3,266
  • 4
  • 33
  • 45
  • Thanx for your comment. I should say that i had that one in mind. But quickly dismissed for 2 reasons... 1st the component can be disabled but when enabled responds to all events passed to it while disabled.. 2nd it is REALLY ugly and not user friendly :D – Savvas Dalkitsis May 19 '09 at 18:02
  • I tried to reproduce the behavior you explained in reason #1, but setEnabled(false) worked just fine for me. Could you explain in more detail the problem you're seeing? – Amanda S May 19 '09 at 20:20
  • i am using the range slider to change the value of 2 integers somewhere. i have another slider (a normal one) that changes some other values and the creates some objects based on the new values and also the ones the range slider changes. now i have a thread that interactively changes the value of the single slider (as a play feature). If the user changes the range slider i get a thread error. in JIDE the range slider is disabled but if i try to change its value while disabled the changes still happen and i get a thread violation again. :( – Savvas Dalkitsis May 20 '09 at 13:21
0

I'm not sure what the look and feel of your app is...but you could always give BiSlider a shot:

bislider: BiSlider Home Page

Justin Niessner
  • 242,243
  • 40
  • 408
  • 536
  • Why do people do this? why don't they follow convention? Bislider looked good until i tried the setEnabled(false). Again it did nothing! – Savvas Dalkitsis May 19 '09 at 18:08
0

Am not aware of any other than whats been mentioned, but a suggestion for your second problem would be to change the model to a static model (with suitable values) at the same time you disable it. That way it will be guaranteed not get updated. When you enable it, remember to switch it back to the original model.

objects
  • 8,637
  • 4
  • 30
  • 38