@NotNull
  private Rectangle getIconRectangle(int index) {
    Rectangle bounds = getCellBounds(index, index);
    Rectangle visibleRect = getVisibleRect();
    visibleRect.setSize(visibleRect.width - getInsets().right, visibleRect.height);
    bounds = bounds.intersection(visibleRect);
    Icon icon = toSize(getIcon());
    return new Rectangle(((int) bounds.getMaxX()) - icon.getIconWidth(),
                         bounds.y + (bounds.height - icon.getIconHeight()) / 2,
                         icon.getIconWidth(), icon.getIconHeight());
  }
@NotNull
  private Rectangle getIconRectangle(int index)