Package com.itextpdf.layout.renderer
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
class GridItemRenderer extends BlockRenderer
Wrapper renderer around grid item. It's expected there is always exactly 1 child renderer.
-
-
Field Summary
Fields Modifier and Type Field Description private booleanheightSetFlag saying that we updated height of the renderer we wrap.(package private) AbstractRendererrendererA renderer to wrap.-
Fields inherited from class com.itextpdf.layout.renderer.AbstractRenderer
BOTTOM_SIDE, childRenderers, EPS, flushed, INF, isLastRendererForModelElement, LEFT_SIDE, modelElement, occupiedArea, OVERLAP_EPSILON, parent, positionedRenderers, properties, RIGHT_SIDE, TOP_SIDE
-
-
Constructor Summary
Constructors Constructor Description GridItemRenderer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddChild(IRenderer renderer)Adds 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)IRenderergetNextRenderer()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, java.lang.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 com.itextpdf.layout.renderer.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, stopLayoutingChildrenIfChildResultNotFull
-
Methods inherited from class com.itextpdf.layout.renderer.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 Detail
-
renderer
AbstractRenderer renderer
A renderer to wrap.
-
heightSet
private boolean heightSet
Flag saying that we updated height of the renderer we wrap. It allows to remove that property on split.
-
-
Method Detail
-
addChild
public void addChild(IRenderer renderer)
Adds a child to the current renderer- Specified by:
addChildin interfaceIRenderer- Overrides:
addChildin classAbstractRenderer- Parameters:
renderer- a child to be added
-
getNextRenderer
public IRenderer 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
public void setProperty(int property, java.lang.Object value)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
void addChildRenderer(IRenderer child)
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)
-
-