public class ChunkCssApplier extends Object
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) |
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)
c
- the Chunk to apply CSS to.
t
- the tag containing the chunk data
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 © 2016. All rights reserved.