com.lowagie.text
public class Paragraph extends Phrase
Paragraph is a series of Chunks and/or Phrases.
A Paragraph has the same qualities of a Phrase, but also
some additional layout-parameters:
Paragraph p = new Paragraph("This is a paragraph",
FontFactory.getFont(FontFactory.HELVETICA, 18, Font.BOLDITALIC, new Color(0, 0, 255)));
| Field Summary | |
|---|---|
| protected int | alignment The alignment of the text. |
| float | extraParagraphSpace Holds value of property extraParagraphSpace. |
| float | firstLineIndent Holds value of property firstLineIndent. |
| protected float | indentationLeft The indentation of this paragraph on the left side. |
| protected float | indentationRight The indentation of this paragraph on the right side. |
| protected boolean | keeptogether Does the paragraph has to be kept together on 1 page. |
| protected float | multipliedLeading The text leading that is multiplied by the biggest font size in the line. |
| static long | serialVersionUID |
| protected float | spacingAfter The spacing after the paragraph. |
| protected float | spacingBefore The spacing before the paragraph. |
| Constructor Summary | |
|---|---|
| Paragraph()
Constructs a Paragraph. | |
| Paragraph(float leading)
Constructs a Paragraph with a certain leading.
| |
| Paragraph(Chunk chunk)
Constructs a Paragraph with a certain Chunk.
| |
| Paragraph(float leading, Chunk chunk)
Constructs a Paragraph with a certain Chunk
and a certain leading.
| |
| Paragraph(String string)
Constructs a Paragraph with a certain String.
| |
| Paragraph(String string, Font font)
Constructs a Paragraph with a certain String
and a certain Font.
| |
| Paragraph(float leading, String string)
Constructs a Paragraph with a certain String
and a certain leading.
| |
| Paragraph(float leading, String string, Font font)
Constructs a Paragraph with a certain leading, String
and Font.
| |
| Paragraph(Phrase phrase)
Constructs a Paragraph with a certain Phrase.
| |
| Method Summary | |
|---|---|
| boolean | add(Object o)
Adds an Object to the Paragraph.
|
| int | getAlignment()
Gets the alignment of this paragraph.
|
| float | getExtraParagraphSpace()
Getter for property extraParagraphSpace. |
| float | getFirstLineIndent()
Getter for property firstLineIndent. |
| float | getIndentationLeft()
Gets the indentation of this paragraph on the left side.
|
| float | getIndentationRight()
Gets the indentation of this paragraph on the right side.
|
| boolean | getKeepTogether()
Checks if this paragraph has to be kept together on one page.
|
| float | getMultipliedLeading()
Gets the variable leading |
| float | getTotalLeading()
Gets the total leading.
|
| void | setAlignment(int alignment)
Sets the alignment of this paragraph.
|
| void | setAlignment(String alignment)
Sets the alignment of this paragraph.
|
| void | setExtraParagraphSpace(float extraParagraphSpace)
Setter for property extraParagraphSpace. |
| void | setFirstLineIndent(float firstLineIndent)
Setter for property firstLineIndent. |
| void | setIndentationLeft(float indentation)
Sets the indentation of this paragraph on the left side.
|
| void | setIndentationRight(float indentation)
Sets the indentation of this paragraph on the right side.
|
| void | setKeepTogether(boolean keeptogether)
Indicates that the paragraph has to be kept together on one page.
|
| void | setLeading(float fixedLeading) |
| void | setLeading(float fixedLeading, float multipliedLeading)
Sets the leading fixed and variable. |
| void | setMultipliedLeading(float multipliedLeading)
Sets the variable leading. |
| void | setSpacingAfter(float spacing)
Sets the spacing after this paragraph.
|
| void | setSpacingBefore(float spacing)
Sets the spacing before this paragraph.
|
| float | spacingAfter()
Gets the spacing after this paragraph.
|
| float | spacingBefore()
Gets the spacing before this paragraph.
|
| int | type()
Gets the type of the text element.
|
Paragraph.Paragraph with a certain leading.
Parameters: leading the leading
Paragraph with a certain Chunk.
Parameters: chunk a Chunk
Paragraph with a certain Chunk
and a certain leading.
Parameters: leading the leading chunk a Chunk
Paragraph with a certain String.
Parameters: string a String
Paragraph with a certain String
and a certain Font.
Parameters: string a String font a Font
Paragraph with a certain String
and a certain leading.
Parameters: leading the leading string a String
Paragraph with a certain leading, String
and Font.
Parameters: leading the leading string a String font a Font
Paragraph with a certain Phrase.
Parameters: phrase a Phrase
Object to the Paragraph.
Parameters: o object the object to add.
Returns: true is adding the object succeeded
Returns: alignment
Returns: Value of property extraParagraphSpace.
Returns: Value of property firstLineIndent.
Returns: the indentation
Returns: the indentation
Returns: true if the paragraph may not be split over 2 pages.
Returns: the leading
Returns: the total leading (fixed and multiplied)
Parameters: alignment the new alignment
Parameters: alignment the new alignment as a String
Parameters: extraParagraphSpace New value of property extraParagraphSpace.
Parameters: firstLineIndent New value of property firstLineIndent.
Parameters: indentation the new indentation
Parameters: indentation the new indentation
Parameters: keeptogether true of the paragraph may not be split over 2 pages
See Also: Phrase
Parameters: fixedLeading the fixed leading multipliedLeading the variable leading
Parameters: multipliedLeading the variable leading
Parameters: spacing the new spacing
Parameters: spacing the new spacing
Returns: the spacing
Returns: the spacing
Returns: a type