public class ThumbnailInfo extends Object
Modifier and Type | Field and Description |
---|---|
static int |
THUMBNAIL_DEFAULT_WIDTH
default thumbnail max height and max width
|
Constructor and Description |
---|
ThumbnailInfo(ImageDetails imageDetails,
Dimensions maxDimensions,
String attachmentsPath)
Creates a thumbnail info for the given image details and maximum dimensions.
|
Modifier and Type | Method and Description |
---|---|
static String |
createThumbnailUrlPathFromAttachmentUrl(String attachmentUrl) |
Attachment |
getAttachment() |
String |
getImageMimeType()
Returns the MIME type of the thumbnail if it is an intelligible image, or
null otherwise. |
int |
getOriginalHeight()
Get the height of the attachment before thumbnailing
|
int |
getOriginalWidth()
Get the width of the attachment before thumbnailing
|
String |
getPopupLink(String imageParameters)
Get some HTML that will cause a thumbnail to be rendered inline, with a popup-link to
the full-sized image.
|
String |
getPopupLinkPrefix()
This method generates an a tag with the 'confluence-thumbnail-link' class.
|
String |
getPopupLinkSuffix() |
int |
getThumbnailHeight()
Get the height of the thumbnail image.
|
String |
getThumbnailImageHtml(String imageParameters) |
String |
getThumbnailUrlPath()
Get the URL path for downloading the thumbnail, relative to the application's context-root
|
int |
getThumbnailWidth()
Get the width of the thumbnail image.
|
static boolean |
systemSupportsThumbnailing() |
public static final int THUMBNAIL_DEFAULT_WIDTH
public ThumbnailInfo(ImageDetails imageDetails, Dimensions maxDimensions, String attachmentsPath)
IllegalArgumentException
- if imageDetails or its attachment is null
public static boolean systemSupportsThumbnailing()
public int getOriginalWidth()
public int getOriginalHeight()
public int getThumbnailWidth()
public int getThumbnailHeight()
public String getThumbnailUrlPath()
public static String createThumbnailUrlPathFromAttachmentUrl(String attachmentUrl)
public String getPopupLink(String imageParameters)
This method generates an a tag with the 'confluence-thumbnail-link' class. The 'image-effects.js' file will attach an onclick function during the page initialisation.
imageParameters
- a string of parameters suitable for inserting into an HTML img tag. Ignored if null.public String getPopupLinkPrefix()
getPopupLinkSuffix()
public String getPopupLinkSuffix()
public Attachment getAttachment()
public String getImageMimeType()
null
otherwise.Copyright © 2003–2020 Atlassian. All rights reserved.