|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jrefinery.report.targets.base.layout.DefaultSizeCalculator
An AWT-Based default implementation of an SizeCalculator. This implementation tries to detect the currently used FontRendererContext; some JDKs are unable to return reasonable sizes for the given text.
DefaultSizeCalculator| Nested Class Summary | |
static class |
DefaultSizeCalculator.BuggyFontRendererDetector
A helper class that is able to detect whether the implementation is considered buggy. |
| Constructor Summary | |
DefaultSizeCalculator(FontDefinition font)
Creates a new size calculator. |
|
| Method Summary | |
static DefaultSizeCalculator |
getDefaultSizeCalculator(FontDefinition font)
Returns an instance. |
static DefaultSizeCalculator.BuggyFontRendererDetector |
getFrcDetector()
Returns a singleon instance of the FontRenderContext bug detector. |
float |
getLineHeight()
Returns the height of the current font. |
float |
getStringWidth(java.lang.String text,
int lineStartPos,
int endPos)
Calculates the width of the specified String in the current Graphics context. |
java.lang.String |
toString()
Converts this object to a string. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public DefaultSizeCalculator(FontDefinition font)
font - the font.| Method Detail |
public static DefaultSizeCalculator.BuggyFontRendererDetector getFrcDetector()
public static DefaultSizeCalculator getDefaultSizeCalculator(FontDefinition font)
font - The font definition.
public float getLineHeight()
getLineHeight in interface SizeCalculator
public float getStringWidth(java.lang.String text,
int lineStartPos,
int endPos)
getStringWidth in interface SizeCalculatortext - the text to be weighted.lineStartPos - the start position of the substring to be weighted.endPos - the position of the last characterto be included in the weightening process.
public java.lang.String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||