|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The interface for an class that is able to calculate the width of a given string, and the height of a line of text. The calculations rely on state information (e.g. font size, graphics device, etc) maintained by the calculator.
Every LayoutSupport
can create an instance of
a class that implements this interface,
via the LayoutSupport.createTextSizeCalculator(com.jrefinery.report.targets.FontDefinition)
method.
Method Summary | |
float |
getLineHeight()
Returns the line height. |
float |
getStringWidth(java.lang.String text,
int lineStartPos,
int endPos)
Calculates the width of a String |
Method Detail |
public float getStringWidth(java.lang.String text, int lineStartPos, int endPos)
String in the current Graphics
context.
- Parameters:
text
- the text.lineStartPos
- the start position of the substring to be measured.endPos
- the position of the last character to be measured.
- Returns:
- the width of the string in Java2D units.
public float getLineHeight()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |