Package com.itextpdf.layout.renderer
Class AreaBreakRenderer
java.lang.Object
com.itextpdf.layout.renderer.AreaBreakRenderer
- All Implemented Interfaces:
-
IPropertyContainer,IRenderer
Renderer for the
AreaBreak layout element. Will terminate the current content area and initialize a new one.
-
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 getDefaultProperty(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 getOwnProperty(int property) Gets own property from this entity.Gets the parentIRenderer.T1 getProperty(int key) Gets the property from this entity.T1 getProperty(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
Creates an AreaBreakRenderer.- Parameters:
-
areaBreak- theAreaBreakthat will be rendered by this object
-
-
Method Details
-
addChild
Throws an UnsupportedOperationException because instances of this class are only used for terminating the current content area. -
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
publicT1 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
publicT1 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
publicT1 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
publicT1 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 retrieved -
defaultValue- 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 set -
value- 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
Description copied from interface:IRendererExplicitly sets this object as the child of anotherIRendererin the renderer hierarchy. Some implementations also use this method internally to create a consistent hierarchy tree. -
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
Description copied from interface:IRendererGets the parentIRenderer. -
getChildRenderers
Description copied from interface:IRendererGets the childIRenderers.- Specified by:
-
getChildRenderersin interfaceIRenderer - Returns:
-
a list of direct child
renderersof this instance
-
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
-