Friday, November 18, 2011

Friday Fun Component XIV

back from Devoxx which was great again i still found some time to release another little fun component for you.
It's a range slider that i've created for the server team of Quintiq. This slider is in principle a simple JSlider with two knobs instead of one.
We use this slider to specify a range of days (e.g. a week or so) but you can use it for all kind of ranges.

Here is a screenshot of it...

On the screenshot you could see most of the features the range slider has to offer. One could set different kinds of knob shapes, knob designs, track styles, range colors etc.
One interesting feature might be that you can drag no only the thumbs but also the range itself which could be useful if you have defined a range and would like to keep the delta but on a different position on the scale.

Because it's still 4:30 pm in Germany i won't go into detail now and leave it up to you to play around with the little demo app i created.

Because i did not want to reinvent the wheel i based the slider on the work of Ernie Yu who blogged about it last year in december.

And if you like it you might want to download the sources as always presented a s a NetBeans project...

Binary jar: RangeSlider.jar

Source     : (NetBeans project)

And that's it for this friday...enjoy the upcoming weekend and keep coding...

1 comment:

  1. Excellent! I've been wanting something like this to use as a timeline editor component for setting start and end times. Thanks for providing it. It will be a great example to learn from.