void () { if (myEditor != null) { CaretCursor activeCursor = myEditor.myCaretCursor; long time = System.currentTimeMillis(); time -= activeCursor.myStartTime; if (time > mySleepTime) { boolean toRepaint = true; if (myIsBlinkCaret) { activeCursor.myIsShown = !activeCursor.myIsShown; } else { toRepaint = !activeCursor.myIsShown; activeCursor.myIsShown = true; } if (toRepaint) { SwingUtilities.invokeLater(myRepaintRunnable); } } } }