code: public int getScrollableUnitIncrement (
          Rectangle visibleRect, int orientation, int direction)
      {
          if (_unitScroll != -1) {
              return _unitScroll;
          }
  
          Insets insets = getInsets();
  
          if (orientation == SwingConstants.HORIZONTAL) {
              // nothing sensible to do here
  
          } else {
              if (direction > 0) {
                  int rectbot = visibleRect.y + visibleRect.height;
                  Component comp = getComponentAt(insets.left, rectbot);
  
                  // if there's no component at the edge, drop down 5
                  // pixels and look again
                  if (comp == this) {
                      comp = getComponentAt(insets.left, rectbot+5);
                  }
  
                  if (comp != this && comp != null) {
                      int compbot = comp.getY() + comp.getHeight();
                      return compbot - rectbot + 5;
                  }
  
              } else {
                  Component comp = getComponentAt(insets.left, visibleRect.y);
  
                  // if there's no component at the edge, move up 5
                  // pixels and look again
                  if (comp == this) {
                      comp = getComponentAt(insets.left, visibleRect.y-5);
                  }
  
                  if (comp != this && comp != null) {
                      return visibleRect.y - comp.getY() + 5;
                  }
              }
          }
  
          return DEFAULT_SCROLL_AMOUNT;
      }
docs: documentation inherited from interface