src/main/java/com/deflatedpickle/faosdance/DoubleSlider.java
package com.deflatedpickle.faosdance;
import javax.swing.*;
public class DoubleSlider extends JSlider {
private double factor;
public DoubleSlider(double min, double max, double value, double factor) {
super((int) ((float) min * factor), (int) ((float) max * factor), (int) ((float) value * factor));
this.factor = factor;
}
public double getDoubleMinimum() {
return super.getMinimum() / this.factor;
}
public double getDoubleMaximum() {
return super.getMaximum() / this.factor;
}
public double getDoubleValue() {
return super.getValue() / this.factor;
}
}