private static void paintDirectory(Graphics g, ThumbnailComponent tc) {
    // Paint directory icon
    ImagesIcons.ThumbnailDirectory.paintIcon(tc, g, 5, 5);

    int imagesCount = tc.getImagesCount();
    if (imagesCount > 0) {
      final String title = ImagesBundle.message("icons.count", imagesCount);

      Font font = getSmallFont();
      FontMetrics fontMetrics = g.getFontMetrics(font);
      g.setColor(Color.BLACK);
      g.setFont(font);
      g.drawString(title, 5 + (ImagesIcons.ThumbnailDirectory.getIconWidth() - fontMetrics.stringWidth(title)) / 2,
                   ImagesIcons.ThumbnailDirectory
                     .getIconHeight() / 2 + fontMetrics.getAscent());
    }
  }
private static void paintDirectory(Graphics g, ThumbnailComponent tc)