public class AreaBreakRenderer extends Object implements IRenderer
AreaBreak layout element. Will terminate the current content area and initialize a new one.
| Constructor and Description |
|---|
AreaBreakRenderer(AreaBreak areaBreak)
Creates an AreaBreakRenderer.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addChild(IRenderer renderer)
Throws an UnsupportedOperationException because instances of this class are only used for terminating the current content area.
|
void |
deleteOwnProperty(int property)
Deletes the own property of this entity.
|
void |
draw(DrawContext drawContext)
Throws an UnsupportedOperationException because instances of this class are only used for terminating the current content area.
|
List<IRenderer> |
getChildRenderers()
Gets the child IRenderers.
|
|
getDefaultProperty(int property)
Gets the default property from this entity.
|
IPropertyContainer |
getModelElement()
Gets the model element associated with this renderer.
|
IRenderer |
getNextRenderer()
Gets a new instance of this class to be used as a next renderer, after this renderer is used, if IRenderer.layout(LayoutContext) is called more than once.
|
LayoutArea |
getOccupiedArea()
Throws an UnsupportedOperationException because instances of this class are only used for terminating the current content area.
|
|
getOwnProperty(int property)
Gets own property from this entity.
|
IRenderer |
getParent()
Gets the parent IRenderer.
|
|
getProperty(int key)
Gets the property from this entity.
|
|
getProperty(int property, T1 defaultValue)
Throws an UnsupportedOperationException because instances of this class are only used for terminating the current content area.
|
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.
|
boolean |
isFlushed()
Indicates whether this renderer is flushed or not, i.e.
|
LayoutResult |
layout(LayoutContext layoutContext)
This method simulates positioning of the renderer, including all of its children, and returns the LayoutResult, representing the layout result, including occupied area, status, i.e.
|
void |
move(float dx, float dy)
Throws an UnsupportedOperationException because instances of this class are only used for terminating the current content area.
|
IRenderer |
setParent(IRenderer parent)
Explicitly sets this object as the child of another IRenderer in the renderer hierarchy.
|
void |
setProperty(int property, Object value)
Throws an UnsupportedOperationException because instances of this class are only used for terminating the current content area.
|
protected AreaBreak areaBreak
public void addChild(IRenderer renderer)
public LayoutResult layout(LayoutContext layoutContext)
IRenderer
LayoutResult, representing the layout result, including occupied area, status, i.e. if there was enough place to fit the renderer subtree, etc. LayoutResult can be extended to return custom layout results for custom elements, e.g. TextRenderer uses TextLayoutResult as its result. This method can be called standalone to learn how much area the renderer subtree needs, or can be called before IRenderer.draw(DrawContext), to prepare the renderer to be flushed to the output stream.
public void draw(DrawContext drawContext)
draw in interface IRenderer
drawContext - contains the PdfDocument to which the renderer subtree if flushed, the PdfCanvas on which the renderer subtree is drawn and other additional parameters needed to perform drawing
public LayoutArea getOccupiedArea()
getOccupiedArea in interface IRenderer
LayoutArea instance
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
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
property - the property to be checked
true if this instance has given own property, false otherwise
publicT1 getProperty(int key)
IPropertyContainer
IPropertyContainer.getOwnProperty(int), this method can check parent's properties, styles, etc, depending on the origin of the instance
getProperty in interface IPropertyContainer
T1 - the return type associated with the property
key - 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
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
T1 - the return type associated with the property
property - the property to be retrieved
null will be returned
publicT1 getProperty(int property, T1 defaultValue)
getProperty in interface IRenderer
T1 - the return type associated with the property
property - the property to be retrieved
defaultValue - a fallback value
public void setProperty(int property,
Object value)
setProperty in interface IPropertyContainer
property - the property to be set
value - the value of the property
public void deleteOwnProperty(int property)
IPropertyContainer
deleteOwnProperty in interface IPropertyContainer
property - the property to be deleted
public IRenderer setParent(IRenderer parent)
IRenderer
IRenderer in the renderer hierarchy. Some implementations also use this method internally to create a consistent hierarchy tree.
public IPropertyContainer getModelElement()
IRenderer
getModelElement in interface IRenderer
container of properties
public IRenderer getParent()
IRenderer
IRenderer.
public List<IRenderer> getChildRenderers()
IRenderer
IRenderers.
getChildRenderers in interface IRenderer
renderers of this instance
public boolean isFlushed()
IRenderer
IRenderer.draw(DrawContext) has already been called.
public void move(float dx,
float dy)
public IRenderer getNextRenderer()
IRenderer
IRenderer.layout(LayoutContext) is called more than once.
getNextRenderer in interface IRenderer
Copyright © 1998–2022 iText Group NV. All rights reserved.