private double getDeltaAdjusted(int value, double delta) {
    double minDelta = getMinimum() - value;
    double maxDelta = getMaximum() - getVisibleAmount() - value;
    return Math.max(minDelta, Math.min(maxDelta, delta));
  }
private double getDeltaAdjusted(int value, double delta)