T
- the type of the implementation
public abstract class AbstractElementIElement> extends ElementPropertyContainerimplements 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.
|
|
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() |
protected void |
propagateArtifactRoleToChildElements()
Marks all child elements as artifacts recursively.
|
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, getHeight, getOwnProperty, getSplitCharacters, getStrokeColor, getStrokeWidth, getTextRenderingMode, getWidth, hasOwnProperty, setBackgroundColor, setBackgroundColor, setBaseDirection, setBold, setBorder, setBorderBottom, setBorderLeft, setBorderRight, setBorderTop, setCharacterSpacing, setDestination, setFixedPosition, setFixedPosition, setFixedPosition, setFixedPosition, setFont, setFontColor, setFontKerning, setFontScript, setFontSize, setHeight, setHorizontalAlignment, setHyphenation, setItalic, setLineThrough, setProperty, setRelativePosition, setSplitCharacters, setStrokeColor, setStrokeWidth, setTextAlignment, setTextRenderingMode, setUnderline, setUnderline, setUnderline, setWidth, setWidth, setWidthPercent, setWordSpacing
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
deleteOwnProperty, getDefaultProperty, getOwnProperty, hasOwnProperty, setProperty
protected IRenderer nextRenderer
public IRenderer getRenderer()
IElement
IElement.setNextRenderer(IRenderer)
method call.
getRenderer
in interface IElement
public void setNextRenderer(IRenderer renderer)
IElement
IRenderer
instance which will be returned by the next call to the IElement.getRenderer()
.
setNextRenderer
in interface IElement
renderer
- the renderer instance
public IRenderer createRendererSubTree()
IElement
IElement.getRenderer()
, the renderer returned by this method should contain all the child renderers for children of the current element.
createRendererSubTree
in interface IElement
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 IElement>
property
- the property to be checked
true
if this instance has given 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 IElement>
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
public T addStyle(Style style)
style
- the style to be added
protected abstract IRenderer makeNewRenderer()
protected void propagateArtifactRoleToChildElements()
public boolean isEmpty()
true
if this list contains no elements.
true
if this list contains no elements
public T setAction(PdfAction action)
action
- the PdfAction
that should be performed
public T setPageNumber(int pageNumber)
pageNumber
- the page number of the page this element should be placed on
Copyright © 1998–2016 iText Group NV. All rights reserved.