public void setValue(float newValue, boolean fireEvent) {
    if (newValue > max) current = max;
    else if (newValue < min) current = min;
    else current = newValue;

    valueChanged(fireEvent);
  }
  /** Sets max value, if current is greater than max, the current value is set to max value */
  public void setMax(float max) {
    this.max = max;

    if (current > max) {
      current = max;
      valueChanged(true);
    }
  }
  /** Sets min value, if current is lesser than min, the current value is set to min value */
  public void setMin(float min) {
    this.min = min;

    if (current < min) {
      current = min;
      valueChanged(true);
    }
  }
  private void decrement(boolean fireEvent) {
    if (current - step < min) this.current = min;
    else this.current -= step;

    valueChanged(fireEvent);
  }
  private void increment(boolean fireEvent) {
    if (current + step > max) this.current = max;
    else this.current += step;

    valueChanged(fireEvent);
  }