Package com.pd4ml
Interface ProgressListener
-
public interface ProgressListenerReceives progress notifications during a conversion, for example to update a progress bar or to log timing information. Register an implementation withPD4ML.monitorProgressWith(ProgressListener).The constants identify the conversion stage of a notification (the
messageIDargument). Implementations are called on the conversion thread and should return quickly.
-
-
Field Summary
Fields Modifier and Type Field Description static intCONVERSION_BEGINThe conversion has started.static intCONVERSION_ENDThe conversion is complete.static intDOC_RENDER_IN_PROGRESSPages are being rendered; sent once per page, with the page number as the message.static intDOC_WRITE_BEGINWriting the output has started.static intDOCX_PRE_RENDER_DONEThe preparation of DOCX output is complete.static intHTML_LAYOUT_DONEThe layout is complete.static intHTML_LAYOUT_IN_PROGRESSThe layout is in progress; sent repeatedly.static intHTML_PARSEDThe source document has been parsed.static intMAIN_DOC_READThe source document has been loaded.static intPAGEBREAKS_ALIGNEDThe content has been distributed across pages.static intRENDERER_TREE_BUILTThe layout structure has been built from the parsed document.static intRTF_PRE_RENDER_DONEThe preparation of RTF output is complete.static intTOC_GENERATEDThe table of contents has been generated.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidprogressUpdate(int messageID, int progress, java.lang.String message, long msec)Called at each stage of the conversion.
-
-
-
Field Detail
-
CONVERSION_BEGIN
static final int CONVERSION_BEGIN
The conversion has started.- See Also:
- Constant Field Values
-
MAIN_DOC_READ
static final int MAIN_DOC_READ
The source document has been loaded.- See Also:
- Constant Field Values
-
HTML_PARSED
static final int HTML_PARSED
The source document has been parsed.- See Also:
- Constant Field Values
-
RENDERER_TREE_BUILT
static final int RENDERER_TREE_BUILT
The layout structure has been built from the parsed document.- See Also:
- Constant Field Values
-
HTML_LAYOUT_IN_PROGRESS
static final int HTML_LAYOUT_IN_PROGRESS
The layout is in progress; sent repeatedly.- See Also:
- Constant Field Values
-
HTML_LAYOUT_DONE
static final int HTML_LAYOUT_DONE
The layout is complete.- See Also:
- Constant Field Values
-
PAGEBREAKS_ALIGNED
static final int PAGEBREAKS_ALIGNED
The content has been distributed across pages.- See Also:
- Constant Field Values
-
TOC_GENERATED
static final int TOC_GENERATED
The table of contents has been generated.- See Also:
- Constant Field Values
-
DOC_RENDER_IN_PROGRESS
static final int DOC_RENDER_IN_PROGRESS
Pages are being rendered; sent once per page, with the page number as the message.- See Also:
- Constant Field Values
-
DOC_WRITE_BEGIN
static final int DOC_WRITE_BEGIN
Writing the output has started.- See Also:
- Constant Field Values
-
CONVERSION_END
static final int CONVERSION_END
The conversion is complete.- See Also:
- Constant Field Values
-
RTF_PRE_RENDER_DONE
static final int RTF_PRE_RENDER_DONE
The preparation of RTF output is complete.- See Also:
- Constant Field Values
-
DOCX_PRE_RENDER_DONE
static final int DOCX_PRE_RENDER_DONE
The preparation of DOCX output is complete.- See Also:
- Constant Field Values
-
-
Method Detail
-
progressUpdate
void progressUpdate(int messageID, int progress, java.lang.String message, long msec)Called at each stage of the conversion.- Parameters:
messageID- the conversion stage, one of the constants of this interfaceprogress- the estimated progress of the whole conversion, in percent (0 to 100)message- details about the stage, ornullmsec- the time elapsed since the start of the conversion, in milliseconds
-
-