| com.pspdfkit.bookmarks.BookmarkProvider |
Handles all bookmark related operations on the owning document.
Retrieve it with getBookmarkProvider()
| Nested Classes | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| interface | BookmarkProvider.BookmarkListener | Listener for notifying other components when bookmarks change. | |||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| abstract boolean |
addBookmark(Bookmark bookmark)
Adds a new bookmark to the document.
| ||||||||||
| abstract Completable |
addBookmarkAsync(Bookmark bookmark)
Adds bookmark to the document.
| ||||||||||
| abstract void |
addBookmarkListener(BookmarkProvider.BookmarkListener listener)
Adds a
BookmarkProvider.BookmarkListener for being notified when bookmarks have been changed. | ||||||||||
| abstract List<Bookmark> |
getBookmarks()
Returns the list of bookmarks in the document. | ||||||||||
| abstract Observable<List<Bookmark>> |
getBookmarksAsync()
Returns the list of bookmarks in the document.
| ||||||||||
| abstract boolean |
hasUnsavedChanges()
Returns
true if there were any changes to the bookmarks without save. | ||||||||||
| abstract boolean |
removeBookmark(Bookmark bookmark)
Removes bookmark from the document.
| ||||||||||
| abstract Completable |
removeBookmarkAsync(Bookmark bookmark)
Remove bookmark from the document.
| ||||||||||
| abstract void |
removeBookmarkListener(BookmarkProvider.BookmarkListener listener)
Removes a previously registered
BookmarkProvider.BookmarkListener. | ||||||||||
Adds a new bookmark to the document.
| bookmark | Bookmark to be added to the document. |
|---|
true if bookmark was actually added, false otherwise.| IllegalStateException | If an error occurred while adding the bookmark. |
|---|
Adds bookmark to the document.
| bookmark | Bookmark to be added. |
|---|
Adds a BookmarkProvider.BookmarkListener for being notified when bookmarks have been changed. If the listener has already been added previously, this method will
be a no-op. Passing null is not allowed, and will result in an exception.
| listener | BookmarkProvider.BookmarkListener that should be notified. Must be non-null. |
|---|
Returns the list of bookmarks in the document.
Note: this call may block for a while and should not be called on the main thread.
Returns the list of bookmarks in the document.
Returns true if there were any changes to the bookmarks without save.
true if bookmarks were changed, false otherwise.
Removes bookmark from the document.
| bookmark | Bookmark to be removed. |
|---|
true if bookmark was actually removed, false otherwise.| IllegalStateException | If an error occurred while removing the bookmark. |
|---|
Remove bookmark from the document.
| bookmark | Bookmark to be added. |
|---|
Removes a previously registered BookmarkProvider.BookmarkListener. 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. Passing null is not allowed, and will result in an exception.
| listener | BookmarkProvider.BookmarkListener that should be removed. Must be non-null. |
|---|