|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jfree.text.TextUtilities
Some utility methods for working with text.
Field Summary | |
protected static LogContext |
logger
Access to logging facilities. |
Constructor Summary | |
TextUtilities()
|
Method Summary | |
static TextBlock |
createTextBlock(java.lang.String text,
java.awt.Font font,
java.awt.Paint paint,
float maxWidth,
int maxLines,
TextMeasurer measurer)
Creates a new text block from the given string. |
static TextBlock |
createTextBlock(java.lang.String text,
java.awt.Font font,
java.awt.Paint paint,
float maxWidth,
TextMeasurer measurer)
Creates a new text block from the given string. |
static java.awt.geom.Rectangle2D |
getTextBounds(java.lang.String text,
java.awt.Graphics2D g2,
java.awt.FontMetrics fm)
Returns the bounds for the specified text. |
static boolean |
getUseFontMetricsGetStringBounds()
Returns the flag that controls whether the FontMetrics.getStringBounds() method is used or not. |
static void |
setUseFontMetricsGetStringBounds(boolean use)
Sets the flag that controls whether the FontMetrics.getStringBounds() method is used or not. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final LogContext logger
Constructor Detail |
public TextUtilities()
Method Detail |
public static TextBlock createTextBlock(java.lang.String text, java.awt.Font font, java.awt.Paint paint, float maxWidth, TextMeasurer measurer)
text
- the text.font
- the font.paint
- the paint.maxWidth
- the maximum width for each line.measurer
- the text measurer.
public static TextBlock createTextBlock(java.lang.String text, java.awt.Font font, java.awt.Paint paint, float maxWidth, int maxLines, TextMeasurer measurer)
text
- the text.font
- the font.paint
- the paint.maxWidth
- the maximum width for each line.maxLines
- the maximum number of lines.measurer
- the text measurer.
public static java.awt.geom.Rectangle2D getTextBounds(java.lang.String text, java.awt.Graphics2D g2, java.awt.FontMetrics fm)
text
- the text (null
permitted).g2
- the graphics context (not null
).fm
- the font metrics (not null
).
null
).public static boolean getUseFontMetricsGetStringBounds()
public static void setUseFontMetricsGetStringBounds(boolean use)
use
- the flag.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |