public class PageLoader extends BackgroundTask
Modifier and Type | Field and Description |
---|---|
protected boolean[] |
busy
True for pages with page number equal to index + 1 that are being loaded.
|
protected boolean[] |
done
True for pages with page number equal to index + 1 that have already been loaded.
|
protected com.sun.pdfview.PDFFile |
file
The PDFFile (SUN's PDF Renderer class)
|
protected int |
numberOfPages
The total number of pages.
|
Constructor and Description |
---|
PageLoader(com.sun.pdfview.PDFFile file)
Creates a new page loader.
|
Modifier and Type | Method and Description |
---|---|
void |
doTask()
Implement this class; the time-consuming task will go here.
|
int |
getNumberOfPages()
Getter for the number of pages.
|
com.sun.pdfview.PDFPage |
loadPage(int pageNumber)
Loads a page.
|
finished, interrupt, start
protected com.sun.pdfview.PDFFile file
protected int numberOfPages
protected boolean[] busy
protected boolean[] done
public PageLoader(com.sun.pdfview.PDFFile file)
file
- the PDFFile (SUN's PDF Renderer)public int getNumberOfPages()
public com.sun.pdfview.PDFPage loadPage(int pageNumber)
pageNumber
- the number of the page that has to be loaded.public void doTask()
BackgroundTask
doTask
in class BackgroundTask
BackgroundTask.doTask()
Copyright © 2013 InProTopia Corporation. All Rights Reserved.