|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.lowagie.text.pdf.PdfChunk
public class PdfChunk
A PdfChunk
is the PDF translation of a Chunk
.
A PdfChunk
is a PdfString
in a certain
PdfFont
and Color
.
PdfString
,
Chunk
,
Font
Field Summary | |
---|---|
protected HashMap |
attributes
Metric attributes. |
protected BaseFont |
baseFont
|
protected boolean |
changeLeading
Indicates if the height and offset of the Image has to be taken into account |
protected String |
encoding
The encoding. |
protected com.lowagie.text.pdf.PdfFont |
font
The font for this PdfChunk . |
protected Image |
image
The image in this PdfChunk , if it has one |
protected boolean |
newlineSplit
true if the chunk split was cause by a newline. |
protected HashMap |
noStroke
Non metric attributes. |
protected float |
offsetX
The offset in the x direction for the image |
protected float |
offsetY
The offset in the y direction for the image |
protected SplitCharacter |
splitCharacter
|
protected String |
value
The value of this object. |
Method Summary | |
---|---|
boolean |
changeLeading()
|
float |
getTextRise()
Gets the text displacement relatiev to the baseline. |
char |
getUnicodeEquivalent(char c)
Gets the Unicode equivalent to a CID. |
float |
getWidthCorrected(float charSpacing,
float wordSpacing)
Gets the width of the PdfChunk taking into account the
extra character and word spacing. |
protected int |
getWord(String text,
int start)
|
boolean |
isNewlineSplit()
Checks if the PdfChunk split was caused by a newline. |
boolean |
isSplitCharacter(int start,
int current,
int end,
char[] cc,
PdfChunk[] ck)
Checks if a character can be used to split a PdfString . |
static boolean |
noPrint(char c)
|
String |
toString()
|
float |
trimLastSpace()
Trims the last space. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected String value
protected String encoding
protected com.lowagie.text.pdf.PdfFont font
PdfChunk
.
protected BaseFont baseFont
protected SplitCharacter splitCharacter
protected HashMap attributes
This attributes require the mesurement of characters widths when rendering such as underline.
protected HashMap noStroke
This attributes do not require the mesurement of characters widths when rendering such as Color.
protected boolean newlineSplit
true
if the chunk split was cause by a newline.
protected Image image
PdfChunk
, if it has one
protected float offsetX
protected float offsetY
protected boolean changeLeading
Method Detail |
---|
public char getUnicodeEquivalent(char c)
c
- the CID code
protected int getWord(String text, int start)
public boolean isNewlineSplit()
PdfChunk
split was caused by a newline.
true
if the PdfChunk
split was caused by a newline.public float getWidthCorrected(float charSpacing, float wordSpacing)
PdfChunk
taking into account the
extra character and word spacing.
charSpacing
- the extra character spacingwordSpacing
- the extra word spacing
public float getTextRise()
public float trimLastSpace()
public String toString()
toString
in class Object
Object.toString()
public boolean isSplitCharacter(int start, int current, int end, char[] cc, PdfChunk[] ck)
PdfString
.
for the moment every character less than or equal to SPACE and the character '-' are 'splitCharacters'.
isSplitCharacter
in interface SplitCharacter
start
- start position in the arraycurrent
- current position in the arrayend
- end position in the arraycc
- the character array that has to be checkedck
- chunk array
true
if the character can be used to split a string, false
otherwisepublic boolean changeLeading()
public static boolean noPrint(char c)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |