Package com.openhtmltopdf.event
Class DefaultDocumentListener
java.lang.Object
com.openhtmltopdf.event.DefaultDocumentListener
- All Implemented Interfaces:
DocumentListener
Default, do-nothing implementation of a
DocumentListener
; implements all methods in DocumentListener
but the methods do nothing. Subclass this class and override whichever methods you need to trap.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Indicates document layout has complete, e.g.void
Indicates document has been requested (e.g.void
Called when document layout failed with an exception.void
Called when document render failed with an exception.
-
Constructor Details
-
DefaultDocumentListener
public DefaultDocumentListener()
-
-
Method Details
-
documentStarted
public void documentStarted()Indicates document has been requested (e.g. a new document is going to be loaded). This will be called before any activity takes place for the document.- Specified by:
documentStarted
in interfaceDocumentListener
-
documentLoaded
public void documentLoaded()Indicates document layout has complete, e.g. document is fully "loaded" for display; this is not a callback for the document source (e.g. XML) being loaded. This method will be called on every layout run (including, for example, after panel resizes).- Specified by:
documentLoaded
in interfaceDocumentListener
-
onLayoutException
Called when document layout failed with an exception. AllThrowable
objects thrown (except forThreadDeath
) during layout and not otherwise handled will be provided to this method. If aDocumentListener
has been defined an XHTML panel, the listener is entirely responsible for handling the exception. No other action will be taken.- Specified by:
onLayoutException
in interfaceDocumentListener
-
onRenderException
Called when document render failed with an exception. AllThrowable
objects thrown (except forThreadDeath
) during render and not otherwise handled will be provided to this method. If aDocumentListener
has been defined an XHTML panel, the listener is entirely responsible for handling the exception. No other action will be taken.- Specified by:
onRenderException
in interfaceDocumentListener
-