Package com.itextpdf.tool.xml.html
Class CssAppliersImpl
- java.lang.Object
-
- com.itextpdf.tool.xml.html.CssAppliersImpl
-
- All Implemented Interfaces:
CssAppliers
public class CssAppliersImpl extends java.lang.Object implements CssAppliers
Applies CSS to an Element using the appliers from thecom.itextpdf.tool.xml.css.apply
.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.Class<?>,CssApplier<? extends Element>>
map
-
Constructor Summary
Constructors Constructor Description CssAppliersImpl()
CssAppliersImpl(FontProvider fontProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Element
apply(Element e, Tag t, MarginMemory mm, PageSizeContainable psc, HtmlPipelineContext ctx)
Given the element e, this method will lookup the right applier for the given Element.Element
apply(Element e, Tag t, HtmlPipelineContext ctx)
Convenience method.CssAppliers
clone()
ChunkCssApplier
getChunkCssAplier()
protected CssAppliersImpl
getClonedObject()
CssApplier
getCssApplier(java.lang.Class<?> s)
void
putCssApplier(java.lang.Class<?> s, CssApplier c)
void
setChunkCssAplier(ChunkCssApplier chunkCssAplier)
-
-
-
Field Detail
-
map
private java.util.Map<java.lang.Class<?>,CssApplier<? extends Element>> map
-
-
Constructor Detail
-
CssAppliersImpl
public CssAppliersImpl()
-
CssAppliersImpl
public CssAppliersImpl(FontProvider fontProvider)
-
-
Method Detail
-
putCssApplier
public void putCssApplier(java.lang.Class<?> s, CssApplier c)
-
getCssApplier
public CssApplier getCssApplier(java.lang.Class<?> s)
-
apply
public Element apply(Element e, Tag t, MarginMemory mm, PageSizeContainable psc, HtmlPipelineContext ctx)
Description copied from interface:CssAppliers
Given the element e, this method will lookup the right applier for the given Element. The mapping is done by instance of.
order of check:- Specified by:
apply
in interfaceCssAppliers
- Parameters:
e
- the Elementt
- the tagmm
- the MarginMemorypsc
- thePageSize
containerctx
- an HtmlPipelineContext- Returns:
- the element with CSS applied onto, note: the element can be a new element.
-
apply
public Element apply(Element e, Tag t, HtmlPipelineContext ctx)
Description copied from interface:CssAppliers
Convenience method.- Specified by:
apply
in interfaceCssAppliers
- Parameters:
e
- the Elementt
- the tagctx
- the Context object- Returns:
- the element with CSS applied onto, note: the element can be a new element.
- See Also:
CssAppliers.apply(Element, Tag, MarginMemory, PageSizeContainable, HtmlPipelineContext)
-
getChunkCssAplier
public ChunkCssApplier getChunkCssAplier()
- Specified by:
getChunkCssAplier
in interfaceCssAppliers
- Returns:
- the chunk css applier
-
setChunkCssAplier
public void setChunkCssAplier(ChunkCssApplier chunkCssAplier)
- Specified by:
setChunkCssAplier
in interfaceCssAppliers
-
clone
public CssAppliers clone()
- Specified by:
clone
in interfaceCssAppliers
- Overrides:
clone
in classjava.lang.Object
-
getClonedObject
protected CssAppliersImpl getClonedObject()
-
-