/**
   * Extends the {@link #calculateTrackBuffer()} to allow the extra space required to display the
   * arrows on the track.
   *
   * @see BasicSliderUI#calculateTrackBuffer()
   */
  protected void calculateTrackBuffer() {
    super.calculateTrackBuffer();
    if (showArrows)
      if (slider.getOrientation() == JSlider.HORIZONTAL) {
        if (arrowWidth > minArrowWidth) trackBuffer += arrowWidth + ARROW_SPACE;
        else trackBuffer += minArrowWidth + ARROW_SPACE;
      } else {
        if (arrowHeight > minArrowHeight) trackBuffer += arrowHeight + ARROW_SPACE;
        else trackBuffer += minArrowHeight + ARROW_SPACE;
      }

    if (showEndLabel)
      if (slider.getOrientation() == JSlider.HORIZONTAL) trackBuffer += labelWidth + TEXT_SPACE;
      else trackBuffer += labelHeight + TEXT_SPACE;
  }