|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.AbstractCollection<E> java.util.AbstractList<E> java.util.ArrayList com.lowagie.text.Phrase com.lowagie.text.Paragraph
public class Paragraph
A Paragraph
is a series of Chunk
s 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)));
Element
,
Phrase
,
ListItem
,
Serialized FormField Summary | |
---|---|
protected int |
alignment
The alignment of the text. |
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. |
protected float |
spacingAfter
The spacing after the paragraph. |
protected float |
spacingBefore
The spacing before the paragraph. |
Fields inherited from class com.lowagie.text.Phrase |
---|
font, hyphenation, leading |
Fields inherited from class java.util.AbstractList |
---|
modCount |
Fields inherited from interface com.lowagie.text.Element |
---|
ALIGN_BASELINE, ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_JUSTIFIED, ALIGN_JUSTIFIED_ALL, ALIGN_LEFT, ALIGN_MIDDLE, ALIGN_RIGHT, ALIGN_TOP, ALIGN_UNDEFINED, ANCHOR, ANNOTATION, AUTHOR, CCITT_BLACKIS1, CCITT_ENCODEDBYTEALIGN, CCITT_ENDOFBLOCK, CCITT_ENDOFLINE, CCITTG3_1D, CCITTG3_2D, CCITTG4, CELL, CHAPTER, CHUNK, CREATIONDATE, CREATOR, HEADER, IMGRAW, IMGTEMPLATE, JBIG2, JPEG, JPEG2000, KEYWORDS, LIST, LISTITEM, MARKED, MULTI_COLUMN_TEXT, PARAGRAPH, PHRASE, PRODUCER, PTABLE, RECTANGLE, ROW, SECTION, SUBJECT, TABLE, TITLE, YMARK |
Constructor Summary | |
---|---|
Paragraph()
Constructs a Paragraph . |
|
Paragraph(Chunk chunk)
Constructs a Paragraph with a certain Chunk . |
|
Paragraph(float leading)
Constructs a Paragraph with a certain leading. |
|
Paragraph(float leading,
Chunk chunk)
Constructs a Paragraph with a certain Chunk
and a certain leading. |
|
Paragraph(float leading,
java.lang.String string)
Constructs a Paragraph with a certain String
and a certain leading. |
|
Paragraph(float leading,
java.lang.String string,
Font font)
Constructs a Paragraph with a certain leading, String
and Font . |
|
Paragraph(Phrase phrase)
Constructs a Paragraph with a certain Phrase . |
|
Paragraph(java.lang.String string)
Constructs a Paragraph with a certain String . |
|
Paragraph(java.lang.String string,
Font font)
Constructs a Paragraph with a certain String
and a certain Font . |
Method Summary | |
---|---|
boolean |
add(java.lang.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 |
getSpacingAfter()
Gets the spacing after this paragraph. |
float |
getSpacingBefore()
Gets the spacing before this paragraph. |
float |
getTotalLeading()
Gets the total leading. |
void |
setAlignment(int alignment)
Sets the alignment of this paragraph. |
void |
setAlignment(java.lang.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)
Sets the leading of this phrase. |
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()
Deprecated. As of iText 2.1.5, replaced by getSpacingAfter() ,
scheduled for removal at 2.3.0 |
float |
spacingBefore()
Deprecated. As of iText 2.1.5, replaced by getSpacingBefore() ,
scheduled for removal at 2.3.0 |
int |
type()
Gets the type of the text element. |
Methods inherited from class com.lowagie.text.Phrase |
---|
add, addAll, addChunk, addSpecial, getChunks, getContent, getFont, getHyphenation, getInstance, getInstance, getInstance, getLeading, hasLeading, isContent, isEmpty, isNestable, process, setFont, setHyphenation |
Methods inherited from class java.util.ArrayList |
---|
addAll, clear, clone, contains, ensureCapacity, get, indexOf, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize |
Methods inherited from class java.util.AbstractList |
---|
equals, hashCode, iterator, listIterator, listIterator, subList |
Methods inherited from class java.util.AbstractCollection |
---|
containsAll, removeAll, retainAll, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.lowagie.text.Element |
---|
toString |
Methods inherited from interface java.util.List |
---|
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList |
Field Detail |
---|
protected int alignment
protected float multipliedLeading
protected float indentationLeft
protected float indentationRight
protected float spacingBefore
protected float spacingAfter
protected boolean keeptogether
Constructor Detail |
---|
public Paragraph()
Paragraph
.
public Paragraph(float leading)
Paragraph
with a certain leading.
leading
- the leadingpublic Paragraph(Chunk chunk)
Paragraph
with a certain Chunk
.
chunk
- a Chunk
public Paragraph(float leading, Chunk chunk)
Paragraph
with a certain Chunk
and a certain leading.
leading
- the leadingchunk
- a Chunk
public Paragraph(java.lang.String string)
Paragraph
with a certain String
.
string
- a String
public Paragraph(java.lang.String string, Font font)
Paragraph
with a certain String
and a certain Font
.
string
- a String
font
- a Font
public Paragraph(float leading, java.lang.String string)
Paragraph
with a certain String
and a certain leading.
leading
- the leadingstring
- a String
public Paragraph(float leading, java.lang.String string, Font font)
Paragraph
with a certain leading, String
and Font
.
leading
- the leadingstring
- a String
font
- a Font
public Paragraph(Phrase phrase)
Paragraph
with a certain Phrase
.
phrase
- a Phrase
Method Detail |
---|
public int type()
type
in interface Element
type
in class Phrase
public boolean add(java.lang.Object o)
Object
to the Paragraph
.
add
in interface TextElementArray
add
in interface java.util.Collection
add
in interface java.util.List
add
in class Phrase
o
- object the object to add.
public void setAlignment(int alignment)
alignment
- the new alignmentpublic void setAlignment(java.lang.String alignment)
alignment
- the new alignment as a String
public void setLeading(float fixedLeading)
Phrase
setLeading
in class Phrase
fixedLeading
- the new leadingPhrase.setLeading(float)
public void setMultipliedLeading(float multipliedLeading)
multipliedLeading
- the variable leadingpublic void setLeading(float fixedLeading, float multipliedLeading)
fixedLeading
- the fixed leadingmultipliedLeading
- the variable leadingpublic void setIndentationLeft(float indentation)
indentation
- the new indentationpublic void setIndentationRight(float indentation)
indentation
- the new indentationpublic void setFirstLineIndent(float firstLineIndent)
firstLineIndent
- New value of property firstLineIndent.public void setSpacingBefore(float spacing)
spacing
- the new spacingpublic void setSpacingAfter(float spacing)
spacing
- the new spacingpublic void setKeepTogether(boolean keeptogether)
keeptogether
- true of the paragraph may not be split over 2 pagespublic boolean getKeepTogether()
public int getAlignment()
public float getMultipliedLeading()
public float getTotalLeading()
public float getIndentationLeft()
public float getIndentationRight()
public float getFirstLineIndent()
public float getSpacingBefore()
public float getSpacingAfter()
public float getExtraParagraphSpace()
public void setExtraParagraphSpace(float extraParagraphSpace)
extraParagraphSpace
- New value of property extraParagraphSpace.public float spacingBefore()
getSpacingBefore()
,
scheduled for removal at 2.3.0
public float spacingAfter()
getSpacingAfter()
,
scheduled for removal at 2.3.0
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |