Package com.itextpdf.layout.element
Class Paragraph
- All Implemented Interfaces:
-
IAbstractElement,IBlockElement,IElement,IPropertyContainer,IAccessibleElement
- Direct Known Subclasses:
-
AnonymousInlineBox
A layout element that represents a self-contained block of textual and graphical information. It is a
BlockElement which essentially acts as a container for leaf elements.
-
Field Summary
Fields inherited from class com.itextpdf.layout.element.AbstractParagraph
tagPropertiesFields inherited from class com.itextpdf.layout.element.AbstractElement
childElements, nextRenderer, stylesFields inherited from class com.itextpdf.layout.ElementPropertyContainer
properties -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd(IBlockElement element) add(ILeafElement element) add(FootnoteAnchor footnoteAnchor) Adds theFootnoteAnchorelement to thisParagraph.Adds a piece of text to thisParagraph.ILeafElement>
ParagraphaddTabStops(TabStop... tabStops) Adds an unspecified amount of tabstop elements as properties to thisParagraph.addTabStops(List<TabStop> tabStops) protected IRendererCreates a new renderer instance.removeTabStop(float tabStopPosition) Removes a tabstop position from the Paragraph, if it is present in theProperty.TAB_STOPSproperty.setFirstLineIndent(float indent) Sets the indent value for the first line of theParagraph.setFixedLeading(float leading) Sets the leading value, using theLeading.FIXEDstrategy.setMultipliedLeading(float leading) Sets the leading value, using theLeading.MULTIPLIEDstrategy.setOrphansControl(ParagraphOrphansControl orphansControl) Sets orphans restriction on aParagraph.setWidowsControl(ParagraphWidowsControl widowsControl) Sets widows restriction on aParagraph.Methods inherited from class com.itextpdf.layout.element.AbstractParagraph
add, add, addTabStopsAsProperty, getAccessibilityProperties, getDefaultPropertyMethods inherited from class com.itextpdf.layout.element.BlockElement
getHeight, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getWidth, isKeepTogether, isKeepWithNext, setHeight, setHeight, setKeepTogether, setKeepWithNext, setMargin, setMarginBottom, setMarginLeft, setMarginRight, setMargins, setMarginTop, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setNeutralRole, setPadding, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddings, setPaddingTop, setRotationAngle, setRotationAngle, setSpacingRatio, setTransform, setVerticalAlignment, setWidth, setWidthMethods inherited from class com.itextpdf.layout.element.AbstractElement
addStyle, addStyleIfAbsent, createRendererSubTree, getChildren, getProperty, getRenderer, getStyles, hasProperty, isEmpty, setAction, setNextRenderer, setPageNumberMethods inherited from class com.itextpdf.layout.ElementPropertyContainer
deleteOwnProperty, getLineCapStyle, getLineJoinStyle, getMiterLimit, getOwnProperties, getOwnProperty, getSplitCharacters, getStrokeColor, getStrokeWidth, getTextRenderingMode, getTransparentStrokeColor, hasOwnProperty, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBackgroundImage, setBackgroundImage, setBaseDirection, setBorder, setBorderBottom, setBorderBottomLeftRadius, setBorderBottomRightRadius, setBorderLeft, setBorderRadius, setBorderRight, setBorderTop, setBorderTopLeftRadius, setBorderTopRightRadius, setCharacterSpacing, setDashPattern, setDestination, setFixedPosition, setFixedPosition, setFixedPosition, setFixedPosition, setFont, setFontColor, setFontColor, setFontColor, setFontFamily, setFontFamily, setFontKerning, setFontScript, setFontSize, setHorizontalAlignment, setHyphenation, setLineCapStyle, setLineJoinStyle, setLineThrough, setMiterLimit, setOpacity, setProperty, setRelativePosition, setSplitCharacters, setStrokeColor, setStrokeColor, setStrokeColor, setStrokeWidth, setTextAlignment, setTextRenderingMode, setUnderline, setUnderline, setUnderline, setUnderline, setUnderline, setWordSpacing, simulateBold, simulateItalicMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.itextpdf.layout.element.IAbstractElement
getChildrenMethods inherited from interface com.itextpdf.layout.element.IElement
createRendererSubTree, getRenderer, setNextRendererMethods inherited from interface com.itextpdf.layout.IPropertyContainer
deleteOwnProperty, getOwnProperty, getProperty, hasOwnProperty, hasProperty, setProperty
-
Constructor Details
-
Paragraph
public Paragraph()Creates a newParagraphinstance. -
Paragraph
Creates a Paragraph, initialized with a piece of text.- Parameters:
-
text- the initial textual content, as aString
-
Paragraph
Creates a Paragraph, initialized with a piece of text.- Parameters:
-
text- the initial textual content, as aText
-
-
Method Details
-
add
Adds a piece of text to thisParagraph.- Overrides:
-
addin classAbstractParagraph<Paragraph> - Parameters:
-
text- the content to be added, as aString - Returns:
-
this
Paragraph
-
add
- Overrides:
-
addin classAbstractParagraph<Paragraph> - Parameters:
-
element- the content to be added, anyILeafElement - Returns:
-
this
Paragraph
-
add
- Parameters:
-
element- the content to be added, anyIBlockElement - Returns:
-
this
Paragraph
-
add
Adds theFootnoteAnchorelement to thisParagraph.- Parameters:
-
footnoteAnchor- the footnote anchor to be added - Returns:
-
this same
Paragraphinstance
-
addAll
- Overrides:
-
addAllin classAbstractParagraph<Paragraph> - Type Parameters:
-
T2- anyILeafElement - Parameters:
-
elements- the content to be added - Returns:
-
this
Paragraph
-
addTabStops
Adds an unspecified amount of tabstop elements as properties to thisParagraph.- Parameters:
-
tabStops- thetabstop(s)to be added as properties - Returns:
-
this
Paragraph - See Also:
-
addTabStops
-
removeTabStop
Removes a tabstop position from the Paragraph, if it is present in theProperty.TAB_STOPSproperty. -
setFirstLineIndent
Sets the indent value for the first line of theParagraph.- Overrides:
-
setFirstLineIndentin classAbstractParagraph<Paragraph> - Parameters:
-
indent- the indent value that must be applied to the first line of the Paragraph, as afloat - Returns:
- this Paragraph
-
setOrphansControl
Sets orphans restriction on aParagraph.- Overrides:
-
setOrphansControlin classAbstractParagraph<Paragraph> - Parameters:
-
orphansControl- an instance ofParagraphOrphansControl - Returns:
-
this
Paragraphinstance
-
setWidowsControl
Sets widows restriction on aParagraph.- Overrides:
-
setWidowsControlin classAbstractParagraph<Paragraph> - Parameters:
-
widowsControl- an instance ofParagraphWidowsControl - Returns:
-
this
Paragraphinstance
-
setFixedLeading
Sets the leading value, using theLeading.FIXEDstrategy.If for the element
RenderingMode.HTML_MODEis enabled, thanProperty.LINE_HEIGHTproperty will be set instead of default layoutProperty.LEADING.- Parameters:
-
leading- the new leading value - Returns:
- this Paragraph
- See Also:
-
setMultipliedLeading
Sets the leading value, using theLeading.MULTIPLIEDstrategy.If for the element
RenderingMode.HTML_MODEis enabled, thanProperty.LINE_HEIGHTproperty will be set instead of default layoutProperty.LEADING.- Parameters:
-
leading- the new leading value - Returns:
- this Paragraph
- See Also:
-
makeNewRenderer
Creates a new renderer instance.- Specified by:
-
makeNewRendererin classAbstractElement<Paragraph> - Returns:
-
new
IRenderer
-