public class AwtTextRenderer extends AbstractTextRenderer
AbstractTextRenderer.TabSegment| Modifier and Type | Field and Description |
|---|---|
protected JRStyledTextAttributeSelector |
noBackcolorSelector |
protected JRStyledTextUtil |
styledTextUtil |
allText, bottomPadding, drawPosX, drawPosY, height, 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 and Description |
|---|
AwtTextRenderer(JasperReportsContext jasperReportsContext,
boolean isMinimizePrinterJobSize,
boolean ignoreMissingFont)
Deprecated.
|
AwtTextRenderer(JasperReportsContext jasperReportsContext,
boolean isMinimizePrinterJobSize,
boolean ignoreMissingFont,
boolean defaultIndentFirstLine,
boolean defaultJustifyLastLine) |
| Modifier and Type | Method and 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) |
getAttributedString, getBottomPadding, getHeight, getLeftPadding, getLineHeight, getPlainText, getRightPadding, getStyledText, getTopPadding, getWidth, getX, getY, initialize, render, renderParagraphprotected final JRStyledTextAttributeSelector noBackcolorSelector
protected final JRStyledTextUtil styledTextUtil
public AwtTextRenderer(JasperReportsContext jasperReportsContext, boolean isMinimizePrinterJobSize, boolean ignoreMissingFont)
AwtTextRenderer(JasperReportsContext, boolean, boolean, boolean, boolean).public AwtTextRenderer(JasperReportsContext jasperReportsContext, boolean isMinimizePrinterJobSize, boolean ignoreMissingFont, boolean defaultIndentFirstLine, boolean defaultJustifyLastLine)
public void initialize(Graphics2D grx, JRPrintText text, int offsetX, int offsetY)
public void draw()
draw in class AbstractTextRendererpublic FontRenderContext getFontRenderContext()
AbstractTextRenderergetFontRenderContext in class AbstractTextRendererCopyright © 2020 TIBCO Software Inc.. All rights reserved.