|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.itextpdf.text.pdf.PdfLine
public class PdfLine
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 height of the line. |
protected boolean |
isRTL
|
protected float |
left
The left indentation of the line. |
protected ArrayList<PdfChunk> |
line
The arraylist containing the chunks. |
protected ListItem |
listItem
|
protected boolean |
newlineSplit
true if the chunk splitting was caused by a newline. |
protected float |
originalWidth
The original width. |
protected float |
tabPosition
|
protected TabStop |
tabStop
|
protected float |
tabStopAnchorPosition
|
protected float |
width
The width of the line. |
| Method Summary | |
|---|---|
void |
flush()
|
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 |
int |
getLineLengthUtf32()
Returns the length of a line in UTF32 characters |
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. |
boolean |
isNewlineSplit()
Checks if a newline caused the line split. |
Iterator<PdfChunk> |
iterator()
Returns an iterator of PdfChunks. |
float |
listIndent()
Return the indentation needed to show the listsymbol. |
ListItem |
listItem()
|
Chunk |
listSymbol()
Returns the listsymbol of this line. |
void |
resetAlignment()
Resets the alignment of this line. |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected ArrayList<PdfChunk> line
protected float left
protected float width
protected int alignment
protected float height
protected boolean newlineSplit
true if the chunk splitting was caused by a newline.
protected float originalWidth
protected boolean isRTL
protected ListItem listItem
protected TabStop tabStop
protected float tabStopAnchorPosition
protected float tabPosition
| Method Detail |
|---|
public int size()
public Iterator<PdfChunk> iterator()
PdfChunks.
Iteratorpublic boolean hasToBeJustified()
true if the alignment equals ALIGN_JUSTIFIED and there is some width left.public void resetAlignment()
The alignment of the last line of for instance a Paragraph
that has to be justified, has to be reset to ALIGN_LEFT.
public void setListItem(ListItem listItem)
This is only necessary for the first line of a ListItem.
listItem - the list symbolpublic Chunk listSymbol()
PdfChunk if the line has a listsymbol; null otherwisepublic float listIndent()
public ListItem listItem()
public String toString()
toString in class ObjectStringpublic int getLineLengthUtf32()
public boolean isNewlineSplit()
true if a newline caused the line splitpublic int getLastStrokeChunk()
PdfChunk with metric attributes
PdfChunk with metric attributespublic PdfChunk getChunk(int idx)
PdfChunk by index.
idx - the index
PdfChunk or null if beyond the arraypublic float getOriginalWidth()
public float getWidthCorrected(float charSpacing,
float wordSpacing)
charSpacing - wordSpacing -
public float getAscender()
public float getDescender()
public void flush()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||