Community
Participate
Working Groups
int textWidth = getTextExtents(subString, f, fontHeight).width;
Point p = getTextLocation();
int y = p.y;
int x = p.x;
int x = p.x, xRef = x;
final int wrapAlignment = getTextWrapAlignment();
boolean isUnderlined = isTextUnderlined();
boolean isStrikedThrough = isTextStrikedThrough();
while (tokenizer.hasMoreTokens()) {
String token = tokenizer.nextToken();
int tokenWidth = getTextExtents(token, f, fontHeight).width;
x = xRef;
switch (wrapAlignment) {
case CENTER:
x += (textWidth - tokenWidth) / 2;