public interface CursorListener
extends java.util.EventListener
CursorListener
interface should be implemented by
clients interested in receiving notifications of cursor movement
in the code editor. These notifications will be generated when
the cursor is moved through an explicit keyboard or mouse navigation
as well as when it is moved because of a buffer modiciation. It is the responsibility of clients to retrieve the cursor position from the Code Editor when this notification occurs.
Note: Cursor notifications are very, very frequent since they occur on every document change and every navigation. Clients should not do much processing or computing during the notification. Otherwise, code editor performance may be impacted (and you may get smacked as a result.) Consider yourself warned.
Modifier and Type | Method and Description |
---|---|
void |
cursorUpdate(CodeEditor codeEditor)
Provides notification that the cursor was moved in the given
CodeEditor, either through an explicit keyboard or mouse
navigation, or through a buffer modification.
|
void cursorUpdate(CodeEditor codeEditor)
codeEditor
- the code editor that generated the eventCodeEditor.getCaretPosition()
,
CodeEditor.getSelectionStart()
,
CodeEditor.getSelectionEnd()
,
CodeEditor.hasSelectedText()