int y = 1; caretOffset = lineOffset + layout.getOffset(x, y, null);
caretOffset = lineOffset + layout.getOffset(x, 0, null);
int doLineDown() {	if (isSingleLine()) {		return 0;	}	int caretLine = getCaretLine();	boolean paragraphDown = true;	if (wordWrap) {		String line = content.getLine(caretLine);		int lineOffset = content.getOffsetAtLine(caretLine);		TextLayout layout = renderer.getTextLayout(line, lineOffset);		if (layout.getLineCount() > 0) {			Point pos = getCaret().getLocation();			pos.x += horizontalScrollOffset - rightMargin;			pos.y -= getLinePixel(caretLine) + topMargin;			int offset = layout.getOffset(pos, null);			int lineInParagraph = layout.getLineIndex(offset);			if (lineInParagraph < layout.getLineCount() - 1) {				paragraphDown = false;				pos.y += layout.getLineBounds(lineInParagraph).height;				caretOffset = lineOffset + layout.getOffset(pos, null);			}		}		renderer.disposeTextLayout(layout);	}	if (paragraphDown && caretLine < content.getLineCount() - 1) {		caretLine++;		String line = content.getLine(caretLine);		int lineOffset = content.getOffsetAtLine(caretLine);		TextLayout layout = renderer.getTextLayout(line, lineOffset);		int x = columnX + horizontalScrollOffset - leftMargin;		int y = 1;		caretOffset = lineOffset + layout.getOffset(x, y, null);		renderer.disposeTextLayout(layout);	}	return caretLine;}