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 Elementapply(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.Elementapply(Element e, Tag t, HtmlPipelineContext ctx)Convenience method.CssAppliersclone()ChunkCssAppliergetChunkCssAplier()protected CssAppliersImplgetClonedObject()CssAppliergetCssApplier(java.lang.Class<?> s)voidputCssApplier(java.lang.Class<?> s, CssApplier c)voidsetChunkCssAplier(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:CssAppliersGiven 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:
applyin interfaceCssAppliers- Parameters:
e- the Elementt- the tagmm- the MarginMemorypsc- thePageSizecontainerctx- 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:CssAppliersConvenience method.- Specified by:
applyin 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:
getChunkCssAplierin interfaceCssAppliers- Returns:
- the chunk css applier
-
setChunkCssAplier
public void setChunkCssAplier(ChunkCssApplier chunkCssAplier)
- Specified by:
setChunkCssAplierin interfaceCssAppliers
-
clone
public CssAppliers clone()
- Specified by:
clonein interfaceCssAppliers- Overrides:
clonein classjava.lang.Object
-
getClonedObject
protected CssAppliersImpl getClonedObject()
-
-