public Point getLineTextPositionsAtLineIndex(int lineIndex) {
List<ATELine> lines = getLines();
if(lineIndex == -1 || lines == null)
return null;
ATELine startLine = lines.get(lineIndex);
int start = startLine.position;
if(lineIndex+1 >= lines.size()) {
return new Point(start, getTextPane().getDocument().getLength()-1);
} else {
ATELine endLine = lines.get(lineIndex+1);
int end = endLine.position;
return new Point(start, end-1);
}
}