public class ChunkCssApplier extends Object implements CssApplier<Chunk>
| Modifier and Type | Field and Description |
|---|---|
static List<String> |
BOLD
FF4 and IE8 provide normal text and bold text.
|
protected FontProvider |
fontProvider |
protected CssUtils |
utils |
| Constructor and Description |
|---|
ChunkCssApplier() |
ChunkCssApplier(FontProvider fontProvider) |
| Modifier and Type | Method and Description |
|---|---|
Chunk |
apply(Chunk c, Tag t) |
Chunk |
apply(Chunk c, Tag t, MarginMemory mm, PageSizeContainable psc, HtmlPipelineContext ctx)
Styles an element
|
Font |
applyFontStyles(Tag t) |
void |
copyChunkStyles(Chunk source, Chunk target)
Method used for copying styles from one chunk to another.
|
FontProvider |
getFontProvider() |
float |
getWidestWord(Chunk c)
Method used for retrieving the widest word of a chunk of text.
|
protected boolean |
isBoldValue(String value) |
void |
setFontProvider(FontProvider fontProvider) |
public static final List<String> BOLD
protected final CssUtils utils
protected FontProvider fontProvider
public ChunkCssApplier()
public ChunkCssApplier(FontProvider fontProvider)
public Chunk apply(Chunk c, Tag t, MarginMemory mm, PageSizeContainable psc, HtmlPipelineContext ctx)
CssApplier
apply in interface CssApplier<Chunk>
c - the Chunk to apply CSS to.
t - the tag containing the chunk data
mm - the MarginMemory
psc - the PageSizeContainable
ctx - the HtmlPipelineContext
public float getWidestWord(Chunk c)
c - chunk of which the widest word is required.
public void copyChunkStyles(Chunk source, Chunk target)
source - chunk which contains the required styles.
target - chunk which needs the required styles.
public FontProvider getFontProvider()
public void setFontProvider(FontProvider fontProvider)
protected boolean isBoldValue(String value)
Copyright © 1998–2021. All rights reserved.