slider.setMinimum((int) (min * scaleFactor));
slider.setMaximum((int) (max * scaleFactor));
- slider.setValue((int) (threshline.value * scaleFactor));
+ // slider.setValue((int) (threshline.value * scaleFactor));
+ slider.setValue(Math.round(threshline.value * scaleFactor));
thresholdValue.setText(threshline.value + "");
slider.setMajorTickSpacing((int) (range / 10f));
slider.setEnabled(true);
*/
protected void sliderValueChanged()
{
- threshline.value = slider.getValue() / scaleFactor;
+ /*
+ * squash rounding errors by forcing min/max of slider to
+ * actual min/max of feature score range
+ */
+ int value = slider.getValue();
+ threshline.value = value == slider.getMaximum() ? max
+ : (value == slider.getMinimum() ? min : value / scaleFactor);
cs.setThreshold(threshline.value);
/*