public abstract class AbstractTextRenderer
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
allText |
protected int |
bottomPadding |
protected float |
drawPosX |
protected float |
drawPosY |
protected int |
height |
protected boolean |
isMaxHeightReached |
protected int |
leftPadding |
static java.awt.font.FontRenderContext |
LINE_BREAK_FONT_RENDER_CONTEXT |
protected float |
lineHeight |
protected int |
rightPadding |
protected int |
segmentIndex |
protected java.util.List<net.sf.jasperreports.engine.export.TabSegment> |
segments |
protected JRStyledText |
styledText |
protected JRPrintText |
text |
protected int |
topPadding |
protected float |
verticalAlignOffset |
protected int |
width |
protected int |
x |
protected int |
y |
Constructor and Description |
---|
AbstractTextRenderer(boolean isMinimizePrinterJobSize,
boolean ignoreMissingFont) |
Modifier and Type | Method and Description |
---|---|
abstract void |
draw() |
java.awt.font.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;
}
/**
|
int |
getHeight() |
static float |
getLineHeight(boolean isFirstLine,
JRParagraph paragraph,
float maxLeading,
float maxAscent) |
java.lang.String |
getPlainText() |
JRStyledText |
getStyledText() |
int |
getWidth() |
int |
getX() |
int |
getY() |
void |
initialize(JRPrintText text,
int offsetX,
int offsetY) |
void |
render() |
public static final java.awt.font.FontRenderContext LINE_BREAK_FONT_RENDER_CONTEXT
protected JRPrintText text
protected JRStyledText styledText
protected java.lang.String allText
protected int x
protected int y
protected int width
protected int height
protected int topPadding
protected int leftPadding
protected int bottomPadding
protected int rightPadding
protected float verticalAlignOffset
protected float drawPosY
protected float drawPosX
protected float lineHeight
protected boolean isMaxHeightReached
protected java.util.List<net.sf.jasperreports.engine.export.TabSegment> segments
protected int segmentIndex
public AbstractTextRenderer(boolean isMinimizePrinterJobSize, boolean ignoreMissingFont)
public int getX()
public int getY()
public int getWidth()
public int getHeight()
public JRStyledText getStyledText()
public java.lang.String getPlainText()
public void initialize(JRPrintText text, int offsetX, int offsetY)
public void render()
public abstract void draw()
public static float getLineHeight(boolean isFirstLine, JRParagraph paragraph, float maxLeading, float maxAscent)
public java.awt.font.FontRenderContext getFontRenderContext()
© 2001-2010 Jaspersoft Corporation www.jaspersoft.com