Package org.apache.fop.render.svg
Class AbstractSVGDocumentHandler
java.lang.Object
org.apache.fop.render.intermediate.AbstractIFDocumentHandler
org.apache.fop.render.intermediate.AbstractXMLWritingIFDocumentHandler
org.apache.fop.render.svg.AbstractSVGDocumentHandler
- All Implemented Interfaces:
IFDocumentHandler,SVGConstants,XMLConstants
- Direct Known Subclasses:
SVGDocumentHandler,SVGPrintDocumentHandler
public abstract class AbstractSVGDocumentHandler
extends AbstractXMLWritingIFDocumentHandler
implements SVGConstants
Abstract base class for SVG Painter implementations.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected FontInfoFont configurationprivate static org.apache.commons.logging.Loglogging instanceprivate intprivate static final intprivate static final intprotected IFStateHolds the intermediate format stateFields inherited from class org.apache.fop.render.intermediate.AbstractXMLWritingIFDocumentHandler
handler, tFactoryFields inherited from interface org.apache.fop.render.svg.SVGConstants
FILE_EXTENSION_SVG, MIME_SVG_PRINT, MIME_TYPE, NAMESPACE, SVG_ELEMENTFields inherited from interface org.apache.fop.util.XMLConstants
CDATA, XLINK_HREF, XLINK_NAMESPACE, XLINK_PREFIX, XML_NAMESPACE, XML_PREFIX, XML_SPACE, XMLNS_NAMESPACE_URI, XMLNS_PREFIX -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidIndicates the end of the document header.Returns the configurator for this document handler, if any.Returns the font set to work with.protected StringReturns the main namespace used for generated XML content.voidhandleExtensionObject(Object extension) Handles an extension object.voidsetDefaultFontInfo(FontInfo fontInfo) Sets the default font set (with no custom configuration).voidsetFontInfo(FontInfo fontInfo) Sets the font set to work with.voidIndicates the start of the document header.Methods inherited from class org.apache.fop.render.intermediate.AbstractXMLWritingIFDocumentHandler
createContentHandler, setResultMethods inherited from class org.apache.fop.render.intermediate.AbstractIFDocumentHandler
endDocumentTrailer, endPageHeader, endPageTrailer, getContext, getDocumentNavigationHandler, getStructureTreeEventHandler, getUserAgent, setDocumentLocale, startDocument, startDocumentTrailer, startPageHeader, startPageTrailerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.fop.render.intermediate.IFDocumentHandler
endDocument, endPage, endPageContent, endPageSequence, getMimeType, startPage, startPageContent, startPageSequence, supportsPagesOutOfOrder
-
Field Details
-
log
private static org.apache.commons.logging.Log loglogging instance -
fontInfo
Font configuration -
state
Holds the intermediate format state -
MODE_NORMAL
private static final int MODE_NORMAL- See Also:
-
MODE_TEXT
private static final int MODE_TEXT- See Also:
-
mode
private int mode
-
-
Constructor Details
-
AbstractSVGDocumentHandler
-
-
Method Details
-
getMainNamespace
Returns the main namespace used for generated XML content.- Specified by:
getMainNamespacein classAbstractXMLWritingIFDocumentHandler- Returns:
- the main namespace
-
getFontInfo
Returns the font set to work with.- Specified by:
getFontInfoin interfaceIFDocumentHandler- Returns:
- the font info object
-
setFontInfo
Sets the font set to work with.- Specified by:
setFontInfoin interfaceIFDocumentHandler- Parameters:
fontInfo- the font info object
-
setDefaultFontInfo
Sets the default font set (with no custom configuration).- Specified by:
setDefaultFontInfoin interfaceIFDocumentHandler- Parameters:
fontInfo- the font info object to populate
-
getConfigurator
Returns the configurator for this document handler, if any.- Specified by:
getConfiguratorin interfaceIFDocumentHandler- Returns:
- the configurator or null if there's no configurator
-
startDocumentHeader
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:
startDocumentHeaderin interfaceIFDocumentHandler- Overrides:
startDocumentHeaderin classAbstractIFDocumentHandler- Throws:
IFException- if an error occurs while handling this event
-
endDocumentHeader
Indicates the end of the document header. This method is called before the first page sequence.- Specified by:
endDocumentHeaderin interfaceIFDocumentHandler- Overrides:
endDocumentHeaderin classAbstractIFDocumentHandler- Throws:
IFException- if an error occurs while handling this event
-
handleExtensionObject
Handles an extension object. This can be a DOM document or any arbitrary object. If an implementation doesn't know how to handle a particular extension it is simply ignored.- Specified by:
handleExtensionObjectin interfaceIFDocumentHandler- Parameters:
extension- the extension object- Throws:
IFException- if an error occurs while handling this event
-