com.levigo.jadice.document.render
Class DefaultThumbnailProvider

java.lang.Object
  extended by com.levigo.jadice.document.render.DefaultThumbnailProvider
All Implemented Interfaces:
ThumbnailProvider

public final class DefaultThumbnailProvider
extends Object
implements ThumbnailProvider

The default implementation for the ThumbnailProvider.


Field Summary
 
Fields inherited from interface com.levigo.jadice.document.render.ThumbnailProvider
DEFAULT_THUMB_HEIGHT, DEFAULT_THUMB_WIDTH
 
Method Summary
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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static final ThumbnailProvider getInstance()

getThumbnail

public RenderedImage getThumbnail(Page page,
                                  TaskExecutor<Page> taskExecutor,
                                  RenderControls renderControls,
                                  boolean createIfNotCached)
Description copied from interface: ThumbnailProvider
Returns a thumbnail image in given size of a page associated to.

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.

Specified by:
getThumbnail in interface ThumbnailProvider
Parameters:
page - the of which a thumbnail is demanded
renderControls - the target size the thumbnail should have
createIfNotCached - TODO
Returns:
RenderedImage a thumbnail image

setUseThumbnailCache

public void setUseThumbnailCache(boolean useThumbnailCache)

isUseThumbnailCache

public boolean isUseThumbnailCache()


Copyright © 1995-2020 levigo holding gmbh. All Rights Reserved.