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 FontInfo
Font configurationprivate static org.apache.commons.logging.Log
logging instanceprivate int
private static final int
private static final int
protected IFState
Holds the intermediate format stateFields inherited from class org.apache.fop.render.intermediate.AbstractXMLWritingIFDocumentHandler
handler, tFactory
Fields inherited from interface org.apache.fop.render.svg.SVGConstants
FILE_EXTENSION_SVG, MIME_SVG_PRINT, MIME_TYPE, NAMESPACE, SVG_ELEMENT
Fields 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 TypeMethodDescriptionvoid
Indicates the end of the document header.Returns the configurator for this document handler, if any.Returns the font set to work with.protected String
Returns the main namespace used for generated XML content.void
handleExtensionObject
(Object extension) Handles an extension object.void
setDefaultFontInfo
(FontInfo fontInfo) Sets the default font set (with no custom configuration).void
setFontInfo
(FontInfo fontInfo) Sets the font set to work with.void
Indicates the start of the document header.Methods inherited from class org.apache.fop.render.intermediate.AbstractXMLWritingIFDocumentHandler
createContentHandler, setResult
Methods inherited from class org.apache.fop.render.intermediate.AbstractIFDocumentHandler
endDocumentTrailer, endPageHeader, endPageTrailer, getContext, getDocumentNavigationHandler, getStructureTreeEventHandler, getUserAgent, setDocumentLocale, startDocument, startDocumentTrailer, startPageHeader, startPageTrailer
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, 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:
getMainNamespace
in classAbstractXMLWritingIFDocumentHandler
- Returns:
- the main namespace
-
getFontInfo
Returns the font set to work with.- Specified by:
getFontInfo
in interfaceIFDocumentHandler
- Returns:
- the font info object
-
setFontInfo
Sets the font set to work with.- Specified by:
setFontInfo
in interfaceIFDocumentHandler
- Parameters:
fontInfo
- the font info object
-
setDefaultFontInfo
Sets the default font set (with no custom configuration).- Specified by:
setDefaultFontInfo
in interfaceIFDocumentHandler
- Parameters:
fontInfo
- the font info object to populate
-
getConfigurator
Returns the configurator for this document handler, if any.- Specified by:
getConfigurator
in 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:
startDocumentHeader
in interfaceIFDocumentHandler
- Overrides:
startDocumentHeader
in 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:
endDocumentHeader
in interfaceIFDocumentHandler
- Overrides:
endDocumentHeader
in 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:
handleExtensionObject
in interfaceIFDocumentHandler
- Parameters:
extension
- the extension object- Throws:
IFException
- if an error occurs while handling this event
-