Class AwtTextRenderer
- java.lang.Object
-
- net.sf.jasperreports.engine.export.AbstractTextRenderer
-
- net.sf.jasperreports.engine.export.AwtTextRenderer
-
public class AwtTextRenderer extends AbstractTextRenderer
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.sf.jasperreports.engine.export.AbstractTextRenderer
AbstractTextRenderer.TabSegment
-
-
Field Summary
Fields Modifier and Type Field Description protected JRStyledTextAttributeSelector
noBackcolorSelector
protected JRStyledTextUtil
styledTextUtil
-
Fields inherited from class net.sf.jasperreports.engine.export.AbstractTextRenderer
allText, bottomPadding, bulletChunk, bulletText, drawPosX, drawPosY, height, htmlListIndent, ignoreMissingFont, indentFirstLine, isFirstParagraph, isLastParagraph, isMaxHeightReached, jasperReportsContext, justifyLastLine, leftPadding, LINE_BREAK_FONT_RENDER_CONTEXT, lineHeight, propUtil, rightPadding, segmentIndex, segments, styledText, text, topPadding, verticalAlignOffset, width, x, y
-
-
Constructor Summary
Constructors Constructor Description AwtTextRenderer(JasperReportsContext jasperReportsContext, boolean isMinimizePrinterJobSize, boolean ignoreMissingFont, boolean defaultIndentFirstLine, boolean defaultJustifyLastLine)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
draw()
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; } /**void
initialize(Graphics2D grx, JRPrintText text, int offsetX, int offsetY)
-
Methods inherited from class net.sf.jasperreports.engine.export.AbstractTextRenderer
getAttributedString, getBottomPadding, getHeight, getLeftPadding, getLineHeight, getListWriter, getPlainText, getRightPadding, getStyledText, getTopPadding, getWidth, getX, getY, initialize, render, renderParagraph
-
-
-
-
Field Detail
-
noBackcolorSelector
protected final JRStyledTextAttributeSelector noBackcolorSelector
-
styledTextUtil
protected final JRStyledTextUtil styledTextUtil
-
-
Constructor Detail
-
AwtTextRenderer
public AwtTextRenderer(JasperReportsContext jasperReportsContext, boolean isMinimizePrinterJobSize, boolean ignoreMissingFont, boolean defaultIndentFirstLine, boolean defaultJustifyLastLine)
-
-
Method Detail
-
initialize
public void initialize(Graphics2D grx, JRPrintText text, int offsetX, int offsetY)
-
draw
public void draw()
- Specified by:
draw
in classAbstractTextRenderer
-
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 classAbstractTextRenderer
-
-