protected float getMaxLineWidth(){
float currentLineWidth = 2 * this.getInnerPaddingLeft() + caretWidth;
float maxWidth = currentLineWidth;
for (int i = 0; i < this.characterList.size(); i++) {
IFontCharacter character = this.characterList.get(i);
if (character.getUnicode().equals("\n")){
if (currentLineWidth > maxWidth){
maxWidth = currentLineWidth;
}
currentLineWidth = 2 * this.getInnerPaddingLeft() + caretWidth;
}else{
currentLineWidth += character.getHorizontalDist();
if (currentLineWidth > maxWidth){
maxWidth = currentLineWidth;
}
}
}