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 forIFDocumentHandler
implementations.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractIFDocumentHandler(IFContext context)
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
endDocumentHeader()
Indicates the end of the document header.void
endDocumentTrailer()
Indicates the end of the document trailer.void
endPageHeader()
Indicates the end of the page header.void
endPageTrailer()
Indicates the end of the page trailer.IFContext
getContext()
Returns the associated intermediate format context object.IFDocumentNavigationHandler
getDocumentNavigationHandler()
Returns a document navigation handler if this feature is supported.StructureTreeEventHandler
getStructureTreeEventHandler()
FOUserAgent
getUserAgent()
Returns the associated user agent.void
setDocumentLocale(java.util.Locale locale)
void
startDocument()
Indicates the start of a document.void
startDocumentHeader()
Indicates the start of the document header.void
startDocumentTrailer()
Indicates the start of the document trailer.void
startPageHeader()
Indicates the start of the page header.void
startPageTrailer()
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:
getContext
in interfaceIFDocumentHandler
- Returns:
- the context object
-
getUserAgent
public FOUserAgent getUserAgent()
Returns the associated user agent.- Returns:
- the user agent
-
getStructureTreeEventHandler
public StructureTreeEventHandler getStructureTreeEventHandler()
- Specified by:
getStructureTreeEventHandler
in interfaceIFDocumentHandler
- Returns:
- the structure tree builder
-
getDocumentNavigationHandler
public IFDocumentNavigationHandler getDocumentNavigationHandler()
Returns a document navigation handler if this feature is supported.- Specified by:
getDocumentNavigationHandler
in interfaceIFDocumentHandler
- Returns:
- the document navigation handler or null if not supported
-
startDocument
public void startDocument() throws IFException
Indicates the start of a document. This method may only be called once before any other event method.- Specified by:
startDocument
in interfaceIFDocumentHandler
- Throws:
IFException
- if an error occurs while handling this event
-
setDocumentLocale
public void setDocumentLocale(java.util.Locale locale)
- Specified by:
setDocumentLocale
in interfaceIFDocumentHandler
- Parameters:
locale
- Locale of the document.
-
startDocumentHeader
public void startDocumentHeader() throws IFException
Indicates 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:
startDocumentHeader
in interfaceIFDocumentHandler
- Throws:
IFException
- if an error occurs while handling this event
-
endDocumentHeader
public void endDocumentHeader() throws IFException
Indicates the end of the document header. This method is called before the first page sequence.- Specified by:
endDocumentHeader
in interfaceIFDocumentHandler
- Throws:
IFException
- if an error occurs while handling this event
-
startDocumentTrailer
public void startDocumentTrailer() throws IFException
Indicates 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:
startDocumentTrailer
in interfaceIFDocumentHandler
- Throws:
IFException
- if an error occurs while handling this event
-
endDocumentTrailer
public void endDocumentTrailer() throws IFException
Indicates the end of the document trailer. This method is called right before theIFDocumentHandler.endDocument()
method.- Specified by:
endDocumentTrailer
in interfaceIFDocumentHandler
- Throws:
IFException
- if an error occurs while handling this event
-
startPageHeader
public void startPageHeader() throws IFException
Indicates the start of the page header.- Specified by:
startPageHeader
in interfaceIFDocumentHandler
- Throws:
IFException
- if an error occurs while handling this event
-
endPageHeader
public void endPageHeader() throws IFException
Indicates the end of the page header.- Specified by:
endPageHeader
in interfaceIFDocumentHandler
- Throws:
IFException
- if an error occurs while handling this event
-
startPageTrailer
public void startPageTrailer() throws IFException
Indicates 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:
startPageTrailer
in interfaceIFDocumentHandler
- Throws:
IFException
- if an error occurs while handling this event
-
endPageTrailer
public void endPageTrailer() throws IFException
Indicates the end of the page trailer.- Specified by:
endPageTrailer
in interfaceIFDocumentHandler
- Throws:
IFException
- if an error occurs while handling this event
-
-