com.pspdfkit.ui.thumbnail.PdfThumbnailBarController |
![]() |
Thumbnail bar controller used to control properties and actions of scrollable and static thumbnail bar.
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
PdfDrawableProvider s 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.
|
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.
listener | OnVisibilityChangedListener that should be notified. Must be
non-null. |
---|
Returns the border color for the selected thumbnail in the thumbnail bar.
Returns the border color for the thumbnails in the thumbnail bar.
Returns the height of the thumbnails in thumbnail bar.
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 redaction annotation preview mode, false
by default.
true
if redaction annotation preview mode is enabled, false
otherwise.
Returns whether the page aspect ratio is used to determine the thumbnail width.
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.
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.
listener | OnVisibilityChangedListener that should be removed. Must be non-null. |
---|
Sets the background color for the thumbnail bar.
backgroundColor | Thumbnail bar background color. |
---|
Sets PdfDrawableProvider
s to provide custom PdfDrawable
to be displayed in a
thumbnail bar page items.
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.
onPageChangedListener | PdfThumbnailBar.OnPageChangedListener that should be notified, or null to clear the listener.
|
---|
Sets redaction annotations preview as redacted.
enable | true to show redaction annotations as redacted, false to show
them as marks.
|
---|
Sets the border color for the selected thumbnail in the thumbnail bar.
borderColor | Border colors of selected thumbnail. |
---|
Sets the border color for the thumbnails in the thumbnail bar.
borderColor | Border colors of thumbnails. |
---|
Sets the height of the thumbnails in thumbnail bar.
thumbnailHeight | Height of thumbnails in pixels. |
---|
Sets the width of the thumbnails in thumbnail bar. This has no effect if isUsingPageAspectRatio()
is set to true
.
thumbnailWidth | Width of thumbnails in pixels. |
---|
Configures the thumbnail bar to use the page aspect ratio to calculate the thumbnail width.
usePageAspectRatio | true to automatically calculate the thumbnail width based
on the page aspect ratio and thumbnail height, false to use the configured
thumbnail width.
|
---|