Class FormFieldValueNonTrimmingTextRenderer
- All Implemented Interfaces:
IPropertyContainer, ILeafElementRenderer, IRenderer
-
Field Summary
FieldsFields inherited from class TextRenderer
line, otfFeaturesApplied, reversedRanges, savedWordBreakAtLineEnding, strToBeConverted, tabAnchorCharacterPosition, text, TEXT_SPACE_COEFF, yLineOffsetFields inherited from class AbstractRenderer
childRenderers, EPS, flushed, INF, isLastRendererForModelElement, modelElement, occupiedArea, OVERLAP_EPSILON, parent, positionedRenderers, properties -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected TextRenderercreateCopy(GlyphLine gl, PdfFont font) Gets a new instance of this class to be used as a next renderer, after this renderer is used, ifTextRenderer.layout(LayoutContext)is called more than once.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.private voidsetCallTrimFirst(boolean callTrimFirst) voidTrims any whitespace characters from the start of theGlyphLineto be rendered.Methods inherited from class TextRenderer
applyOtf, baseCharactersCount, calculateAscenderDescender, calculateAscenderDescender, calculateLineWidth, charAt, createOverflowRenderer, createSplitRenderer, draw, drawSingleUnderline, getAscent, getBackgroundArea, getDescent, getFirstYLineRecursively, getLastYLineRecursively, getMinMaxWidth, getNumberOfSpaces, getTabAnchorCharacterPosition, getText, getYLine, length, lineLength, moveYLineTo, resolveFonts, setProcessedGlyphLineAndFont, setText, setText, split, toStringMethods inherited from class AbstractRenderer
addAllProperties, addChild, alignChildHorizontally, allowLastYLineRecursiveExtraction, applyAbsolutePosition, applyAction, applyBorderBox, applyBorderBox, applyDestination, applyDestinationsAndAnnotation, applyLinkAnnotation, applyMargins, applyMargins, applyPaddings, applyPaddings, applyRelativePositioningTranslation, beginElementOpacityApplying, beginTransformationIfApplied, calculateAbsolutePdfBBox, calculateBBox, calculateShiftToPositionBBoxOfPointsAt, clipBackgroundArea, clipBackgroundArea, clipBorderArea, createXObject, deleteOwnProperty, deleteProperty, drawBackground, drawBorder, drawChildren, endElementOpacityApplying, endTransformationIfApplied, getBorderAreaBBox, getBorderRadii, getBorders, getChildRenderers, getDefaultProperty, getInnerAreaBBox, getMargins, getMinMaxWidth, getModelElement, getOccupiedArea, getOccupiedAreaBBox, getOwnProperties, getOwnProperty, getPaddings, getParent, getProperty, getProperty, getPropertyAsBoolean, getPropertyAsColor, getPropertyAsFloat, getPropertyAsFloat, getPropertyAsFont, getPropertyAsInteger, getPropertyAsTransparentColor, getPropertyAsUnitValue, hasAbsoluteUnitValue, hasOwnOrModelProperty, hasOwnProperty, hasProperty, hasRelativeUnitValue, initElementAreas, isAbsolutePosition, isBorderBoxSizing, isFirstOnRootArea, isFixedLayout, isFlushed, isKeepTogether, isNotFittingHeight, isNotFittingLayoutArea, isNotFittingWidth, isOverflowFit, isOverflowProperty, isOverflowProperty, isOverflowProperty, isPositioned, isRelativePosition, isStaticLayout, move, rectangleToPointsList, retrieveHeight, retrieveMaxHeight, retrieveMaxWidth, retrieveMinHeight, retrieveMinWidth, retrieveResolvedDeclaredHeight, retrieveUnitValue, retrieveUnitValue, retrieveWidth, setBorders, setMinMaxWidthBasedOnFixedWidth, setParent, setProperty, transformPoints, updateHeight, updateHeightsOnSplit, updateMaxHeight, updateMinHeight, updateWidthMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface IPropertyContainer
deleteOwnProperty, getDefaultProperty, getOwnProperty, getProperty, hasOwnProperty, hasProperty, setPropertyMethods inherited from interface IRenderer
addChild, getChildRenderers, getModelElement, getOccupiedArea, getParent, getProperty, isFlushed, move, setParent
-
Field Details
-
callTrimFirst
private boolean callTrimFirst
-
-
Constructor Details
-
FormFieldValueNonTrimmingTextRenderer
-
-
Method Details
-
getNextRenderer
Description copied from class:TextRendererGets a new instance of this class to be used as a next renderer, after this renderer is used, ifTextRenderer.layout(LayoutContext)is called more than once.If
TextRendereroverflows to the next line, iText uses this method to create a renderer for the overflow part. So if one wants to extendTextRenderer, one should override this method: otherwise the default method will be used and thus the default rather than the custom renderer will be created. Another method that should be overridden in case ofTextRenderer's extension isTextRenderer.createCopy(GlyphLine, PdfFont). This method is responsible for creation ofTextRenderer's copies, which represent its parts of specific font.- Specified by:
getNextRendererin interfaceIRenderer- Overrides:
getNextRendererin classTextRenderer- Returns:
- new renderer instance
-
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.- Specified by:
layoutin interfaceIRenderer- Overrides:
layoutin classTextRenderer- Parameters:
layoutContext- the description of layout area and any other additional information- Returns:
- result of the layout process
-
trimFirst
public void trimFirst()Description copied from class:TextRendererTrims any whitespace characters from the start of theGlyphLineto be rendered.- Overrides:
trimFirstin classTextRenderer
-
createCopy
Creates a copy of thisTextRenderer, which corresponds to the passedGlyphLinewithPdfFont.While processing
TextRenderer, iText uses this method to createglyph linesof specificfonts, which represent theTextRenderer's parts. If one extendsTextRenderer, one should override this method, otherwise ifFontSelectorrelated logic is triggered, copies of thisTextRendererwill have the default behavior rather than the custom one.- Overrides:
createCopyin classTextRenderer- Parameters:
gl- aGlyphLinewhich represents some of thisTextRenderer's contentfont- aPdfFontfor this part of theTextRenderer's content- Returns:
- copy of this
TextRenderer, which correspond to the passedGlyphLinewithPdfFont
-
setCallTrimFirst
private void setCallTrimFirst(boolean callTrimFirst)
-