public class Paragraph extends BlockElement<Paragraph>
BlockElement which essentially acts as a container for
leaf elements.| Modifier and Type | Field and Description |
|---|---|
protected DefaultAccessibilityProperties |
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(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
|
<T2 extends ILeafElement> |
addAll(List<T2> elements)
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. |
<T1> T1 |
getDefaultProperty(int property)
Gets the default property from this entity.
|
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. |
Paragraph |
setOrphansControl(ParagraphOrphansControl orphansControl)
Sets orphans restriction on a
Paragraph. |
Paragraph |
setWidowsControl(ParagraphWidowsControl widowsControl)
Sets widows restriction on a
Paragraph. |
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, setPadding, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddings, setPaddingTop, setRotationAngle, setRotationAngle, setSpacingRatio, setVerticalAlignment, setWidth, setWidthaddStyle, createRendererSubTree, getChildren, getProperty, getRenderer, hasProperty, isEmpty, setAction, setNextRenderer, setPageNumberdeleteOwnProperty, getOwnProperty, getSplitCharacters, getStrokeColor, getStrokeWidth, getTextRenderingMode, hasOwnProperty, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBackgroundImage, setBackgroundImage, setBaseDirection, setBold, setBorder, setBorderBottom, setBorderBottomLeftRadius, setBorderBottomRightRadius, setBorderLeft, setBorderRadius, setBorderRight, setBorderTop, setBorderTopLeftRadius, setBorderTopRightRadius, setCharacterSpacing, setDestination, setFixedPosition, setFixedPosition, setFixedPosition, setFixedPosition, setFont, setFont, setFontColor, setFontColor, setFontFamily, setFontFamily, setFontKerning, setFontScript, setFontSize, setHorizontalAlignment, setHyphenation, setItalic, setLineThrough, setOpacity, setProperty, setRelativePosition, setSplitCharacters, setStrokeColor, setStrokeWidth, setTextAlignment, setTextRenderingMode, setUnderline, setUnderline, setUnderline, setUnderline, setWordSpacingclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateRendererSubTree, getRenderer, setNextRendererdeleteOwnProperty, getOwnProperty, getProperty, hasOwnProperty, hasProperty, setPropertyprotected DefaultAccessibilityProperties tagProperties
public Paragraph()
public Paragraph(String text)
text - the initial textual content, as a Stringpublic Paragraph add(String text)
text - the content to be added, as a Stringpublic Paragraph add(ILeafElement element)
element - the content to be added, any ILeafElementpublic Paragraph add(IBlockElement element)
public <T2 extends ILeafElement> Paragraph addAll(List<T2> elements)
List of layout elements to the Paragraph.T2 - any ILeafElementelements - the content to be addedpublic Paragraph addTabStops(TabStop... tabStops)
tabStops - the tabstop(s) to be added as propertiesTabStoppublic Paragraph addTabStops(List<TabStop> tabStops)
List of tabstop elements as properties to the Paragraph.public Paragraph removeTabStop(float tabStopPosition)
Property.TAB_STOPS property.public <T1> T1 getDefaultProperty(int property)
IPropertyContainergetDefaultProperty in interface IPropertyContainergetDefaultProperty in class BlockElement<Paragraph>T1 - the return type associated with the propertyproperty - the property to be retrievednull will be returnedpublic Paragraph setFirstLineIndent(float indent)
Paragraph.indent - the indent value that must be applied to the first line of
the Paragraph, as a floatpublic Paragraph setOrphansControl(ParagraphOrphansControl orphansControl)
Paragraph.orphansControl - an instance of ParagraphOrphansControl.Paragraph instance.public Paragraph setWidowsControl(ParagraphWidowsControl widowsControl)
Paragraph.widowsControl - an instance of ParagraphWidowsControl.Paragraph instance.public Paragraph setFixedLeading(float leading)
Leading.FIXED strategy.leading - the new leading valueLeadingpublic Paragraph setMultipliedLeading(float leading)
Leading.MULTIPLIED strategy.leading - the new leading valueLeadingpublic AccessibilityProperties getAccessibilityProperties()
IAccessibleElementaccessibility properties. See also IAccessibleElement.protected IRenderer makeNewRenderer()
makeNewRenderer in class AbstractElement<Paragraph>Copyright © 1998–2020 iText Group NV. All rights reserved.