com.itextpdf.tool.xml.css.apply
Class ChunkCssApplier

java.lang.Object
  extended by com.itextpdf.tool.xml.css.apply.ChunkCssApplier

public class ChunkCssApplier
extends Object

Applies CSS Rules to Chunks


Field Summary
static List<String> BOLD
          FF4 and IE8 provide normal text and bold text.
 
Constructor Summary
ChunkCssApplier()
           
 
Method Summary
 Chunk apply(Chunk c, Tag t)
           
 void copyChunkStyles(Chunk source, Chunk target)
          Method used for copying styles from one chunk to another.
 float getWidestWord(Chunk c)
          Method used for retrieving the widest word of a chunk of text.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BOLD

public static final List<String> BOLD
FF4 and IE8 provide normal text and bold text. All other values are translated to one of these 2 styles
100 - 500 and "lighter" = normal.
600 - 900 and "bolder" = bold.

Constructor Detail

ChunkCssApplier

public ChunkCssApplier()
Method Detail

apply

public Chunk apply(Chunk c,
                   Tag t)

getWidestWord

public float getWidestWord(Chunk c)
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

public void copyChunkStyles(Chunk source,
                            Chunk target)
Method used for copying styles from one chunk to another. Could be deprecated if the content of a chunk can be overwritten.

Parameters:
source - chunk which contains the required styles.
target - chunk which needs the required styles.


Copyright © 2011. All Rights Reserved.