Package com.lowagie.rups.model
Class PageLoader
java.lang.Object
com.lowagie.rups.model.BackgroundTask
com.lowagie.rups.model.PageLoader
Loads all the PDFPage objects for SUN's PDF Renderer in Background.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean[]
True for pages with page number equal to index + 1 that are being loaded.protected boolean[]
True for pages with page number equal to index + 1 that have already been loaded.protected com.sun.pdfview.PDFFile
The PDFFile (SUN's PDF Renderer class)protected int
The total number of pages. -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.lowagie.rups.model.BackgroundTask
finished, interrupt, start
-
Field Details
-
file
protected com.sun.pdfview.PDFFile fileThe PDFFile (SUN's PDF Renderer class) -
numberOfPages
protected int numberOfPagesThe total number of pages. -
busy
protected boolean[] busyTrue for pages with page number equal to index + 1 that are being loaded. -
done
protected boolean[] doneTrue for pages with page number equal to index + 1 that have already been loaded.
-
-
Constructor Details
-
PageLoader
public PageLoader(com.sun.pdfview.PDFFile file) Creates a new page loader.- Parameters:
file
- the PDFFile (SUN's PDF Renderer)
-
-
Method Details
-
getNumberOfPages
public int getNumberOfPages()Getter for the number of pages.- Returns:
- the number of pages in the PDF file.
-
loadPage
public com.sun.pdfview.PDFPage loadPage(int pageNumber) Loads a page.- Parameters:
pageNumber
- the number of the page that has to be loaded.- Returns:
- the PDFPage that has been loaded.
-
doTask
public void doTask()Description copied from class:BackgroundTask
Implement this class; the time-consuming task will go here.- Specified by:
doTask
in classBackgroundTask
- See Also:
-