public class Paragraph extends BlockElement<Paragraph>
BlockElement which essentially acts as a container for leaf elements.
| Modifier and Type | Field and Description |
|---|---|
protected PdfName |
role |
protected AccessibilityProperties |
tagProperties |
childElements, nextRenderer, stylesproperties| Constructor and Description |
|---|
Paragraph()
Creates a Paragraph.
|
Paragraph(String text)
Creates a Paragraph, initialized with a piece of text.
|
Paragraph(Text text)
Creates a Paragraph, initialized with a piece of text.
|
| Modifier and Type | Method and Description |
|---|---|
Paragraph |
add(ILeafElement element)
Adds a layout element to the Paragraph.
|
Paragraph |
add(String text)
Adds a piece of text to the Paragraph
|
|
addAll(List
Adds a List of layout elements to the Paragraph.
|
Paragraph |
addTabStops(List<TabStop> tabStops)
Adds a List of tabstop elements as properties to the Paragraph.
|
Paragraph |
addTabStops(TabStop... tabStops)
Adds an unspecified amount of tabstop elements as properties to the Paragraph.
|
AccessibilityProperties |
getAccessibilityProperties()
Gets the accessibility properties.
|
|
getDefaultProperty(int property)
Gets the default property from this entity.
|
PdfName |
getRole()
Gets the element's role.
|
protected IRenderer |
makeNewRenderer() |
Paragraph |
removeTabStop(float tabStopPosition)
Removes a tabstop position from the Paragraph, if it is present in the Property.TAB_STOPS property.
|
Paragraph |
setFirstLineIndent(float indent)
Sets the indent value for the first line of the Paragraph.
|
Paragraph |
setFixedLeading(float leading)
Sets the leading value, using the Leading.FIXED strategy.
|
Paragraph |
setMultipliedLeading(float leading)
Sets the leading value, using the Leading.MULTIPLIED strategy.
|
void |
setRole(PdfName role)
Sets the element's role.
|
getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, isKeepTogether, isKeepWithNext, setHeight, setKeepTogether, setKeepWithNext, setMargin, setMarginBottom, setMarginLeft, setMarginRight, setMargins, setMarginTop, setMaxHeight, setMinHeight, setPadding, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddings, setPaddingTop, setRotationAngle, setRotationAngle, setSpacingRatio, setVerticalAlignmentaddStyle, createRendererSubTree, getChildren, getProperty, getRenderer, hasProperty, isEmpty, propagateArtifactRoleToChildElements, setAction, setNextRenderer, setPageNumberdeleteOwnProperty, getHeight, getOwnProperty, getSplitCharacters, getStrokeColor, getStrokeWidth, getTextRenderingMode, getWidth, hasOwnProperty, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBaseDirection, setBold, setBorder, setBorderBottom, setBorderLeft, setBorderRight, setBorderTop, setCharacterSpacing, setDestination, setFixedPosition, setFixedPosition, setFixedPosition, setFixedPosition, setFont, setFont, setFontColor, setFontColor, setFontKerning, setFontScript, setFontSize, setHorizontalAlignment, setHyphenation, setItalic, setLineThrough, setOpacity, setProperty, setRelativePosition, setSplitCharacters, setStrokeColor, setStrokeWidth, setTextAlignment, setTextRenderingMode, setUnderline, setUnderline, setUnderline, setUnderline, setWidth, setWidth, setWidthPercent, setWordSpacingclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateRendererSubTree, getRenderer, setNextRendererdeleteOwnProperty, getOwnProperty, getProperty, hasOwnProperty, hasProperty, setPropertyprotected PdfName role
protected AccessibilityProperties tagProperties
public Paragraph()
public Paragraph(String text)
text - the initial textual content, as a String
public Paragraph add(String text)
text - the content to be added, as a String
public Paragraph add(ILeafElement element)
element - the content to be added, any ILeafElement
publicILeafElement> Paragraph addAll(List elements)
List of layout elements to the Paragraph.
elements - the content to be added, any ILeafElement
public Paragraph addTabStops(TabStop... tabStops)
tabStops - the tabstop(s) to be added as properties
TabStop
public Paragraph addTabStops(List<TabStop> tabStops)
List of tabstop elements as properties to the Paragraph.
public Paragraph removeTabStop(float tabStopPosition)
Property.TAB_STOPS property.
publicT1 getDefaultProperty(int property)
IPropertyContainer
getDefaultProperty in interface IPropertyContainer
getDefaultProperty in class ElementPropertyContainer<Paragraph>
T1 - the return type associated with the property
property - the property to be retrieved
null will be returned
public Paragraph setFirstLineIndent(float indent)
Paragraph.
indent - the indent value that must be applied to the first line of the Paragraph, as a float
public Paragraph setFixedLeading(float leading)
Leading.FIXED strategy.
leading - the new leading value
Leading
public Paragraph setMultipliedLeading(float leading)
Leading.MULTIPLIED strategy.
leading - the new leading value
Leading
protected IRenderer makeNewRenderer()
makeNewRenderer in class AbstractElement<Paragraph>
public PdfName getRole()
IAccessibleElement
PdfName containing the name of the role
public void setRole(PdfName role)
IAccessibleElement
role - the new role which the IAccessibleElement should take
public AccessibilityProperties getAccessibilityProperties()
IAccessibleElement
accessibility properties.
Copyright © 1998–2017 iText Group NV. All rights reserved.