public abstract class RootRenderer extends AbstractRenderer
| Modifier and Type | Field and Description |
|---|---|
protected LayoutArea |
currentArea |
protected int |
currentPageNumber |
protected boolean |
immediateFlush |
childRenderers, EPS, flushed, INF, isLastRendererForModelElement, modelElement, occupiedArea, parent, positionedRenderers, properties| Constructor and Description |
|---|
RootRenderer() |
| Modifier and Type | Method and Description |
|---|---|
void |
addChild(IRenderer renderer)
Adds a child to the current renderer
|
void |
close()
This method correctly closes the RootRenderer instance.
|
void |
flush()
Draws (flushes) the content.
|
protected abstract void |
flushSingleRenderer(IRenderer resultRenderer) |
LayoutArea |
getCurrentArea() |
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.
|
protected void |
shrinkCurrentAreaAndProcessRenderer(IRenderer renderer, List<IRenderer> resultRenderers, LayoutResult result) |
protected abstract LayoutArea |
updateCurrentArea(LayoutResult overflowResult) |
addAllProperties, alignChildHorizontally, alignChildHorizontally, applyAbsolutePosition, applyAction, applyBorderBox, applyBorderBox, applyDestination, applyDestinationsAndAnnotation, applyLinkAnnotation, applyMargins, applyMargins, applyPaddings, applyPaddings, applyRelativePositioningTranslation, beginElementOpacityApplying, calculateAbsolutePdfBBox, calculateBBox, calculateShiftToPositionBBoxOfPointsAt, deleteOwnProperty, deleteProperty, draw, drawBackground, drawBorder, drawChildren, endElementOpacityApplying, getBorderAreaBBox, getBorders, getChildRenderers, getDefaultProperty, getFirstYLineRecursively, getInnerAreaBBox, getMargins, getModelElement, getOccupiedArea, getOccupiedAreaBBox, getOwnProperties, getOwnProperty, getPaddings, getParent, getProperty, getProperty, getPropertyAsBoolean, getPropertyAsColor, getPropertyAsFloat, getPropertyAsFloat, getPropertyAsFont, getPropertyAsInteger, getPropertyAsTransparentColor, hasOwnOrModelProperty, hasOwnProperty, hasProperty, initElementAreas, isAbsolutePosition, isFixedLayout, isFlushed, isKeepTogether, isNotFittingHeight, isNotFittingLayoutArea, isPositioned, isRelativePosition, isStaticLayout, move, overrideHeightProperties, rectangleToPointsList, retrieveHeight, retrieveMaxHeight, retrieveMinHeight, retrieveUnitValue, retrieveWidth, setBorders, setParent, setProperty, toString, transformPointsclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetNextRendererprotected boolean immediateFlush
protected LayoutArea currentArea
protected int currentPageNumber
public void addChild(IRenderer renderer)
AbstractRenderer
addChild in interface IRenderer
addChild in class AbstractRenderer
renderer - a child to be added
public void flush()
public void close()
RootRenderer instance. There might be hanging elements, like in case of Property.KEEP_WITH_NEXT is set to true and when no consequent element has been added. This method addresses such situations.
public LayoutResult layout(LayoutContext layoutContext)
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.
layoutContext - the description of layout area and any other additional information
public LayoutArea getCurrentArea()
protected abstract void flushSingleRenderer(IRenderer resultRenderer)
protected abstract LayoutArea updateCurrentArea(LayoutResult overflowResult)
protected void shrinkCurrentAreaAndProcessRenderer(IRenderer renderer, List<IRenderer> resultRenderers, LayoutResult result)
Copyright © 1998–2017 iText Group NV. All rights reserved.