Class Thumbnails

java.lang.Object
com.atlassian.confluence.pages.thumbnail.Thumbnails

public class Thumbnails extends Object
Retrieves or constructs ThumbnailInfo objects for a list of image Attachments, and determines the maximum height and width of the thumbnails and images so that the rendered columns and rows can be sized appropriately.
  • Constructor Details

    • Thumbnails

      public Thumbnails(List<Attachment> attachments, int columns, ThumbnailManager thumbnailManager)
      Construct a Thumbnails object, which contains details of all thumbnailable images in a list of attachments. Thumbnail URLs will be rooted at the configured context path.
      Parameters:
      attachments - list of attachments
      columns - number of columns per row of thumbnails displayed.
    • Thumbnails

      public Thumbnails(List<Attachment> attachments, ImagePathHelper pathHelper, int columns, ThumbnailManager thumbnailManager)
      Construct a Thumbnails object, which contains details of all thumbnailable images in a list of attachments.
      Parameters:
      attachments - list of attachments
      pathHelper - determines the remote path to the attachments, if null is passed then the attachment URLs will be rooted at the configured context path.
      columns - number of columns per row of thumbnails displayed.
  • Method Details

    • getSize

      public int getSize()
    • getThumbnails

      public List<ThumbnailInfo> getThumbnails()
    • getRows

      public List<List<Object>> getRows()
    • getMaxHeight

      public int getMaxHeight()
    • getMaxWidth

      public int getMaxWidth()
    • getMaxImageHeight

      public int getMaxImageHeight()
    • getMaxImageWidth

      public int getMaxImageWidth()
    • getColumns

      public int getColumns()