Class GridItemRenderer
java.lang.Object
com.itextpdf.layout.renderer.AbstractRenderer
com.itextpdf.layout.renderer.BlockRenderer
com.itextpdf.layout.renderer.GridItemRenderer
- All Implemented Interfaces:
IPropertyContainer, IRenderer
Wrapper renderer around grid item. It's expected there is always exactly 1 child renderer.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanFlag saying that we updated height of the renderer we wrap.(package private) AbstractRendererA renderer to wrap.Fields inherited from class AbstractRenderer
BOTTOM_SIDE, childRenderers, EPS, flushed, INF, isLastRendererForModelElement, LEFT_SIDE, modelElement, occupiedArea, OVERLAP_EPSILON, parent, positionedRenderers, properties, RIGHT_SIDE, TOP_SIDE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a child to the current renderer(package private) voidaddChildRenderer(IRenderer child) Add the specifiedrendererto the end of children list and update its parent link tothis.(package private) floatcalculateHeight(float initialHeight) 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.<T1> T1getProperty(int key) Gets the property from this entity.voidsetProperty(int property, Object value) Sets a property for this entity.(package private) voidupdateHeightsOnSplit(float usedHeight, boolean wasHeightClipped, AbstractRenderer splitRenderer, AbstractRenderer overflowRenderer, boolean enlargeOccupiedAreaOnHeightWasClipped) Methods inherited from class BlockRenderer
applyMaxHeight, applyMinHeight, applyRotationLayout, applyVerticalAlignment, applyWidth, beginRotationIfApplied, correctFixedLayout, createOverflowRenderer, createRotationTransformInsideOccupiedArea, createSplitAndOverflowRenderers, createSplitRenderer, decreaseLayoutBoxAfterChildPlacement, draw, endRotationIfApplied, fixOccupiedAreaIfOverflowedX, fixOccupiedAreaIfOverflowedY, getMinMaxWidth, getMinMaxWidth, getOccupiedAreaBBox, getResolvedFont, handleForcedPlacement, layout, processNotFullChildResult, recalculateLayoutBoxBeforeChildLayout, recalculateOccupiedAreaAfterChildLayout, startChildMarginsHandling, stopLayoutingChildrenIfChildResultNotFullMethods inherited from class AbstractRenderer
addAllChildRenderers, addAllChildRenderers, addAllProperties, alignChildHorizontally, allowLastYLineRecursiveExtraction, applyAbsolutePosition, applyAbsolutePositionIfNeeded, applyAction, applyBorderBox, applyBorderBox, applyDestination, applyDestinationsAndAnnotation, applyLinkAnnotation, applyMargins, applyMargins, applyMarginsBordersPaddings, applyPaddings, applyPaddings, applyRelativePositioningTranslation, beginElementOpacityApplying, beginTransformationIfApplied, calculateAbsolutePdfBBox, calculateAdditionalWidth, calculateBBox, calculatePaddingBorderHeight, calculatePaddingBorderWidth, calculateShiftToPositionBBoxOfPointsAt, clipBackgroundArea, clipBackgroundArea, clipBorderArea, createFontCharacteristics, createXObject, deleteOwnProperty, deleteProperty, drawBackground, drawBorder, drawChildren, drawPositionedChildren, endElementOpacityApplying, endTransformationIfApplied, getAspectRatio, getBackgroundArea, getBorderAreaBBox, getBorderRadii, getBorders, getBorders, getChildRenderers, getDefaultProperty, getFirstYLineRecursively, getInnerAreaBBox, getLastYLineRecursively, getMargins, getModelElement, getOccupiedArea, getOwnProperties, getOwnProperty, getPaddings, getParent, getPdfDocument, getProperty, getPropertyAsBoolean, getPropertyAsColor, getPropertyAsFloat, getPropertyAsFloat, getPropertyAsFloat, getPropertyAsFont, getPropertyAsInteger, getPropertyAsTransparentColor, getPropertyAsUnitValue, getPropertyAsUnitValue, getRootRenderer, hasAbsoluteUnitValue, hasAspectRatio, hasOwnOrModelProperty, hasOwnProperty, hasProperty, hasRelativeUnitValue, initElementAreas, isAbsolutePosition, isBorderBoxSizing, isFirstOnRootArea, isFirstOnRootArea, isFixedLayout, isFlushed, isKeepTogether, isKeepTogether, isNotFittingHeight, isNotFittingLayoutArea, isNotFittingWidth, isOverflowFit, isOverflowProperty, isOverflowProperty, isOverflowProperty, isPositioned, isRelativePosition, isStaticLayout, logWarningIfGetNextRendererNotOverridden, move, noAbsolutePositionInfo, preparePositionedRendererAndAreaForLayout, processWaitingDrawing, rectangleToPointsList, removeAllChildRenderers, removeChildRenderer, replaceOwnProperty, resolveFirstPdfFont, resolveFirstPdfFont, retrieveHeight, retrieveMaxHeight, retrieveMaxWidth, retrieveMinHeight, retrieveMinWidth, retrieveResolvedDeclaredHeight, retrieveUnitValue, retrieveUnitValue, retrieveWidth, returnBackOwnProperty, setBorders, setChildRenderer, setChildRenderers, setMinMaxWidthBasedOnFixedWidth, setParent, setThisAsParent, shrinkOccupiedAreaForAbsolutePosition, toString, transformPoints, updateHeight, updateHeightsOnSplit, updateMaxHeight, updateMinHeight, updateWidth
-
Field Details
-
renderer
AbstractRenderer rendererA renderer to wrap. -
heightSet
private boolean heightSetFlag saying that we updated height of the renderer we wrap. It allows to remove that property on split.
-
-
Constructor Details
-
GridItemRenderer
GridItemRenderer()
-
-
Method Details
-
addChild
Adds a child to the current renderer- Specified by:
addChildin interfaceIRenderer- Overrides:
addChildin classAbstractRenderer- Parameters:
renderer- a child to be added
-
getNextRenderer
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.- Returns:
- new renderer instance
-
getProperty
public <T1> T1 getProperty(int key) Gets 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- Overrides:
getPropertyin classAbstractRenderer- 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
-
setProperty
Sets a property for this entity.- Specified by:
setPropertyin interfaceIPropertyContainer- Overrides:
setPropertyin classAbstractRenderer- Parameters:
property- the property to be setvalue- the value of the property
-
updateHeightsOnSplit
void updateHeightsOnSplit(float usedHeight, boolean wasHeightClipped, AbstractRenderer splitRenderer, AbstractRenderer overflowRenderer, boolean enlargeOccupiedAreaOnHeightWasClipped) - Overrides:
updateHeightsOnSplitin classAbstractRenderer
-
addChildRenderer
Add the specifiedrendererto the end of children list and update its parent link tothis.- Overrides:
addChildRendererin classAbstractRenderer- Parameters:
child- thechild rendererto be add
-
calculateHeight
float calculateHeight(float initialHeight)
-