TextLayout layout = measurer.nextLayout(textWidth);
bottomBoundary = topBoundary + lineHeight;
if ((clickY > topBoundary) && (clickY < bottomBoundary)) {
// Get the character position of the mouse click.
TextHitInfo currentHit = layout.hitTestChar((float)clickX, (float)clickY);
if (currentHit != null) {
this.currentText = (StringBuffer)buffers.elementAt(i);
cursorIndex += currentHit.getInsertionIndex();
return;
}
} else {
cursorIndex = measurer.getPosition();
}