public interface

BookmarkViewAdapter

com.pspdfkit.ui.outline.BookmarkViewAdapter
Known Indirect Subclasses

Class Overview

Bookmarks adapter for the PdfOutlineView. This interface handles interaction with actual bookmark data for this view as well as events triggered on the view (for example, bookmark taps, edits, etc.).

Summary

Public Methods
abstract void addBookmarkListener(BookmarkProvider.BookmarkListener listener)
Adds this view to bookmark change events via BookmarkProvider.BookmarkListener interface.
abstract List<Bookmark> getBookmarks()
Called to retrieve the list of bookmarks to display.
abstract boolean isBookmarkAddButtonEnabled()
Called to determine bookmark add button enabled state.
abstract void onBookmarkAdd()
Called when add button has been clicked in this view.
abstract void onBookmarkClicked(Bookmark bookmark)
Called when user taps on a bookmark outside editing mode.
abstract void onBookmarkNameSet(Bookmark bookmark, String name)
Called when bookmark should be renamed.
abstract void onBookmarkPositionSet(Bookmark bookmark, int position)
Called when bookmark has been reordered in this view.
abstract boolean onBookmarkRemove(Bookmark bookmark)
Called when user deleted the bookmark from list.
abstract void removeBookmarkListener(BookmarkProvider.BookmarkListener listener)
Removes this view from bookmark change events via BookmarkProvider.BookmarkListener interface.

Public Methods

public abstract void addBookmarkListener (BookmarkProvider.BookmarkListener listener)

Adds this view to bookmark change events via BookmarkProvider.BookmarkListener interface. Should be passed through to a BookmarkProvider. Passing null is not allowed, and will result in an exception.

Parameters
listener BookmarkProvider.BookmarkListener that should be notified. Must be non-null.

public abstract List<Bookmark> getBookmarks ()

Called to retrieve the list of bookmarks to display.

Returns
  • List of bookmarks to be shown in this view.

public abstract boolean isBookmarkAddButtonEnabled ()

Called to determine bookmark add button enabled state.

Returns
  • true if add button should be enabled, false if it should be disabled.

public abstract void onBookmarkAdd ()

Called when add button has been clicked in this view.

public abstract void onBookmarkClicked (Bookmark bookmark)

Called when user taps on a bookmark outside editing mode.

Parameters
bookmark Bookmark that was tapped.

public abstract void onBookmarkNameSet (Bookmark bookmark, String name)

Called when bookmark should be renamed.

Parameters
bookmark Bookmark that has been selected for rename.
name New bookmark name.

public abstract void onBookmarkPositionSet (Bookmark bookmark, int position)

Called when bookmark has been reordered in this view.

Parameters
bookmark Bookmark that has been reordered.
position New bookmark position.

public abstract boolean onBookmarkRemove (Bookmark bookmark)

Called when user deleted the bookmark from list.

Parameters
bookmark Bookmark that was deleted.
Returns
  • true if the bookmark should be actually deleted, false if it should be left on the list.

public abstract void removeBookmarkListener (BookmarkProvider.BookmarkListener listener)

Removes this view from bookmark change events via BookmarkProvider.BookmarkListener interface. Should be passed through to a BookmarkProvider. 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 BookmarkProvider.BookmarkListener that should be removed. Must be non-null.