Top Description Methods
com.openhtmltopdf.event

public Interface DocumentListener

Known Direct Implementers
com.openhtmltopdf.swing.NaiveUserAgent, com.openhtmltopdf.event.DefaultDocumentListener

Implementations of this listener interface receive notifications about various document and layout events. Events are called on the Event Dispatch Thread, and will block any EDT activity until the methods return; make sure you do as little as possible in each method, or where necessary, spin the task off to a separate thread.

Method Summary

Modifier and TypeMethod and Description
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.

public void
documentStarted()

Indicates document has been requested (e.g. a new document is going to be loaded).

public void
onLayoutException(Throwable t)

Called when document layout failed with an exception.

public void
onRenderException(Throwable t)

Called when document render failed with an exception.

Method Detail

documentLoadedback to summary
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).

documentStartedback to summary
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.

onLayoutExceptionback to summary
public void onLayoutException(Throwable t)

Called when document layout failed with an exception. All Throwable objects thrown (except for ThreadDeath) during layout and not otherwise handled will be provided to this method. If a DocumentListener has been defined an XHTML panel, the listener is entirely responsible for handling the exception. No other action will be taken.

onRenderExceptionback to summary
public void onRenderException(Throwable t)

Called when document render failed with an exception. All Throwable objects thrown (except for ThreadDeath) during render and not otherwise handled will be provided to this method. If a DocumentListener has been defined an XHTML panel, the listener is entirely responsible for handling the exception. No other action will be taken.