Package com.itextpdf.layout.renderer
Class SectionBreakRenderer
java.lang.Object
com.itextpdf.layout.renderer.AbstractBreakRenderer
com.itextpdf.layout.renderer.SectionBreakRenderer
- All Implemented Interfaces:
-
IPropertyContainer,IRenderer
Renderer for the
SectionBreak layout element. Will terminate the current page content if any and start a new page.
-
Field Summary
FieldsFields inherited from class com.itextpdf.layout.renderer.AbstractBreakRenderer
parent, properties -
Constructor Summary
ConstructorsConstructorDescriptionSectionBreakRenderer(SectionBreak sectionBreak) Creates newSectionBreakRendererinstance. -
Method Summary
Modifier and TypeMethodDescriptionvoidLogs a warning about unexpected use ofSectionBreakRendererif not ignored, because instances of this class are only used for terminating the current page content.voiddraw(DrawContext drawContext) Logs a warning about unexpected use ofSectionBreakRendererif not ignored, because instances of this class are only used for terminating the current page content.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 page content.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 ofSectionBreakRendererif not ignored, because instances of this class are only used for terminating the current page content.Methods inherited from class com.itextpdf.layout.renderer.AbstractBreakRenderer
deleteOwnProperty, getChildRenderers, getDefaultProperty, getOwnProperty, getParent, getProperty, getProperty, hasOwnProperty, hasProperty, isFlushed, setParent, setProperty
-
Field Details
-
occupiedArea
-
-
Constructor Details
-
SectionBreakRenderer
Creates newSectionBreakRendererinstance.- Parameters:
-
sectionBreak- theSectionBreakthat will be rendered by this object
-
-
Method Details
-
addChild
Logs a warning about unexpected use ofSectionBreakRendererif not ignored, because instances of this class are only used for terminating the current page content.- 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 ofSectionBreakRendererif not ignored, because instances of this class are only used for terminating the current page content.- 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 page content.- 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 ofSectionBreakRendererif not ignored, because instances of this class are only used for terminating the current page content.- 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
-