Added setCaretPeriod.