scijava-common
scijava-common copied to clipboard
Support numeric range input type
This could be modeled after bdv.util.BoundedIntervalDouble, or after Apache commons-lang (see the work by @ctrueden in https://github.com/scijava/scijava-ui-swing/commit/74fa99a353702843364cbc32a3dba04e2fc02e68).
We could possibly have continuous (just min and max) and discrete (min, max and stepSize) ranges in various numeric types (Integer, Double etc.). A range widget should support these in scijava-ui-swing, and these structures could also possibly replace the internal classes CalibratedSlider and CalibratedScrollBar in org.scijava.ui.swing.widget.SwingNumberWidget.
See this forum topic for some use case where a range input would be useful.
Here are two range slider implementations mentioned by @ekatrukha on Gitter:
- https://github.com/ekatrukha/BigTrace/blob/d1b0bb00a436bd010c915846d7eadc1ff6e27386/src/main/java/bigtrace/gui/RangeSliderTF.java
- https://github.com/bene51/3Dscript/blob/4754174ab9c9ef7b88878b5e93f0a74eb6b5bff2/3D_Animation/src/main/java/animation3d/gui/DoubleSlider.java