-
- final Dimension imageSize = picture.getDimensions();
-
- final List<Dimension> recommendedDimensions = Picture
- .getThumbnailDimensions(imageSize);
-
- Dimension listingDimension = new Dimension(1500, 450);
-
- if (listingDimension.width > imageSize.width)
- if (listingDimension.height > imageSize.height)
- listingDimension = imageSize;
-
- final String listingThumbnailUrl = indexer.getThumbnailUrl(picture,
- listingDimension, indexingContext);
-
- filesHtml.append("<div style=\"float:left; margin: 10px;\">");
- filesHtml.append("<a href=\""
- + indexingContext.getGlobalUrl()
- + UrlParamEncoder.encode(indexingContext.getLocalUrl()
- + "/" + picture.fileName) + "\">\n");
-
- filesHtml.append("<img border=\"0\" src=\"" + listingThumbnailUrl
- + "\"/></a>\n");
- filesHtml.append("<br/><b>"
- + FilePathParser
- .getFileNameWithoutExtension(picture.fileName)
- + "</b><br/>(");
-
- int count = 0;
- for (final Dimension dimension : recommendedDimensions) {
- count++;
- if (count > 1)
- filesHtml.append(", ");
- filesHtml.append("<a href=\""
- + indexer.getThumbnailUrl(picture, dimension,
- indexingContext) + "\">");
- filesHtml.append(dimension.width + "x" + dimension.height);
- filesHtml.append("</a>");
- }
-
- filesHtml.append(")\n");
- filesHtml.append("</div>");
-