});
}
+ /**
+ * update the text field from the threshold slider. preserves state of
+ * 'adjusting' so safe to call in init.
+ */
protected void setThresholdValueText()
{
+ boolean oldadj = adjusting;
adjusting = true;
if (percentThreshold.isSelected())
{
{
thresholdValue.setText((slider.getValue() / 1000f) + "");
}
- adjusting = false;
+ adjusting = oldadj;
}
protected void addSliderMouseListeners()
{
try
{
float f = Float.parseFloat(thresholdValue.getText());
- if (percentThreshold.isEnabled())
+ if (percentThreshold.isSelected())
{
slider.setValue(slider.getMinimum()
+ ((int) ((f / 100f) * (slider.getMaximum() - slider