This method is called automatically before the document
insertion occurs and can be used to revoke the insertion before it occurs
by throwing the BadLocationException.
This method is called automatically before the document
removal occurs and can be used to revoke the removal before it occurs
by throwing the BadLocationException.