CssApplier<Chunk>
public class ChunkCssApplier extends java.lang.Object implements CssApplier<Chunk>
Modifier and Type | Field | Description |
---|---|---|
static java.util.List<java.lang.String> |
BOLD |
FF4 and IE8 provide normal text and bold text.
|
protected FontProvider |
fontProvider |
|
protected CssUtils |
utils |
Constructor | Description |
---|---|
ChunkCssApplier() |
|
ChunkCssApplier(FontProvider fontProvider) |
Modifier and Type | Method | 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(java.lang.String value) |
|
void |
setFontProvider(FontProvider fontProvider) |
public static final java.util.List<java.lang.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 datamm
- the MarginMemorypsc
- the PageSizeContainablectx
- the HtmlPipelineContextpublic 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(java.lang.String value)
Copyright © 1998–2018. All rights reserved.