org.jfree.text
Class TextUtilities
java.lang.Object
org.jfree.text.TextUtilities
- public class TextUtilities
- extends java.lang.Object
Some utility methods for working with text.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TextUtilities
public TextUtilities()
createTextBlock
public static TextBlock createTextBlock(java.lang.String text,
java.awt.Font font,
float maxWidth,
TextMeasurer measurer)
- Creates a new text block from the given string.
- Parameters:
text
- the text.font
- the font.maxWidth
- the maximum width for each line.measurer
- the text measurer.
- Returns:
- A text block.
createTextBlock
public static TextBlock createTextBlock(java.lang.String text,
java.awt.Font font,
float maxWidth,
int maxLines,
TextMeasurer measurer)
- Creates a new text block from the given string.
- Parameters:
text
- the text.font
- the font.maxWidth
- the maximum width for each line.maxLines
- the maximum number of lines.measurer
- the text measurer.
- Returns:
- A text block.