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, styles
properties
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(IBlockElement element) |
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, setMaxWidth, setMinHeight, setMinWidth, setPadding, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddings, setPaddingTop, setRotationAngle, setRotationAngle, setSpacingRatio, setVerticalAlignment
addStyle, createRendererSubTree, getChildren, getProperty, getRenderer, hasProperty, isEmpty, propagateArtifactRoleToChildElements, setAction, setNextRenderer, setPageNumber
deleteOwnProperty, getHeight, getOwnProperty, getSplitCharacters, getStrokeColor, getStrokeWidth, getTextRenderingMode, getWidth, hasOwnProperty, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBaseDirection, setBold, setBorder, setBorderBottom, setBorderBottomLeftRadius, setBorderBottomRightRadius, setBorderLeft, setBorderRadius, setBorderRight, setBorderTop, setBorderTopLeftRadius, setBorderTopRightRadius, setCharacterSpacing, setDestination, setFixedPosition, setFixedPosition, setFixedPosition, setFixedPosition, setFont, setFont, setFontColor, setFontColor, setFontKerning, setFontScript, setFontSize, setHeight, setHeightPercent, setHorizontalAlignment, setHyphenation, setItalic, setLineThrough, setOpacity, setProperty, setRelativePosition, setSplitCharacters, setStrokeColor, setStrokeWidth, setTextAlignment, setTextRenderingMode, setUnderline, setUnderline, setUnderline, setUnderline, setWidth, setWidth, setWidthPercent, setWordSpacing
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createRendererSubTree, getRenderer, setNextRenderer
deleteOwnProperty, getOwnProperty, getProperty, hasOwnProperty, hasProperty, setProperty
protected 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
public Paragraph add(IBlockElement element)
publicILeafElement> Paragraph addAll(List elements)
List
of layout elements to the Paragraph.
T2
- any ILeafElement
elements,
- the content to be added
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 BlockElement<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–2018 iText Group NV. All rights reserved.