| java.lang.Object org.jfree.report.layout.DefaultSizeCalculator
DefaultSizeCalculator | public strictfp class DefaultSizeCalculator implements SizeCalculator(Code) | | 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.
author: Thomas Morgner See Also: org.jfree.report.layout.DefaultSizeCalculator |
Inner Class :public static class BuggyFontRendererDetector | |
Constructor Summary | |
public | DefaultSizeCalculator(FontDefinition font, boolean maxLineHeightUsed) Creates a new size calculator.
Parameters: font - the font Parameters: maxLineHeightUsed - a flag indicating whether the maximum bounding box is used. | public | DefaultSizeCalculator(Font font, boolean maxLineHeightUsed) Creates a new size calculator. |
Method Summary | |
public static synchronized DefaultSizeCalculator | getDefaultSizeCalculator(FontDefinition font, boolean maxLineHeightUsed) Creates a new size calculator.
Parameters: font - The font definition. Parameters: maxLineHeightUsed - a flag indicating whether the maximum bounding box is used. | public static BuggyFontRendererDetector | getFrcDetector() Returns a singleon instance of the FontRenderContext bug detector. | public float | getLineHeight() Returns the height of the current font. | public float | getStringWidth(String text, int lineStartPos, int endPos) Calculates the width of the specified String in the current Graphics context.
Parameters: text - the text to be weighted. Parameters: lineStartPos - the start position of the substring to be weighted. Parameters: endPos - the position of the last characterto be included in theweightening process. | public String | toString() Converts this object to a string. |
DefaultSizeCalculator | public DefaultSizeCalculator(FontDefinition font, boolean maxLineHeightUsed)(Code) | | Creates a new size calculator.
Parameters: font - the font Parameters: maxLineHeightUsed - a flag indicating whether the maximum bounding box is used. |
DefaultSizeCalculator | public DefaultSizeCalculator(Font font, boolean maxLineHeightUsed)(Code) | | Creates a new size calculator.
Parameters: font - the font. Parameters: maxLineHeightUsed - a flag indicating whether the maximum bounding box is used. |
getDefaultSizeCalculator | public static synchronized DefaultSizeCalculator getDefaultSizeCalculator(FontDefinition font, boolean maxLineHeightUsed)(Code) | | Creates a new size calculator.
Parameters: font - The font definition. Parameters: maxLineHeightUsed - a flag indicating whether the maximum bounding box is used. A default size calculator. |
getFrcDetector | public static BuggyFontRendererDetector getFrcDetector()(Code) | | Returns a singleon instance of the FontRenderContext bug detector.
the FontRenderContext-detector |
getLineHeight | public float getLineHeight()(Code) | | Returns the height of the current font. The font height specifies the distance
between 2 base lines.
the font height. |
getStringWidth | public float getStringWidth(String text, int lineStartPos, int endPos)(Code) | | Calculates the width of the specified String in the current Graphics context.
Parameters: text - the text to be weighted. Parameters: lineStartPos - the start position of the substring to be weighted. Parameters: endPos - the position of the last characterto be included in theweightening process. the width of the given string in 1/72" dpi. |
toString | public String toString()(Code) | | Converts this object to a string.
a string. |
|
|