Package com.openhtmltopdf.render
Class DefaultObjectDrawerFactory
- java.lang.Object
-
- com.openhtmltopdf.render.DefaultObjectDrawerFactory
-
- All Implemented Interfaces:
FSObjectDrawerFactory
- Direct Known Subclasses:
StandardObjectDrawerFactory
public class DefaultObjectDrawerFactory extends java.lang.Object implements FSObjectDrawerFactory
Default FSObjectDrawer factory, which allows to register drawer for specified content type
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.String,FSObjectDrawer>
drawerMap
Maps content type => Drawer
-
Constructor Summary
Constructors Constructor Description DefaultObjectDrawerFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FSObjectDrawer
createDrawer(org.w3c.dom.Element e)
Determine an object drawer for the given object tag element.boolean
isReplacedObject(org.w3c.dom.Element e)
void
registerDrawer(java.lang.String contentType, FSObjectDrawer drawer)
-
-
-
Field Detail
-
drawerMap
private final java.util.Map<java.lang.String,FSObjectDrawer> drawerMap
Maps content type => Drawer
-
-
Method Detail
-
createDrawer
public FSObjectDrawer createDrawer(org.w3c.dom.Element e)
Description copied from interface:FSObjectDrawerFactory
Determine an object drawer for the given object tag element.- Specified by:
createDrawer
in interfaceFSObjectDrawerFactory
-
registerDrawer
public void registerDrawer(java.lang.String contentType, FSObjectDrawer drawer)
- Parameters:
contentType
- the content type this drawer is fordrawer
- Drawer
-
isReplacedObject
public boolean isReplacedObject(org.w3c.dom.Element e)
- Specified by:
isReplacedObject
in interfaceFSObjectDrawerFactory
- Parameters:
e
- eleemnt with tag name ofobject
.- Returns:
- true if this object drawer can handle this element.
-
-