Class Thumbnails
- java.lang.Object
-
- com.atlassian.confluence.pages.thumbnail.Thumbnails
-
public class Thumbnails extends Object
Retrieves or constructsThumbnailInfo
objects for a list of imageAttachment
s, and determines the maximum height and width of the thumbnails and images so that the rendered columns and rows can be sized appropriately.
-
-
Constructor Summary
Constructors Constructor Description Thumbnails(List<Attachment> attachments, int columns, ThumbnailManager thumbnailManager)
Construct a Thumbnails object, which contains details of all thumbnailable images in a list of attachments.Thumbnails(List<Attachment> attachments, ImagePathHelper pathHelper, int columns, AttachmentManager attachmentManager, ThumbnailManager thumbnailManager)
Deprecated.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.Thumbnails(List<Attachment> attachments, String attachmentsRoot, int columns, AttachmentManager attachmentManager, ThumbnailManager thumbnailManager)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getColumns()
int
getMaxHeight()
int
getMaxImageHeight()
int
getMaxImageWidth()
int
getMaxWidth()
List<List<Object>>
getRows()
int
getSize()
List<ThumbnailInfo>
getThumbnails()
-
-
-
Constructor Detail
-
Thumbnails
@Deprecated public Thumbnails(List<Attachment> attachments, String attachmentsRoot, int columns, AttachmentManager attachmentManager, ThumbnailManager thumbnailManager)
Deprecated.- Parameters:
attachmentManager
- no longer required. Pass null.
-
Thumbnails
@Deprecated public Thumbnails(List<Attachment> attachments, ImagePathHelper pathHelper, int columns, AttachmentManager attachmentManager, ThumbnailManager thumbnailManager)
Deprecated.- Parameters:
attachmentManager
- no longer required. Pass null.
-
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 attachmentscolumns
- 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 attachmentspathHelper
- 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 Detail
-
getSize
public int getSize()
-
getThumbnails
public List<ThumbnailInfo> getThumbnails()
-
getMaxHeight
public int getMaxHeight()
-
getMaxWidth
public int getMaxWidth()
-
getMaxImageHeight
public int getMaxImageHeight()
-
getMaxImageWidth
public int getMaxImageWidth()
-
getColumns
public int getColumns()
-
-