org.jfree.text
public class G2TextMeasurer extends Object implements TextMeasurer
Constructor Summary | |
---|---|
G2TextMeasurer(Graphics2D g2)
Creates a new text measurer.
|
Method Summary | |
---|---|
float | getStringWidth(String text, int start, int end)
Returns the string width.
|
Parameters: g2 the graphics device.
Parameters: text the text. start the index of the first character to measure. end the index of the last character to measure.
Returns: The string width.