com.lowagie.rups.view

Interface PageNavigationListener

public interface PageNavigationListener

Interface that has to be implemented by every class that listens to page navigation features; keys that are pressed, buttons that are pushed,...
Method Summary
intgetCurrentPageNumber()
Returns the current page number of a document.
intgetTotalNumberOfPages()
Returns the total number of pages in a document.
intgotoFirstPage()
Goes to the first page in a document.
intgotoLastPage()
Goes to the last page in a document.
intgotoNextPage()
Goes to the previous page in a document.
intgotoPage(int pageNumber)
Goes to a specific page number in a document.
intgotoPreviousPage()
Goes to the previous page in a document.

Method Detail

getCurrentPageNumber

public int getCurrentPageNumber()
Returns the current page number of a document.

Returns: the current page number.

getTotalNumberOfPages

public int getTotalNumberOfPages()
Returns the total number of pages in a document.

Returns: the total number of pages in a document.

gotoFirstPage

public int gotoFirstPage()
Goes to the first page in a document.

Returns: the resulting page number. Can be different from 1 if the document is null

gotoLastPage

public int gotoLastPage()
Goes to the last page in a document.

Returns: the resulting page number. Can be different from the total number of pages if the document is null

gotoNextPage

public int gotoNextPage()
Goes to the previous page in a document.

Returns: the resulting page number. Can be different from (current page + 1) if the document is null or the current page equals the total number of pages.

gotoPage

public int gotoPage(int pageNumber)
Goes to a specific page number in a document.

Parameters: pageNumber

Returns: the resulting page number. Can be different from pageNumber if pageNumber doesn't exist.

gotoPreviousPage

public int gotoPreviousPage()
Goes to the previous page in a document.

Returns: the resulting page number. Can be different from (current page - 1) if the document is null or the current page = 1.