public class LinearizedSupport extends Object implements PropertyChangeListener
This code is copyright the Big Faceless Organization. You're welcome to use, modify and distribute it in any form in your own projects, provided those projects continue to make use of the Big Faceless PDF library.
DocumentPanel.getLinearizedSupport()
,
PDF.getLoadState(int)
Modifier and Type | Method and Description |
---|---|
float |
getLoadProgress()
Get the progress of the document load, from 0 to 1 (fully loaded)
|
void |
invokeOnCompletion(Runnable precondition,
Runnable task)
Schedule the task to be run on the EDT when the precondition task (run in a background thread)
has completed.
|
void |
invokeOnDocumentLoad(Runnable r)
Run an event when all pages have been loaded.
|
void |
invokeOnPageLoad(int pagenumber,
Runnable r)
Run an event when the specified page has loaded.
|
void |
invokeOnPageLoadWithDialog(int pagenumber,
Runnable r)
Run an event when the specified page has loaded.
|
boolean |
isFullyLoaded()
Return true if the PDF is fully loaded, false otherwise
|
boolean |
isPageLoaded(int pagenumber)
Return true if the specified page is loaded, false otherwise
|
void |
propertyChange(PropertyChangeEvent event) |
public void propertyChange(PropertyChangeEvent event)
propertyChange
in interface PropertyChangeListener
public void invokeOnPageLoadWithDialog(int pagenumber, Runnable r)
pagenumber
- the page numberr
- the task to run on load, which will be run on the Swing EDTpublic void invokeOnPageLoad(int pagenumber, Runnable r)
pagenumber
- the page numberr
- the task to run on load, which will be run on the Swing EDTpublic void invokeOnDocumentLoad(Runnable r)
r
- the task to run on load, which will be run on the Swing EDTpublic void invokeOnCompletion(Runnable precondition, Runnable task)
invokeOnCompletion(new Runnable() { public void run() { pdf.getForm().getElements(); } }, new Runable() { public void run() { // Do something with form. } }
precondition
- the Runnable object that must complete first - will be run in a background threadtask
- the optional task to be run when the precondition completes - will be run on the EDTpublic boolean isPageLoaded(int pagenumber)
pagenumber
- the pagenumber to querypublic boolean isFullyLoaded()
public float getLoadProgress()
Copyright © 2001-2017 Big Faceless Organization