T
- this type
public abstract class RootElementIPropertyContainer> extends ElementPropertyContainerimplements Closeable
Modifier and Type | Field and Description |
---|---|
protected List<IElement> |
childElements |
protected PdfFont |
defaultFont |
protected FontProvider |
defaultFontProvider |
protected ISplitCharacters |
defaultSplitCharacters |
protected boolean |
immediateFlush |
protected PdfDocument |
pdfDocument |
protected Map<Integer,Object> |
properties
Deprecated.
This field just hides the same field from
ElementPropertyContainer
|
protected RootRenderer |
rootRenderer |
Constructor and Description |
---|
RootElement() |
Modifier and Type | Method and Description |
---|---|
T |
add(IBlockElement element)
Adds an element to the root.
|
T |
add(Image image)
Adds an image to the root.
|
void |
deleteOwnProperty(int property)
Deletes the own property of this entity.
|
protected abstract RootRenderer |
ensureRootRendererNotNull() |
|
getDefaultProperty(int property)
Gets the default property from this entity.
|
FontProvider |
getFontProvider()
Gets FontProvider if presents.
|
|
getOwnProperty(int property)
Gets own property from this entity.
|
|
getProperty(int property)
Gets the property from this entity.
|
RootRenderer |
getRenderer()
|
boolean |
hasOwnProperty(int property)
Checks if this entity has the specified property, i.e.
|
boolean |
hasProperty(int property)
Checks if this entity has the specified property.
|
void |
setFontProvider(FontProvider fontProvider)
Sets FontProvider .
|
void |
setProperty(int property, Object value)
Sets a property for this entity.
|
T |
showTextAligned(Paragraph p, float x, float y, int pageNumber, TextAlignment textAlign, VerticalAlignment vertAlign, float radAngle)
Convenience method to write a text aligned about the specified point
|
T |
showTextAligned(Paragraph p, float x, float y, TextAlignment textAlign)
Convenience method to write a text aligned about the specified point
|
T |
showTextAligned(Paragraph p, float x, float y, TextAlignment textAlign, VerticalAlignment vertAlign)
Convenience method to write a text aligned about the specified point
|
T |
showTextAligned(String text, float x, float y, TextAlignment textAlign)
Convenience method to write a text aligned about the specified point
|
T |
showTextAligned(String text, float x, float y, TextAlignment textAlign, float angle)
Convenience method to write a text aligned about the specified point
|
T |
showTextAligned(String text, float x, float y, TextAlignment textAlign, VerticalAlignment vertAlign, float angle)
Convenience method to write a text aligned about the specified point
|
T |
showTextAlignedKerned(String text, float x, float y, TextAlignment textAlign, VerticalAlignment vertAlign, float radAngle)
Convenience method to write a kerned text aligned about the specified point
|
getHeight, getSplitCharacters, getStrokeColor, getStrokeWidth, getTextRenderingMode, getWidth, 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, setHeight, setHeightPercent, setHorizontalAlignment, setHyphenation, setItalic, setLineThrough, setOpacity, setRelativePosition, setSplitCharacters, setStrokeColor, setStrokeWidth, setTextAlignment, setTextRenderingMode, setUnderline, setUnderline, setUnderline, setUnderline, setWidth, setWidth, setWidthPercent, setWordSpacing
protected boolean immediateFlush
protected PdfDocument pdfDocument
@Deprecated protected Map<Integer,Object> properties
ElementPropertyContainer
protected PdfFont defaultFont
protected FontProvider defaultFontProvider
protected ISplitCharacters defaultSplitCharacters
protected RootRenderer rootRenderer
public T add(IBlockElement element)
element
- an element with spacial margins, tabbing, and alignment
BlockElement
public T add(Image image)
image
- a graphical image element
Image
public FontProvider getFontProvider()
FontProvider
if presents.
FontProvider
if exists, otherwise null.
public void setFontProvider(FontProvider fontProvider)
FontProvider
. Note, font provider is inherited property.
fontProvider
- instance of FontProvider
.
public boolean hasProperty(int property)
IPropertyContainer
IPropertyContainer.hasOwnProperty(int)
, this method can check parent's properties, styles, etc, depending on the origin of the instance
hasProperty
in interface IPropertyContainer
hasProperty
in class ElementPropertyContainer<T extends IPropertyContainer>
property
- the property to be checked
true
if this instance has given property, false
otherwise
public boolean hasOwnProperty(int property)
IPropertyContainer
hasOwnProperty
in interface IPropertyContainer
hasOwnProperty
in class ElementPropertyContainer<T extends IPropertyContainer>
property
- the property to be checked
true
if this instance has given own property, false
otherwise
publicT1 getProperty(int property)
IPropertyContainer
IPropertyContainer.getOwnProperty(int)
, this method can check parent's properties, styles, etc, depending on the origin of the instance
getProperty
in interface IPropertyContainer
getProperty
in class ElementPropertyContainer<T extends IPropertyContainer>
T1
- the return type associated with the property
property
- the property to be retrieved
null
will be returned if the property value was not found
publicT1 getOwnProperty(int property)
IPropertyContainer
null
will be returned.
getOwnProperty
in interface IPropertyContainer
getOwnProperty
in class ElementPropertyContainer<T extends IPropertyContainer>
T1
- the return type associated with the property
property
- the property to be retrieved
null
will be returned if the property value was not found
publicT1 getDefaultProperty(int property)
IPropertyContainer
getDefaultProperty
in interface IPropertyContainer
getDefaultProperty
in class ElementPropertyContainer<T extends IPropertyContainer>
T1
- the return type associated with the property
property
- the property to be retrieved
null
will be returned
public void deleteOwnProperty(int property)
IPropertyContainer
deleteOwnProperty
in interface IPropertyContainer
deleteOwnProperty
in class ElementPropertyContainer<T extends IPropertyContainer>
property
- the property to be deleted
public void setProperty(int property, Object value)
IPropertyContainer
setProperty
in interface IPropertyContainer
setProperty
in class ElementPropertyContainer<T extends IPropertyContainer>
property
- the property to be set
value
- the value of the property
public RootRenderer getRenderer()
IRenderer
that acts as the root object that other renderers
descend from.
RootRenderer
attribute
public T showTextAligned(String text, float x, float y, TextAlignment textAlign)
text
- text to be placed to the page
x
- the point about which the text will be aligned and rotated
y
- the point about which the text will be aligned and rotated
textAlign
- horizontal alignment about the specified point
public T showTextAligned(String text, float x, float y, TextAlignment textAlign, float angle)
text
- text to be placed to the page
x
- the point about which the text will be aligned and rotated
y
- the point about which the text will be aligned and rotated
textAlign
- horizontal alignment about the specified point
angle
- the angle of rotation applied to the text, in radians
public T showTextAligned(String text, float x, float y, TextAlignment textAlign, VerticalAlignment vertAlign, float angle)
text
- text to be placed to the page
x
- the point about which the text will be aligned and rotated
y
- the point about which the text will be aligned and rotated
textAlign
- horizontal alignment about the specified point
vertAlign
- vertical alignment about the specified point
angle
- the angle of rotation applied to the text, in radians
public T showTextAlignedKerned(String text, float x, float y, TextAlignment textAlign, VerticalAlignment vertAlign, float radAngle)
text
- text to be placed to the page
x
- the point about which the text will be aligned and rotated
y
- the point about which the text will be aligned and rotated
textAlign
- horizontal alignment about the specified point
vertAlign
- vertical alignment about the specified point
radAngle
- the angle of rotation applied to the text, in radians
public T showTextAligned(Paragraph p, float x, float y, TextAlignment textAlign)
p
- paragraph of text to be placed to the page. By default it has no leading and is written in single line. Set width to write multiline text.
x
- the point about which the text will be aligned and rotated
y
- the point about which the text will be aligned and rotated
textAlign
- horizontal alignment about the specified point
public T showTextAligned(Paragraph p, float x, float y, TextAlignment textAlign, VerticalAlignment vertAlign)
p
- paragraph of text to be placed to the page. By default it has no leading and is written in single line. Set width to write multiline text.
x
- the point about which the text will be aligned and rotated
y
- the point about which the text will be aligned and rotated
textAlign
- horizontal alignment about the specified point
vertAlign
- vertical alignment about the specified point
public T showTextAligned(Paragraph p, float x, float y, int pageNumber, TextAlignment textAlign, VerticalAlignment vertAlign, float radAngle)
p
- paragraph of text to be placed to the page. By default it has no leading and is written in single line. Set width to write multiline text.
x
- the point about which the text will be aligned and rotated
y
- the point about which the text will be aligned and rotated
pageNumber
- the page number to write the text
textAlign
- horizontal alignment about the specified point
vertAlign
- vertical alignment about the specified point
radAngle
- the angle of rotation applied to the text, in radians
protected abstract RootRenderer ensureRootRendererNotNull()
Copyright © 1998–2018 iText Group NV. All rights reserved.