public class AwtTextRenderer extends AbstractTextRenderer
allText, bottomPadding, drawPosX, drawPosY, height, isMaxHeightReached, jasperReportsContext, leftPadding, LINE_BREAK_FONT_RENDER_CONTEXT, lineHeight, noBackcolorSelector, rightPadding, segmentIndex, segments, styledText, text, topPadding, verticalAlignOffset, width, x, y| Constructor and Description |
|---|
AwtTextRenderer(boolean isMinimizePrinterJobSize,
boolean ignoreMissingFont)
Deprecated.
|
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().floatValue());
break;
}
case FIXED:
{
lineHeight = paragraph.getLineSpacingSize().floatValue();
break;
}
default :
{
throw new JRRuntimeException("Invalid line space type: " + paragraph.getLineSpacing());
}
}
return lineHeight;
}
/**
|
static AwtTextRenderer |
getInstance()
Deprecated.
|
void |
initialize(Graphics2D grx,
JRPrintText text,
int offsetX,
int offsetY) |
getHeight, getLineHeight, getPlainText, getStyledText, getWidth, getX, getY, initialize, renderpublic AwtTextRenderer(JasperReportsContext jasperReportsContext, boolean isMinimizePrinterJobSize, boolean ignoreMissingFont)
public AwtTextRenderer(boolean isMinimizePrinterJobSize,
boolean ignoreMissingFont)
AwtTextRenderer(JasperReportsContext, boolean, boolean).public static AwtTextRenderer getInstance()
AwtTextRenderer(JasperReportsContext, boolean, boolean).public void initialize(Graphics2D grx, JRPrintText text, int offsetX, int offsetY)
public void draw()
draw in class AbstractTextRendererpublic FontRenderContext getFontRenderContext()
AbstractTextRenderergetFontRenderContext in class AbstractTextRendererCopyright © 2015. All rights reserved.