- java.lang.Object
-
- javax.swing.SwingWorker<Void,StringBuilder>
-
- org.icepdf.ri.util.TextExtractionTask
-
- All Implemented Interfaces:
Runnable,Future<Void>,RunnableFuture<Void>
public class TextExtractionTask extends SwingWorker<Void,StringBuilder>
This class is a utility for extracting text from a PDF document.- Since:
- 1.1
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class javax.swing.SwingWorker
SwingWorker.StateValue
-
-
Constructor Summary
Constructors Constructor Description TextExtractionTask(Document document, File file, ProgressMonitor progressMonitor, ResourceBundle messageBundle)Create a new instance of the TextExtraction object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected VoiddoInBackground()protected voiddone()protected voidprocess(List<StringBuilder> chunks)-
Methods inherited from class javax.swing.SwingWorker
addPropertyChangeListener, cancel, execute, firePropertyChange, get, get, getProgress, getPropertyChangeSupport, getState, isCancelled, isDone, publish, removePropertyChangeListener, run, setProgress
-
-
-
-
Constructor Detail
-
TextExtractionTask
public TextExtractionTask(Document document, File file, ProgressMonitor progressMonitor, ResourceBundle messageBundle)
Create a new instance of the TextExtraction object.- Parameters:
document- document whose text will be extracted.file- output file for extracted text.progressMonitor- progressMonitor to update with extraction progressmessageBundle- main message bundle for i18n
-
-
Method Detail
-
done
protected void done()
- Overrides:
donein classSwingWorker<Void,StringBuilder>
-
process
protected void process(List<StringBuilder> chunks)
- Overrides:
processin classSwingWorker<Void,StringBuilder>
-
doInBackground
protected Void doInBackground()
- Specified by:
doInBackgroundin classSwingWorker<Void,StringBuilder>
-
-