T - the type of the implementationpublic abstract class AbstractElement<T extends IElement> extends ElementPropertyContainer<T> implements IElement
IElement implementations
share.| Modifier and Type | Field and Description |
|---|---|
protected List<IElement> |
childElements |
protected IRenderer |
nextRenderer |
protected Set<Style> |
styles |
properties| Constructor and Description |
|---|
AbstractElement() |
| Modifier and Type | Method and Description |
|---|---|
T |
addStyle(Style style)
Add a new style to this element.
|
IRenderer |
createRendererSubTree()
Creates a renderer subtree with root in the current element.
|
List<IElement> |
getChildren()
Gets the child elements of this elements
|
<T1> T1 |
getProperty(int property)
Gets the property from this entity.
|
IRenderer |
getRenderer()
Gets a renderer for this element.
|
boolean |
hasProperty(int property)
Checks if this entity has the specified property.
|
boolean |
isEmpty()
Returns
true if this list contains no elements. |
protected abstract IRenderer |
makeNewRenderer() |
T |
setAction(PdfAction action)
Sets an action on this Element.
|
void |
setNextRenderer(IRenderer renderer)
Overrides the
IRenderer instance which will be returned by the next call to the IElement.getRenderer(). |
T |
setPageNumber(int pageNumber)
Explicitly sets the page number this element should be put on.
|
deleteOwnProperty, getDefaultProperty, 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, waitdeleteOwnProperty, getDefaultProperty, getOwnProperty, hasOwnProperty, setPropertyprotected IRenderer nextRenderer
public IRenderer getRenderer()
IElementIElement.setNextRenderer(IRenderer) method call.getRenderer in interface IElementpublic void setNextRenderer(IRenderer renderer)
IElementIRenderer instance which will be returned by the next call to the IElement.getRenderer().setNextRenderer in interface IElementrenderer - the renderer instancepublic IRenderer createRendererSubTree()
IElementIElement.getRenderer(), the renderer returned by this method should contain all the child
renderers for children of the current element.createRendererSubTree in interface IElementpublic boolean hasProperty(int property)
IPropertyContainerIPropertyContainer.hasOwnProperty(int),
this method can check parent's properties, styles, etc, depending on the origin of the instancehasProperty in interface IPropertyContainerhasProperty in class ElementPropertyContainer<T extends IElement>property - the property to be checkedtrue if this instance has given property, false otherwisepublic <T1> T1 getProperty(int property)
IPropertyContainerIPropertyContainer.getOwnProperty(int),
this method can check parent's properties, styles, etc, depending on the origin of the instancegetProperty in interface IPropertyContainergetProperty in class ElementPropertyContainer<T extends IElement>T1 - the return type associated with the propertyproperty - the property to be retrievednull will be returned if the property value was not foundpublic T addStyle(Style style)
ElementPropertyContainer
Note that if several Style objects are added, iText checks them one by one
in the order in which they were added and returns the property's value from
the last Style object, which contains this property. So, if there are two Style
objects added: the first has set width of 100 points and the second of 200 points,
iText will get 200 points as width value.style - the style to be addedpublic List<IElement> getChildren()
public boolean isEmpty()
true if this list contains no elements.true if this list contains no elementspublic T setAction(PdfAction action)
action - the PdfAction that should be performedpublic T setPageNumber(int pageNumber)
This method should be used very carefully in client code.
pageNumber - the page number of the page this element should be placed onprotected abstract IRenderer makeNewRenderer()
Copyright © 1998–2020 iText Group NV. All rights reserved.