|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.confluence.pages.thumbnail.ThumbnailInfo
public class ThumbnailInfo
Responsible for setting the height and width of thumbnails appropriately and generating the HTML for rendering them in a page.
Field Summary | |
---|---|
static int |
THUMBNAIL_DEFAULT_WIDTH
|
Constructor Summary | |
---|---|
ThumbnailInfo(Attachment attachment,
java.io.InputStream attachmentData,
java.lang.String attachmentsPath)
Deprecated. since 3.1 use ThumbnailInfo(ImageDetails, Dimensions, String) , or
ThumbnailManager.getThumbnailInfo(com.atlassian.confluence.pages.Attachment) |
|
ThumbnailInfo(ImageDetails imageDetails,
Dimensions maxDimensions,
java.lang.String attachmentsPath)
Creates a thumbnail info for the given image details and maximum dimensions. |
Method Summary | |
---|---|
static java.lang.String |
createThumbnailUrlPathFromAttachmentUrl(java.lang.String attachmentUrl)
|
Attachment |
getAttachment()
|
java.lang.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 |
java.lang.String |
getPopupLink(java.lang.String imageParameters)
Get some HTML that will cause a thumbnail to be rendered inline, with a popup-link to the full-sized image. |
java.lang.String |
getPopupLinkPrefix()
This method generates an a tag with the 'confluence-thumbnail-link' class. |
java.lang.String |
getPopupLinkSuffix()
|
int |
getThumbnailHeight()
Get the height of the thumbnail image. |
java.lang.String |
getThumbnailImageHtml(java.lang.String imageParameters)
|
java.lang.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()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int THUMBNAIL_DEFAULT_WIDTH
Constructor Detail |
---|
public ThumbnailInfo(Attachment attachment, java.io.InputStream attachmentData, java.lang.String attachmentsPath)
ThumbnailInfo(ImageDetails, Dimensions, String)
, or
ThumbnailManager.getThumbnailInfo(com.atlassian.confluence.pages.Attachment)
attachmentData
- is no longer used or required, so can be nullpublic ThumbnailInfo(ImageDetails imageDetails, Dimensions maxDimensions, java.lang.String attachmentsPath)
java.lang.IllegalArgumentException
- if imageDetails or its attachment is null
Method Detail |
---|
public static boolean systemSupportsThumbnailing()
public int getOriginalWidth()
public int getOriginalHeight()
public int getThumbnailWidth()
public int getThumbnailHeight()
public java.lang.String getThumbnailUrlPath()
public static java.lang.String createThumbnailUrlPathFromAttachmentUrl(java.lang.String attachmentUrl)
public java.lang.String getPopupLink(java.lang.String imageParameters)
imageParameters
- a string of parameters suitable for inserting into an HTML img tag. Ignored if null.
public java.lang.String getPopupLinkPrefix()
getPopupLinkSuffix()
public java.lang.String getPopupLinkSuffix()
public java.lang.String getThumbnailImageHtml(java.lang.String imageParameters)
public Attachment getAttachment()
public java.lang.String getImageMimeType()
null
otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |