public interface

PdfThumbnailBarController

com.pspdfkit.ui.thumbnail.PdfThumbnailBarController
Known Indirect Subclasses

Class Overview

Thumbnail bar controller used to control properties and actions of scrollable and static thumbnail bar.

Summary

Public Methods
abstract void addOnVisibilityChangedListener(OnVisibilityChangedListener listener)
Adds a listener to be notified of visibility change.
abstract void clearDocument()
abstract int getBackgroundColor()
abstract DocumentListener getDocumentListener()
abstract int getSelectedThumbnailBorderColor()
Returns the border color for the selected thumbnail in the thumbnail bar.
abstract int getThumbnailBorderColor()
Returns the border color for the thumbnails in the thumbnail bar.
abstract int getThumbnailHeight()
Returns the height of the thumbnails in thumbnail bar.
abstract int getThumbnailWidth()
Returns the width of the thumbnails in thumbnail bar.
abstract boolean isBackgroundTransparent()
abstract boolean isRedactionAnnotationPreviewEnabled()
Returns redaction annotation preview mode, false by default.
abstract boolean isUsingPageAspectRatio()
Returns whether the page aspect ratio is used to determine the thumbnail width.
abstract void removeOnVisibilityChangedListener(OnVisibilityChangedListener listener)
Removes a previously added visibility change listener.
abstract void setBackgroundColor(int backgroundColor)
Sets the background color for the thumbnail bar.
abstract void setDocument(PdfDocument document, PdfConfiguration configuration)
abstract void setDrawableProviders(List<PdfDrawableProvider> drawableProviders)
Sets PdfDrawableProviders to provide custom PdfDrawable to be displayed in a thumbnail bar page items.
abstract void setOnPageChangedListener(PdfThumbnailBar.OnPageChangedListener onPageChangedListener)
Sets a listener to be notified of page changing events.
abstract void setRedactionAnnotationPreviewEnabled(boolean enable)
Sets redaction annotations preview as redacted.
abstract void setSelectedThumbnailBorderColor(int borderColor)
Sets the border color for the selected thumbnail in the thumbnail bar.
abstract void setThumbnailBorderColor(int borderColor)
Sets the border color for the thumbnails in the thumbnail bar.
abstract void setThumbnailHeight(int thumbnailHeight)
Sets the height of the thumbnails in thumbnail bar.
abstract void setThumbnailWidth(int thumbnailWidth)
Sets the width of the thumbnails in thumbnail bar.
abstract void setUsePageAspectRatio(boolean usePageAspectRatio)
Configures the thumbnail bar to use the page aspect ratio to calculate the thumbnail width.

Public Methods

public abstract void addOnVisibilityChangedListener (OnVisibilityChangedListener listener)

Adds a listener to be notified of visibility change. If the listener has already been added previously, this method will be a no-op. Adding null is not allowed, and will result in an exception.

Parameters
listener OnVisibilityChangedListener that should be notified. Must be non-null.

public abstract void clearDocument ()

public abstract int getBackgroundColor ()

public abstract DocumentListener getDocumentListener ()

public abstract int getSelectedThumbnailBorderColor ()

Returns the border color for the selected thumbnail in the thumbnail bar.

Returns
  • Border colors of selected thumbnail.

public abstract int getThumbnailBorderColor ()

Returns the border color for the thumbnails in the thumbnail bar.

Returns
  • Border colors of thumbnails.

public abstract int getThumbnailHeight ()

Returns the height of the thumbnails in thumbnail bar.

Returns
  • Height of thumbnails in pixels.

public abstract int getThumbnailWidth ()

Returns the width of the thumbnails in thumbnail bar. In the case where isUsingPageAspectRatio() is true this will return the actual width of the first thumbnail.

Returns
  • Width of thumbnails in pixels.

public abstract boolean isBackgroundTransparent ()

public abstract boolean isRedactionAnnotationPreviewEnabled ()

Returns redaction annotation preview mode, false by default.

Returns
  • true if redaction annotation preview mode is enabled, false otherwise.

public abstract boolean isUsingPageAspectRatio ()

Returns whether the page aspect ratio is used to determine the thumbnail width.

Returns
  • true if the thumbnail width is calculated based on the page aspect ratio and thumbnail height, false if the thumbnail width is used as configured.

public abstract void removeOnVisibilityChangedListener (OnVisibilityChangedListener listener)

Removes a previously added visibility change listener. Upon calling this method the listener will no longer be notified of any changes. If the listener has not been added, this method will be a no-op. Adding null is not allowed,and will result in an exception.

Parameters
listener OnVisibilityChangedListener that should be removed. Must be non-null.

public abstract void setBackgroundColor (int backgroundColor)

Sets the background color for the thumbnail bar.

Parameters
backgroundColor Thumbnail bar background color.

public abstract void setDocument (PdfDocument document, PdfConfiguration configuration)

public abstract void setDrawableProviders (List<PdfDrawableProvider> drawableProviders)

Sets PdfDrawableProviders to provide custom PdfDrawable to be displayed in a thumbnail bar page items.

public abstract void setOnPageChangedListener (PdfThumbnailBar.OnPageChangedListener onPageChangedListener)

Sets a listener to be notified of page changing events. Calling this method will replace any previously set listener. You may provide null to clear the listener.

Parameters
onPageChangedListener PdfThumbnailBar.OnPageChangedListener that should be notified, or null to clear the listener.

public abstract void setRedactionAnnotationPreviewEnabled (boolean enable)

Sets redaction annotations preview as redacted.

Parameters
enable true to show redaction annotations as redacted, false to show them as marks.

public abstract void setSelectedThumbnailBorderColor (int borderColor)

Sets the border color for the selected thumbnail in the thumbnail bar.

Parameters
borderColor Border colors of selected thumbnail.

public abstract void setThumbnailBorderColor (int borderColor)

Sets the border color for the thumbnails in the thumbnail bar.

Parameters
borderColor Border colors of thumbnails.

public abstract void setThumbnailHeight (int thumbnailHeight)

Sets the height of the thumbnails in thumbnail bar.

Parameters
thumbnailHeight Height of thumbnails in pixels.

public abstract void setThumbnailWidth (int thumbnailWidth)

Sets the width of the thumbnails in thumbnail bar. This has no effect if isUsingPageAspectRatio() is set to true.

Parameters
thumbnailWidth Width of thumbnails in pixels.

public abstract void setUsePageAspectRatio (boolean usePageAspectRatio)

Configures the thumbnail bar to use the page aspect ratio to calculate the thumbnail width.

Parameters
usePageAspectRatio true to automatically calculate the thumbnail width based on the page aspect ratio and thumbnail height, false to use the configured thumbnail width.