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
Fields Modifier and Type Field Description protected FontInfofontInfoFont configurationprivate static org.apache.commons.logging.Logloglogging instanceprivate intmodeprivate static intMODE_NORMALprivate static intMODE_TEXTprotected IFStatestateHolds the intermediate format state-
Fields 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 Constructor Description AbstractSVGDocumentHandler(IFContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidendDocumentHeader()Indicates the end of the document header.IFDocumentHandlerConfiguratorgetConfigurator()Returns the configurator for this document handler, if any.FontInfogetFontInfo()Returns the font set to work with.protected java.lang.StringgetMainNamespace()Returns the main namespace used for generated XML content.voidhandleExtensionObject(java.lang.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.voidstartDocumentHeader()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 Detail
-
log
private static org.apache.commons.logging.Log log
logging instance
-
fontInfo
protected FontInfo fontInfo
Font configuration
-
state
protected IFState state
Holds the intermediate format state
-
MODE_NORMAL
private static final int MODE_NORMAL
- See Also:
- Constant Field Values
-
MODE_TEXT
private static final int MODE_TEXT
- See Also:
- Constant Field Values
-
mode
private int mode
-
-
Constructor Detail
-
AbstractSVGDocumentHandler
public AbstractSVGDocumentHandler(IFContext context)
-
-
Method Detail
-
getMainNamespace
protected java.lang.String getMainNamespace()
Returns the main namespace used for generated XML content.- Specified by:
getMainNamespacein classAbstractXMLWritingIFDocumentHandler- Returns:
- the main namespace
-
getFontInfo
public FontInfo getFontInfo()
Returns the font set to work with.- Specified by:
getFontInfoin interfaceIFDocumentHandler- Returns:
- the font info object
-
setFontInfo
public void setFontInfo(FontInfo fontInfo)
Sets the font set to work with.- Specified by:
setFontInfoin interfaceIFDocumentHandler- Parameters:
fontInfo- the font info object
-
setDefaultFontInfo
public void setDefaultFontInfo(FontInfo fontInfo)
Sets the default font set (with no custom configuration).- Specified by:
setDefaultFontInfoin interfaceIFDocumentHandler- Parameters:
fontInfo- the font info object to populate
-
getConfigurator
public IFDocumentHandlerConfigurator 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
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- Overrides:
startDocumentHeaderin classAbstractIFDocumentHandler- 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- Overrides:
endDocumentHeaderin classAbstractIFDocumentHandler- Throws:
IFException- if an error occurs while handling this event
-
handleExtensionObject
public void handleExtensionObject(java.lang.Object extension) throws IFExceptionHandles 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
-
-