averbraeck / djutils

Delft Java Utilities for statistics, stochastics, data analysis and serialization
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Include range slider #45

Open WJSchakel opened 3 days ago

WJSchakel commented 3 days ago

Currently, we use a copy of a multislider implementation in some projects like OTS from quite some years ago, where differences are made between Windows XP and Windows Vista implementations. The code is for sure not current, and can be re-implemented. Several examples of a Swing multislider or a slider with lower and upper bound exist, being less dependent on specific OS versions for the styling and using pure Swing code.

averbraeck commented 2 days ago

One project with an MIT license we can learn from is https://github.com/ernieyu/Swing-range-slider. The project is explained at https://ernienotes.wordpress.com/2010/12/27/creating-a-java-swing-range-slider. @Peter-Knoppers already asked whether the code could be freely used a couple of years ago, and the answer was 'yes'. The idea is to make an extension of this code to match the needs in projects like opentrafficim.

averbraeck commented 2 days ago

The question remains where to place the code for the range-slider, since djutils does not have a specific place for swing components. An idea would be to create a module djutils-swing where specific swing utilities can be stored.