Class AbstractTextRenderer

    • Field Detail

      • LINE_BREAK_FONT_RENDER_CONTEXT

        public static final java.awt.font.FontRenderContext LINE_BREAK_FONT_RENDER_CONTEXT
      • allText

        protected java.lang.String allText
      • x

        protected int x
      • y

        protected int y
      • width

        protected int width
      • height

        protected int height
      • topPadding

        protected int topPadding
      • leftPadding

        protected int leftPadding
      • bottomPadding

        protected int bottomPadding
      • rightPadding

        protected int rightPadding
      • verticalAlignOffset

        protected float verticalAlignOffset
      • drawPosY

        protected float drawPosY
      • drawPosX

        protected float drawPosX
      • lineHeight

        protected float lineHeight
      • isMaxHeightReached

        protected boolean isMaxHeightReached
      • isFirstParagraph

        protected boolean isFirstParagraph
      • isLastParagraph

        protected boolean isLastParagraph
      • segmentIndex

        protected int segmentIndex
      • indentFirstLine

        protected boolean indentFirstLine
      • justifyLastLine

        protected boolean justifyLastLine
      • htmlListIndent

        protected int htmlListIndent
      • bulletText

        protected java.lang.String bulletText
      • bulletChunk

        protected java.text.AttributedString bulletChunk
      • ignoreMissingFont

        protected final boolean ignoreMissingFont
    • Constructor Detail

      • AbstractTextRenderer

        public AbstractTextRenderer​(JasperReportsContext jasperReportsContext,
                                    boolean isMinimizePrinterJobSize,
                                    boolean ignoreMissingFont,
                                    boolean defaultIndentFirstLine,
                                    boolean defaultJustifyLastLine)
    • Method Detail

      • getX

        public int getX()
      • getY

        public int getY()
      • getWidth

        public int getWidth()
      • getHeight

        public int getHeight()
      • getTopPadding

        public int getTopPadding()
      • getLeftPadding

        public int getLeftPadding()
      • getBottomPadding

        public int getBottomPadding()
      • getRightPadding

        public int getRightPadding()
      • getPlainText

        public java.lang.String getPlainText()
      • render

        public void render()
      • renderParagraph

        protected void renderParagraph​(java.text.AttributedCharacterIterator allParagraphs,
                                       int paragraphStart,
                                       java.lang.String paragraphText)
      • getAttributedString

        protected java.text.AttributedString getAttributedString()
      • draw

        public abstract void draw()
      • getLineHeight

        public static float getLineHeight​(boolean isFirstLine,
                                          JRParagraph paragraph,
                                          float maxLeading,
                                          float maxAscent)
      • getFontRenderContext

        public java.awt.font.FontRenderContext getFontRenderContext()
        public static float getLineHeight(JRParagraph paragraph, float lineSpacingFactor, int maxFontSize) { float lineHeight = 0; switch(paragraph.getLineSpacing()) { case SINGLE: case ONE_AND_HALF: case DOUBLE: case PROPORTIONAL: { lineHeight = lineSpacingFactor * maxFontSize; break; } case AT_LEAST: { lineHeight = Math.max(lineSpacingFactor * maxFontSize, paragraph.getLineSpacingSize()); break; } case FIXED: { lineHeight = paragraph.getLineSpacingSize(); break; } default : { throw new JRRuntimeException("Invalid line space type: " + paragraph.getLineSpacing()); } } return lineHeight; } /**