public class AwtTextRenderer extends AbstractTextRenderer
AbstractTextRenderer.TabSegment
Modifier and Type | Field and Description |
---|---|
protected JRStyledTextAttributeSelector |
noBackcolorSelector |
protected JRStyledTextUtil |
styledTextUtil |
allText, bottomPadding, drawPosX, drawPosY, height, isMaxHeightReached, jasperReportsContext, leftPadding, LINE_BREAK_FONT_RENDER_CONTEXT, lineHeight, rightPadding, segmentIndex, segments, styledText, text, topPadding, verticalAlignOffset, width, x, y
Constructor and Description |
---|
AwtTextRenderer(JasperReportsContext jasperReportsContext,
boolean isMinimizePrinterJobSize,
boolean ignoreMissingFont) |
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) |
getHeight, getLineHeight, getPlainText, getStyledText, getWidth, getX, getY, initialize, render
protected final JRStyledTextAttributeSelector noBackcolorSelector
protected final JRStyledTextUtil styledTextUtil
public AwtTextRenderer(JasperReportsContext jasperReportsContext, boolean isMinimizePrinterJobSize, boolean ignoreMissingFont)
public void initialize(Graphics2D grx, JRPrintText text, int offsetX, int offsetY)
public void draw()
draw
in class AbstractTextRenderer
public FontRenderContext getFontRenderContext()
AbstractTextRenderer
getFontRenderContext
in class AbstractTextRenderer
Copyright © 2019 TIBCO Software Inc.. All rights reserved.