Skip to main content

Interval control

4 replies [Last post]
montechristos
Offline
Joined: 2005-09-29
Points: 0

Hi all,

I am looking for an existing (or easy to implement) interval control.
I.e a control that you can select 'from' and 'to' values

I would think of it as a modified JScrollBar which handles mouse events.

Next step would be to adapt this control for selecting Date intervals.

Anybody has done something like this?
Thanks in advance

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
montechristos
Offline
Joined: 2005-09-29
Points: 0

Oops,

I get an error trying to initialize a RangeSlider:
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at javax.swing.plaf.basic.BasicSliderUI.calculateContentRect(Unknown Source)
at javax.swing.plaf.basic.BasicSliderUI.calculateGeometry(Unknown Source)
at javax.swing.plaf.basic.BasicSliderUI.installUI(Unknown Source)
at javax.swing.JComponent.setUI(Unknown Source)
at com.jidesoft.swing.RangeSlider.updateUI(Unknown Source)
at javax.swing.JSlider.(Unknown Source)
at javax.swing.JSlider.(Unknown Source)
at com.jidesoft.swing.RangeSlider.(Unknown Source)

We are using Synthetica L&F. Do I have to do something special?

kschaefe
Offline
Joined: 2006-06-08
Points: 0

That control is not a SwingX control. You should ask the appropriate forum. Probably the JIDE one.

Karl

jancarel
Offline
Joined: 2004-03-11
Points: 0

See the RangeSlider from JIDE software, shown on:

http://www.jidesoft.com/images/rangeslider.png

this is one of the components in their free (open source) basic package.

webstart:
http://www.jidesoft.com/products/1.4/jide_demo.jnlp

As for using this for dates, I am skeptical as to the ease of use, even if you could modify the component's model to handle Dates.

Consider making a panel with 2 DateSpinners (also in the same package).

montechristos
Offline
Joined: 2005-09-29
Points: 0

Thanks, that's exactly what I needed :-)