Class ChunkCssApplier
java.lang.Object
com.itextpdf.tool.xml.css.apply.ChunkCssApplier
- All Implemented Interfaces:
CssApplier<Chunk>
Applies CSS Rules to Chunks
-
Field Summary
FieldsModifier and TypeFieldDescriptionFF4 and IE8 provide normal text and bold text.protected FontProviderprotected final CssUtils -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(Chunk c, Tag t, MarginMemory mm, PageSizeContainable psc, HtmlPipelineContext ctx) Styles an elementvoidcopyChunkStyles(Chunk source, Chunk target) Method used for copying styles from one chunk to another.floatMethod used for retrieving the widest word of a chunk of text.protected booleanisBoldValue(String value) voidsetFontProvider(FontProvider fontProvider)
-
Field Details
-
BOLD
-
utils
-
fontProvider
-
-
Constructor Details
-
ChunkCssApplier
public ChunkCssApplier() -
ChunkCssApplier
-
-
Method Details
-
apply
-
apply
public Chunk apply(Chunk c, Tag t, MarginMemory mm, PageSizeContainable psc, HtmlPipelineContext ctx) Description copied from interface:CssApplierStyles an element- Specified by:
applyin interfaceCssApplier<Chunk>- Parameters:
c- the Chunk to apply CSS to.t- the tag containing the chunk datamm- the MarginMemorypsc- the PageSizeContainablectx- the HtmlPipelineContext- Returns:
- the styled chunk
-
applyFontStyles
-
getWidestWord
Method used for retrieving the widest word of a chunk of text. All styles of the chunk will be taken into account when calculating the width of the words.- Parameters:
c- chunk of which the widest word is required.- Returns:
- float containing the width of the widest word.
-
copyChunkStyles
-
getFontProvider
-
setFontProvider
-
isBoldValue
-