com.itextpdf.tool.xml.html
Class CssAppliersImpl

java.lang.Object
  extended by com.itextpdf.tool.xml.html.CssAppliersImpl
All Implemented Interfaces:
CssAppliers

public class CssAppliersImpl
extends Object
implements CssAppliers

Applies CSS to an Element using the appliers from the com.itextpdf.tool.xml.css.apply.

Author:
redlab_b

Field Summary
protected  ChunkCssApplier chunk
           
protected  ParagraphCssApplier paragraph
           
 
Constructor Summary
CssAppliersImpl()
           
CssAppliersImpl(FontProvider fontProvider)
           
 
Method Summary
 Element apply(Element e, Tag t, HtmlPipelineContext ctx)
          Convenience method.
 Element apply(Element e, Tag t, MarginMemory mm, PageSizeContainable psc, ImageProvider ip)
          Given the element e, this method will lookup the right applier for the given Element.
 CssAppliers clone()
           
 ChunkCssApplier getChunkCssAplier()
           
 void setChunkCssAplier(ChunkCssApplier chunkCssAplier)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

chunk

protected ChunkCssApplier chunk

paragraph

protected ParagraphCssApplier paragraph
Constructor Detail

CssAppliersImpl

public CssAppliersImpl()

CssAppliersImpl

public CssAppliersImpl(FontProvider fontProvider)
Method Detail

apply

public Element apply(Element e,
                     Tag t,
                     MarginMemory mm,
                     PageSizeContainable psc,
                     ImageProvider ip)
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:
  1. Chunk
  2. Paragraph
  3. NoNewLineParagraph
  4. HtmlCell
  5. List
  6. LineSeparator
  7. Image

Specified by:
apply in interface CssAppliers
Parameters:
e - the Element
t - the tag
mm - the MarginMemory
psc - the PageSize container
ip - an ImageProvider
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 interface CssAppliers
Parameters:
e - the Element
t - the tag
ctx - 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, ImageProvider)

getChunkCssAplier

public ChunkCssApplier getChunkCssAplier()
Specified by:
getChunkCssAplier in interface CssAppliers
Returns:
the chunk css applier

setChunkCssAplier

public void setChunkCssAplier(ChunkCssApplier chunkCssAplier)
Specified by:
setChunkCssAplier in interface CssAppliers

clone

public CssAppliers clone()
Specified by:
clone in interface CssAppliers
Overrides:
clone in class Object


Copyright © 2015. All Rights Reserved.