com.lowagie.text.pdf
public class PdfLine extends Object
PdfLine
defines an array with PdfChunk
-objects
that fit into 1 line.
Field Summary | |
---|---|
protected int | alignment The alignment of the line. |
protected float | height The heigth of the line. |
protected boolean | isRTL |
protected float | left The left indentation of the line. |
protected ArrayList | line The arraylist containing the chunks. |
protected Chunk | listSymbol The listsymbol (if necessary). |
protected boolean | newlineSplittrue if the chunk splitting was caused by a newline. |
protected float | originalWidth The original width. |
protected float | symbolIndent The listsymbol (if necessary). |
protected float | width The width of the line. |
Constructor Summary | |
---|---|
PdfLine(float left, float right, int alignment, float height)
Constructs a new PdfLine -object.
| |
PdfLine(float left, float remainingWidth, int alignment, boolean newlineSplit, ArrayList line, boolean isRTL) |
Method Summary | |
---|---|
PdfChunk | add(PdfChunk chunk)
Adds a PdfChunk to the PdfLine .
|
void | addToLine(PdfChunk chunk) |
float | getAscender()
Gets the maximum size of the ascender for all the fonts used
in this line. |
PdfChunk | getChunk(int idx)
Gets a PdfChunk by index. |
float | getDescender()
Gets the biggest descender for all the fonts used
in this line. |
int | getLastStrokeChunk()
Gets the index of the last PdfChunk with metric attributes |
float | getMaxSizeSimple()
Gets the maximum size of all the fonts used in this line
including images. |
float | getOriginalWidth()
Gets the original width of the line. |
float | getWidthCorrected(float charSpacing, float wordSpacing)
Gets a width corrected with a charSpacing and wordSpacing. |
boolean | hasToBeJustified()
Checks if this line has to be justified.
|
float | height()
Returns the height of the line.
|
float | indentLeft()
Returns the left indentation of the line taking the alignment of the line into account.
|
boolean | isNewlineSplit()
Checks if a newline caused the line split. |
boolean | isRTL() |
Iterator | iterator()
Returns an iterator of PdfChunk s.
|
float | listIndent()
Return the indentation needed to show the listsymbol.
|
Chunk | listSymbol()
Returns the listsymbol of this line.
|
int | numberOfSpaces()
Returns the number of space-characters in this line.
|
void | resetAlignment()
Resets the alignment of this line.
|
void | setExtraIndent(float extra) Adds extra indentation to the left (for Paragraph.setFirstLineIndent). |
void | setListItem(ListItem listItem)
Sets the listsymbol of this line.
|
int | size()
Returns the number of chunks in the line.
|
String | toString()
Get the string representation of what is in this line.
|
float | widthLeft()
Returns the width that is left, after a maximum of characters is added to the line.
|
true
if the chunk splitting was caused by a newline.PdfLine
-object.
Parameters: left the limit of the line at the left right the limit of the line at the right alignment the alignment of the line height the height of the line
PdfChunk
to the PdfLine
.
Parameters: chunk the PdfChunk
to add
Returns: null
if the chunk could be added completely; if not
a PdfChunk
containing the part of the chunk that could
not be added is returned
Returns: maximum size of all the ascenders used in this line
PdfChunk
by index.Parameters: idx the index
Returns: the PdfChunk
or null if beyond the array
Returns: maximum size of all the ascenders used in this line
PdfChunk
with metric attributesReturns: the last PdfChunk
with metric attributes
Returns: maximum size of all the fonts used in this line
Returns: the original width of the line
Parameters: charSpacing wordSpacing
Returns: a corrected width
Returns: true
if the alignment equals ALIGN_JUSTIFIED and there is some width left.
Returns: a value
Returns: a value
Returns: true
if a newline caused the line split
PdfChunk
s.
Returns: an Iterator
Returns: a value
Returns: a PdfChunk
if the line has a listsymbol; null
otherwise
Returns: a value
The alignment of the last line of for instance a Paragraph
that has to be justified, has to be reset to ALIGN_LEFT.
This is only necessary for the first line of a ListItem
.
Parameters: listItem the list symbol
Returns: a value
Returns: a String
Returns: a value