Class AwtTextRenderer


  • public class AwtTextRenderer
    extends AbstractTextRenderer
    Author:
    Teodor Danciu (teodord@users.sourceforge.net)
    • Constructor Detail

      • AwtTextRenderer

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

      • getFontRenderContext

        public FontRenderContext getFontRenderContext()
        Description copied from class: AbstractTextRenderer
        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; } /**
        Overrides:
        getFontRenderContext in class AbstractTextRenderer