Making line fitting maximum length by letting the class implement the listener interface instead as suggested in review.
Renaming local variable as suggested in review.
Adding JavaDoc.
Adding @Override annotations to implemented methods.
Fixing opening curly braces on its own lines.