scijava-common icon indicating copy to clipboard operation
scijava-common copied to clipboard

Support numeric range input type

Open imagejan opened this issue 7 years ago • 2 comments

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.

imagejan avatar Jun 05 '18 21:06 imagejan

See this forum topic for some use case where a range input would be useful.

imagejan avatar Jun 19 '18 14:06 imagejan

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

ctrueden avatar Jan 04 '22 14:01 ctrueden