public final class DefaultThumbnailProvider extends Object implements ThumbnailProvider
ThumbnailProvider
.DEFAULT_THUMB_HEIGHT, DEFAULT_THUMB_WIDTH
Modifier and Type | Method and Description |
---|---|
static ThumbnailProvider |
getInstance() |
RenderedImage |
getThumbnail(Page page,
TaskExecutor<Page> taskExecutor,
RenderControls renderControls,
boolean createIfNotCached)
Returns a thumbnail image in given size of a page associated to.
|
boolean |
isUseThumbnailCache() |
void |
setUseThumbnailCache(boolean useThumbnailCache) |
public static final ThumbnailProvider getInstance()
public RenderedImage getThumbnail(Page page, TaskExecutor<Page> taskExecutor, RenderControls renderControls, boolean createIfNotCached)
ThumbnailProvider
Depending on the concrete realisation, the returned image may be the ready-made thumbnail image
or for lazy creation null
or a placeholder dummy image. If null
or a
dummy image is returned the given render observer gets informed to trigger an update render
process on the caller of this method. If the parameterized render observer is null
, the update process remains in the hands of the caller.
getThumbnail
in interface ThumbnailProvider
page
- the of which a thumbnail is demandedrenderControls
- the target size the thumbnail should havecreateIfNotCached
- whether the creation of a tumbnail should be forced if it is not
already cachedpublic void setUseThumbnailCache(boolean useThumbnailCache)
public boolean isUseThumbnailCache()
Copyright © 2024 levigo holding gmbh. All rights reserved.