Package com.itextpdf.layout.renderer
Class AreaBreakRenderer
java.lang.Object
com.itextpdf.layout.renderer.AbstractBreakRenderer
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
FieldsFields inherited from class com.itextpdf.layout.renderer.AbstractBreakRenderer
parent, properties -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidLogs a warning about unexpected use ofAreaBreakRendererif not ignored, because instances of this class are only used for terminating the current content area.voiddraw(DrawContext drawContext) Logs a warning about unexpected use ofAreaBreakRendererif not ignored, because instances of this class are only used for terminating the current content area.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 if not ignored, because instances of this class are only used for terminating the current content area.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) Logs a warning about unexpected use ofAreaBreakRendererif not ignored, because instances of this class are only used for terminating the current content area.Methods inherited from class com.itextpdf.layout.renderer.AbstractBreakRenderer
deleteOwnProperty, getChildRenderers, getDefaultProperty, getOwnProperty, getParent, getProperty, getProperty, hasOwnProperty, hasProperty, isFlushed, setParent, setProperty
-
Field Details
-
areaBreak
-
occupiedArea
-
-
Constructor Details
-
AreaBreakRenderer
Creates an AreaBreakRenderer.- Parameters:
-
areaBreak- theAreaBreakthat will be rendered by this object
-
-
Method Details
-
addChild
Logs a warning about unexpected use ofAreaBreakRendererif not ignored, because instances of this class are only used for terminating the current content area.- Parameters:
-
renderer- a child to be added
-
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.- Parameters:
-
layoutContext- the description of layout area and any other additional information - Returns:
- result of the layout process
-
draw
Logs a warning about unexpected use ofAreaBreakRendererif not ignored, because instances of this class are only used for terminating the current content area.- 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 if not ignored, because instances of this class are only used for terminating the current content area.- Returns:
-
LayoutAreainstance
-
getModelElement
Description copied from interface:IRendererGets the model element associated with this renderer.- Returns:
-
the model element, as a
container of properties
-
move
public void move(float dx, float dy) Logs a warning about unexpected use ofAreaBreakRendererif not ignored, because instances of this class are only used for terminating the current content area.- Parameters:
-
dx- the x-axis offset in points. Positive value will move the renderer subtree to the right. -
dy- the y-axis offset in points. Positive value will move the renderer subtree to the top.
-
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.- Returns:
- new renderer instance
-