Class AbstractTextFieldRenderer

    • Field Detail

      • font

        protected PdfFont font
        The font to be used for the text.
    • Constructor Detail

      • AbstractTextFieldRenderer

        AbstractTextFieldRenderer​(IFormField modelElement)
        Creates a new AbstractTextFieldRenderer instance.
        Parameters:
        modelElement - the model element
    • Method Detail

      • createParagraphRenderer

        IRenderer createParagraphRenderer​(java.lang.String defaultValue)
        Creates a paragraph renderer.
        Parameters:
        defaultValue - the default value
        Returns:
        the renderer
      • applyDefaultFieldProperties

        void applyDefaultFieldProperties​(PdfFormField inputField)
        Applies the default field properties.
        Parameters:
        inputField - the input field
      • getHeightRowsBased

        float getHeightRowsBased​(java.util.List<LineRenderer> lines,
                                 Rectangle bBox,
                                 int rows)
      • updatePdfFont

        void updatePdfFont​(ParagraphRenderer renderer)
        Updates the font.
        Parameters:
        renderer - the renderer
      • approximateFontSize

        float approximateFontSize​(LayoutContext layoutContext,
                                  float lFontSize,
                                  float rFontSize)
        Approximates font size to fit occupied area if width anf height are specified.
        Parameters:
        layoutContext - layout context that specifies layout area.
        lFontSize - minimal font size value.
        rFontSize - maximum font size value.
        Returns:
        fitting font size or -1 in case it shouldn't be approximated.
      • calculateFittingFontSize

        float calculateFittingFontSize​(IRenderer renderer,
                                       float lFontSize,
                                       float rFontSize,
                                       LayoutContext newLayoutContext,
                                       int numberOfIterations)
      • updateHtmlColsSizeBasedWidth

        float updateHtmlColsSizeBasedWidth​(float width)
      • adjustNumberOfContentLines

        void adjustNumberOfContentLines​(java.util.List<LineRenderer> lines,
                                        Rectangle bBox,
                                        int rows)
        Adjust number of content lines.
        Parameters:
        lines - the lines that need to be rendered
        bBox - the bounding box
        rows - the desired number of lines
      • adjustNumberOfContentLines

        void adjustNumberOfContentLines​(java.util.List<LineRenderer> lines,
                                        Rectangle bBox,
                                        float height)
        Adjust number of content lines.
        Parameters:
        lines - the lines that need to be rendered
        bBox - the bounding box
        height - the desired height of content
      • getLowestChildBottom

        float getLowestChildBottom​(IRenderer renderer,
                                   float value)
        Gets the value of the lowest bottom coordinate for all field's children recursively.
        Returns:
        the lowest child bottom.
      • adjustNumberOfContentLines

        private static void adjustNumberOfContentLines​(java.util.List<LineRenderer> lines,
                                                       Rectangle bBox,
                                                       int linesNumber,
                                                       float height)