Class AreaBreakRenderer
java.lang.Object
com.itextpdf.layout.renderer.AreaBreakRenderer
- All Implemented Interfaces:
IPropertyContainer, IRenderer
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidThrows an UnsupportedOperationException because instances of this class are only used for terminating the current content area.voiddeleteOwnProperty(int property) Deletes the own property of this entity.voiddraw(DrawContext drawContext) Throws an UnsupportedOperationException because instances of this class are only used for terminating the current content area.Gets the childIRenderers.<T1> T1getDefaultProperty(int property) Gets the default property from this entity.Gets the model element associated with this renderer.Gets a new instance of this class to be used as a next renderer, after this renderer is used, ifIRenderer.layout(LayoutContext)is called more than once.Throws an UnsupportedOperationException because instances of this class are only used for terminating the current content area.<T1> T1getOwnProperty(int property) Gets own property from this entity.Gets the parentIRenderer.<T1> T1getProperty(int key) Gets the property from this entity.<T1> T1getProperty(int property, T1 defaultValue) Throws an UnsupportedOperationException because instances of this class are only used for terminating the current content area.booleanhasOwnProperty(int property) Checks if this entity has the specified property, i.e.booleanhasProperty(int property) Checks if this entity has the specified property.booleanIndicates whether this renderer is flushed or not, i.e.layout(LayoutContext layoutContext) This method simulates positioning of the renderer, including all of its children, and returns theLayoutResult, representing the layout result, including occupied area, status, i.e.voidmove(float dx, float dy) Throws an UnsupportedOperationException because instances of this class are only used for terminating the current content area.Explicitly sets this object as the child of anotherIRendererin the renderer hierarchy.voidsetProperty(int property, Object value) Throws an UnsupportedOperationException because instances of this class are only used for terminating the current content area.
-
Field Details
-
areaBreak
-
-
Constructor Details
-
AreaBreakRenderer
-
-
Method Details
-
addChild
-
layout
Description copied from interface:IRendererThis method simulates positioning of the renderer, including all of its children, and returns theLayoutResult, representing the layout result, including occupied area, status, i.e. if there was enough place to fit the renderer subtree, etc.LayoutResultcan be extended to return custom layout results for custom elements, e.g.TextRendererusesTextLayoutResultas its result. This method can be called standalone to learn how much area the renderer subtree needs, or can be called beforeIRenderer.draw(DrawContext), to prepare the renderer to be flushed to the output stream. -
draw
Throws an UnsupportedOperationException because instances of this class are only used for terminating the current content area.- Specified by:
drawin interfaceIRenderer- Parameters:
drawContext- contains thePdfDocumentto which the renderer subtree if flushed, thePdfCanvason which the renderer subtree is drawn and other additional parameters needed to perform drawing
-
getOccupiedArea
Throws an UnsupportedOperationException because instances of this class are only used for terminating the current content area.- Specified by:
getOccupiedAreain interfaceIRenderer- Returns:
LayoutAreainstance
-
hasProperty
public boolean hasProperty(int property) Description copied from interface:IPropertyContainerChecks if this entity has the specified property. Compared toIPropertyContainer.hasOwnProperty(int), this method can check parent's properties, styles, etc, depending on the origin of the instance- Specified by:
hasPropertyin interfaceIPropertyContainer- Parameters:
property- the property to be checked- Returns:
trueif this instance has given property,falseotherwise
-
hasOwnProperty
public boolean hasOwnProperty(int property) Description copied from interface:IPropertyContainerChecks if this entity has the specified property, i.e. if it was set to this very element earlier- Specified by:
hasOwnPropertyin interfaceIPropertyContainer- Parameters:
property- the property to be checked- Returns:
trueif this instance has given own property,falseotherwise
-
getProperty
public <T1> T1 getProperty(int key) Description copied from interface:IPropertyContainerGets the property from this entity. Compared toIPropertyContainer.getOwnProperty(int), this method can check parent's properties, styles, etc, depending on the origin of the instance- Specified by:
getPropertyin interfaceIPropertyContainer- Type Parameters:
T1- the return type associated with the property- Parameters:
key- the property to be retrieved- Returns:
- the value of the given property.
nullwill be returned if the property value was not found
-
getOwnProperty
public <T1> T1 getOwnProperty(int property) Description copied from interface:IPropertyContainerGets own property from this entity. The property must have been set earlier to this entity. If the property is not found,nullwill be returned.- Specified by:
getOwnPropertyin interfaceIPropertyContainer- Type Parameters:
T1- the return type associated with the property- Parameters:
property- the property to be retrieved- Returns:
- the value of the given own property.
nullwill be returned if the property value was not found
-
getDefaultProperty
public <T1> T1 getDefaultProperty(int property) Description copied from interface:IPropertyContainerGets the default property from this entity.- Specified by:
getDefaultPropertyin interfaceIPropertyContainer- Type Parameters:
T1- the return type associated with the property- Parameters:
property- the property to be retrieved- Returns:
- the default property value. If the default property is not defined,
nullwill be returned
-
getProperty
public <T1> T1 getProperty(int property, T1 defaultValue) Throws an UnsupportedOperationException because instances of this class are only used for terminating the current content area.- Specified by:
getPropertyin interfaceIRenderer- Type Parameters:
T1- the return type associated with the property- Parameters:
property- the property to be retrieveddefaultValue- a fallback value- Returns:
- the value of the given property
-
setProperty
Throws an UnsupportedOperationException because instances of this class are only used for terminating the current content area.- Specified by:
setPropertyin interfaceIPropertyContainer- Parameters:
property- the property to be setvalue- the value of the property
-
deleteOwnProperty
public void deleteOwnProperty(int property) Description copied from interface:IPropertyContainerDeletes the own property of this entity.- Specified by:
deleteOwnPropertyin interfaceIPropertyContainer- Parameters:
property- the property to be deleted
-
setParent
-
getModelElement
Description copied from interface:IRendererGets the model element associated with this renderer.- Specified by:
getModelElementin interfaceIRenderer- Returns:
- the model element, as a
container of properties
-
getParent
-
getChildRenderers
-
isFlushed
public boolean isFlushed()Description copied from interface:IRendererIndicates whether this renderer is flushed or not, i.e. ifIRenderer.draw(DrawContext)has already been called. -
move
public void move(float dx, float dy) Throws an UnsupportedOperationException because instances of this class are only used for terminating the current content area. -
getNextRenderer
Description copied from interface:IRendererGets a new instance of this class to be used as a next renderer, after this renderer is used, ifIRenderer.layout(LayoutContext)is called more than once.- Specified by:
getNextRendererin interfaceIRenderer- Returns:
- new renderer instance
-