Package org.opencms.ui.util
Class CmsGalleryFilePreview
java.lang.Object
org.opencms.ui.util.CmsGalleryFilePreview
Creates clickable previews for images and other files.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The height of the preview images.static final int
The width of the preview images. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic com.vaadin.ui.Component
createClickableFile
(CmsResource resource) Creates a clickable file preview.static com.vaadin.ui.Component
createClickableFile
(CmsResource resource, CmsResourceUtil resourceUtil) Creates a clickable file preview.static String
getScaleQueryString
(boolean highres) Gets the scaling query string for the preview.
-
Field Details
-
IMAGE_HEIGHT
The height of the preview images.- See Also:
-
IMAGE_WIDTH
The width of the preview images.- See Also:
-
-
Constructor Details
-
CmsGalleryFilePreview
public CmsGalleryFilePreview()
-
-
Method Details
-
createClickableFile
Creates a clickable file preview.- Parameters:
resource
- the resource to create the preview for- Returns:
- the clickable file preview
-
createClickableFile
public static com.vaadin.ui.Component createClickableFile(CmsResource resource, CmsResourceUtil resourceUtil) Creates a clickable file preview.- Parameters:
resource
- the resource to create the preview forresourceUtil
- the resource util- Returns:
- the clickable file preview
-
getScaleQueryString
Gets the scaling query string for the preview.- Parameters:
highres
- if true, generates high-resolution scaling query string- Returns:
- the scaling parameters
-