Class AbstractIFDocumentHandler
- java.lang.Object
-
- org.apache.fop.render.intermediate.AbstractIFDocumentHandler
-
- All Implemented Interfaces:
IFDocumentHandler
- Direct Known Subclasses:
AbstractBinaryWritingIFDocumentHandler,AbstractXMLWritingIFDocumentHandler
public abstract class AbstractIFDocumentHandler extends java.lang.Object implements IFDocumentHandler
Abstract base class forIFDocumentHandlerimplementations.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractIFDocumentHandler(IFContext context)Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidendDocumentHeader()Indicates the end of the document header.voidendDocumentTrailer()Indicates the end of the document trailer.voidendPageHeader()Indicates the end of the page header.voidendPageTrailer()Indicates the end of the page trailer.IFContextgetContext()Returns the associated intermediate format context object.IFDocumentNavigationHandlergetDocumentNavigationHandler()Returns a document navigation handler if this feature is supported.StructureTreeEventHandlergetStructureTreeEventHandler()FOUserAgentgetUserAgent()Returns the associated user agent.voidsetDocumentLocale(java.util.Locale locale)voidstartDocument()Indicates the start of a document.voidstartDocumentHeader()Indicates the start of the document header.voidstartDocumentTrailer()Indicates the start of the document trailer.voidstartPageHeader()Indicates the start of the page header.voidstartPageTrailer()Indicates the start of the page trailer.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.fop.render.intermediate.IFDocumentHandler
endDocument, endPage, endPageContent, endPageSequence, getConfigurator, getFontInfo, getMimeType, handleExtensionObject, setDefaultFontInfo, setFontInfo, setResult, startPage, startPageContent, startPageSequence, supportsPagesOutOfOrder
-
-
-
-
Constructor Detail
-
AbstractIFDocumentHandler
protected AbstractIFDocumentHandler(IFContext context)
Default constructor.
-
-
Method Detail
-
getContext
public IFContext getContext()
Returns the associated intermediate format context object.- Specified by:
getContextin interfaceIFDocumentHandler- Returns:
- the context object
-
getUserAgent
public FOUserAgent getUserAgent()
Returns the associated user agent.- Returns:
- the user agent
-
getStructureTreeEventHandler
public StructureTreeEventHandler getStructureTreeEventHandler()
- Specified by:
getStructureTreeEventHandlerin interfaceIFDocumentHandler- Returns:
- the structure tree builder
-
getDocumentNavigationHandler
public IFDocumentNavigationHandler getDocumentNavigationHandler()
Returns a document navigation handler if this feature is supported.- Specified by:
getDocumentNavigationHandlerin interfaceIFDocumentHandler- Returns:
- the document navigation handler or null if not supported
-
startDocument
public void startDocument() throws IFExceptionIndicates the start of a document. This method may only be called once before any other event method.- Specified by:
startDocumentin interfaceIFDocumentHandler- Throws:
IFException- if an error occurs while handling this event
-
setDocumentLocale
public void setDocumentLocale(java.util.Locale locale)
- Specified by:
setDocumentLocalein interfaceIFDocumentHandler- Parameters:
locale- Locale of the document.
-
startDocumentHeader
public void startDocumentHeader() throws IFExceptionIndicates the start of the document header. This method is called right after theIFDocumentHandler.startDocument()method. Extensions sent to this painter betweenIFDocumentHandler.startDocumentHeader()andIFDocumentHandler.endDocumentHeader()apply to the document as a whole (like document metadata).- Specified by:
startDocumentHeaderin interfaceIFDocumentHandler- Throws:
IFException- if an error occurs while handling this event
-
endDocumentHeader
public void endDocumentHeader() throws IFExceptionIndicates the end of the document header. This method is called before the first page sequence.- Specified by:
endDocumentHeaderin interfaceIFDocumentHandler- Throws:
IFException- if an error occurs while handling this event
-
startDocumentTrailer
public void startDocumentTrailer() throws IFExceptionIndicates the start of the document trailer. This method is called after the last page sequence. Extensions sent to the painter betweenIFDocumentHandler.startDocumentTrailer()andIFDocumentHandler.endDocumentTrailer()apply to the document as a whole and is used for document-level content that is only known after all pages have been rendered (like named destinations or the bookmark tree).- Specified by:
startDocumentTrailerin interfaceIFDocumentHandler- Throws:
IFException- if an error occurs while handling this event
-
endDocumentTrailer
public void endDocumentTrailer() throws IFExceptionIndicates the end of the document trailer. This method is called right before theIFDocumentHandler.endDocument()method.- Specified by:
endDocumentTrailerin interfaceIFDocumentHandler- Throws:
IFException- if an error occurs while handling this event
-
startPageHeader
public void startPageHeader() throws IFExceptionIndicates the start of the page header.- Specified by:
startPageHeaderin interfaceIFDocumentHandler- Throws:
IFException- if an error occurs while handling this event
-
endPageHeader
public void endPageHeader() throws IFExceptionIndicates the end of the page header.- Specified by:
endPageHeaderin interfaceIFDocumentHandler- Throws:
IFException- if an error occurs while handling this event
-
startPageTrailer
public void startPageTrailer() throws IFExceptionIndicates the start of the page trailer. The page trailer is used for writing down page elements which are only know after handling the page itself (like PDF targets).- Specified by:
startPageTrailerin interfaceIFDocumentHandler- Throws:
IFException- if an error occurs while handling this event
-
endPageTrailer
public void endPageTrailer() throws IFExceptionIndicates the end of the page trailer.- Specified by:
endPageTrailerin interfaceIFDocumentHandler- Throws:
IFException- if an error occurs while handling this event
-
-