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, 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
|
<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. |
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, setWidth
addStyle, createRendererSubTree, getChildren, getProperty, getRenderer, hasProperty, isEmpty, setAction, setNextRenderer, setPageNumber
deleteOwnProperty, getOwnProperty, getSplitCharacters, getStrokeColor, getStrokeWidth, getTextRenderingMode, 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, setWordSpacing
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createRendererSubTree, getRenderer, setNextRenderer
deleteOwnProperty, getOwnProperty, getProperty, hasOwnProperty, hasProperty, setProperty
protected DefaultAccessibilityProperties 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)
public <T2 extends ILeafElement> Paragraph addAll(List<T2> elements)
List
of layout elements to the Paragraph.T2
- any ILeafElement
elements,
- the content to be addedpublic Paragraph addTabStops(TabStop... tabStops)
tabStops
- the tabstop(s)
to be added as propertiesTabStop
public 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)
IPropertyContainer
getDefaultProperty
in interface IPropertyContainer
getDefaultProperty
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 float
public Paragraph setFixedLeading(float leading)
Leading.FIXED
strategy.leading
- the new leading valueLeading
public Paragraph setMultipliedLeading(float leading)
Leading.MULTIPLIED
strategy.leading
- the new leading valueLeading
public AccessibilityProperties getAccessibilityProperties()
IAccessibleElement
accessibility properties
. See also IAccessibleElement
.protected IRenderer makeNewRenderer()
makeNewRenderer
in class AbstractElement<Paragraph>
Copyright © 1998–2017 iText Group NV. All rights reserved.