public interface

PageNavigator

com.pspdfkit.ui.navigation.PageNavigator
Known Indirect Subclasses

Class Overview

Class responsible for managing current page and page navigation history in the PdfFragment.

Summary

Public Methods
abstract void beginNavigation()
Notifies the navigation manager that calls to setPageIndex(int, boolean) should be added to the navigation history until endNavigation() is called.
abstract void endNavigation()
Commits the page changes to the navigation history dropping everything but the very last one.
abstract NavigationBackStack<NavigationItem<Integer>> getNavigationHistory()
Returns the navigation history owned by this manager.
abstract int getPageCount()
Gets number of pages in the document.
abstract int getPageIndex()
Get currently displayed document page.
abstract void setPageIndex(int pageIndex, boolean animated)

Sets the pageIndex to be displayed (0 is the first one).

abstract void setPageIndex(int pageIndex)

Sets the pageIndex to be displayed (0 is the first one), using our default decision on animating, which is to animate the transition if the page is next/before the current page, and not animate if further away.

Public Methods

public abstract void beginNavigation ()

Notifies the navigation manager that calls to setPageIndex(int, boolean) should be added to the navigation history until endNavigation() is called.

public abstract void endNavigation ()

Commits the page changes to the navigation history dropping everything but the very last one.

public abstract NavigationBackStack<NavigationItem<Integer>> getNavigationHistory ()

Returns the navigation history owned by this manager.

Returns

public abstract int getPageCount ()

Gets number of pages in the document.

Returns
  • Number of pages in the displayed document, -1 if document is null.

public abstract int getPageIndex ()

Get currently displayed document page.

Returns
  • Currently displayed document page, -1 if document is null.

public abstract void setPageIndex (int pageIndex, boolean animated)

Sets the pageIndex to be displayed (0 is the first one). If animated is set to true, the page jump will be animated. If false, the page will be shown immediately.


This method will throw an exception if pageIndex < 0 || pageIndex >= pageCount (as returned by getPageCount()).

Parameters
pageIndex Target page which should be displayed.
animated Set to true, if a transitioning animation should be performed. Otherwise to false.

public abstract void setPageIndex (int pageIndex)

Sets the pageIndex to be displayed (0 is the first one), using our default decision on animating, which is to animate the transition if the page is next/before the current page, and not animate if further away. For custom animation control , use setPageIndex(int, boolean).


This method will throw an exception if pageIndex < 0 || pageIndex >= pageCount (as returned by getPageCount()).

Parameters
pageIndex Target page which should be displayed.