Hi,
I'm not sure if this is a bug, but if it isn't, its a feature request-- I want to be able to move the JRangeSlider when the range is at the minimum (i.e., 1). You can drag the slider when there is blue to click on, and even when the control is completely closed there is about a 1 pixel sweet spot that lets you drag it around, but that is too difficult. I should be able to drag the whole thing down when i drag the top arrow down, and drag it up when i drag the bottom arrow up (and increase the range if i drag the other arrow).
Anyone know if this is possible? Otherwise i know its going to annoy our users when it comes time to do this study..
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I came across the same problem when I started using JRangeSlider.
Replace lines 681 to 709 with:
case PICK_LEFT_OR_TOP:
int low = toLocal(value-pickOffsetLow);
if (low < minimum) {
low = minimum;
}
if (low > maximum - minExtent) {//original didn't consider min extent
low = maximum - minExtent; //when deciding maximum low value
}
if (low > highValue - minExtent) {
//low = highValue-minExtent;
setRange(low, low + minExtent); //move low and high value
}
else
setLowValue(low);
break;
case PICK_RIGHT_OR_BOTTOM:
int high = toLocal(value-pickOffsetHigh);
if (high < minimum + minExtent) {//original didn't consider min extent
high = minimum + minExtent; //when deciding minimum low value
}
if (high > maximum) {
high = maximum;
}
if (high < lowValue+minExtent) {
//high = lowValue+minExtent;
setRange(high - minExtent, high); //move low and high value
}
else
setHighValue(high);
break;
HTH,
colin
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I'm not sure if this is a bug, but if it isn't, its a feature request-- I want to be able to move the JRangeSlider when the range is at the minimum (i.e., 1). You can drag the slider when there is blue to click on, and even when the control is completely closed there is about a 1 pixel sweet spot that lets you drag it around, but that is too difficult. I should be able to drag the whole thing down when i drag the top arrow down, and drag it up when i drag the bottom arrow up (and increase the range if i drag the other arrow).
Anyone know if this is possible? Otherwise i know its going to annoy our users when it comes time to do this study..
Hi,
I came across the same problem when I started using JRangeSlider.
Replace lines 681 to 709 with:
case PICK_LEFT_OR_TOP:
int low = toLocal(value-pickOffsetLow);
if (low < minimum) {
low = minimum;
}
if (low > maximum - minExtent) {//original didn't consider min extent
low = maximum - minExtent; //when deciding maximum low value
}
if (low > highValue - minExtent) {
//low = highValue-minExtent;
setRange(low, low + minExtent); //move low and high value
}
else
setLowValue(low);
break;
case PICK_RIGHT_OR_BOTTOM:
int high = toLocal(value-pickOffsetHigh);
if (high < minimum + minExtent) {//original didn't consider min extent
high = minimum + minExtent; //when deciding minimum low value
}
if (high > maximum) {
high = maximum;
}
if (high < lowValue+minExtent) {
//high = lowValue+minExtent;
setRange(high - minExtent, high); //move low and high value
}
else
setHighValue(high);
break;
HTH,
colin
Thanks colin, that really helped!