Interface AuthorCaretListener


  • @API(type=EXTENDABLE,
         src=PUBLIC)
    public interface AuthorCaretListener
    Listener for changes in the caret position of the Author editor page. Adding a caret listener starting from an AuthorAccess :
     authorAccess.getEditorAccess().addAuthorCaretListener(caretListener);
     
    Adding a caret listener starting from a PluginWorkspace :
     WSEditor editorAccess = pluginWorkspaceAccess.getCurrentEditorAccess(StandalonePluginWorkspace.MAIN_EDITING_AREA);
     if (editorAccess != null && EditorPageConstants.PAGE_AUTHOR.equals(editorAccess.getCurrentPageID())) {
         WSAuthorEditorPage authorPageAccess = (WSAuthorEditorPage) editorAccess.getCurrentPage();
         authorPageAccess.addAuthorCaretListener(caretListener);
      }
     
    See Also:
    WSAuthorEditorPageBase, AuthorAccess, PluginWorkspace
    • Method Detail

      • caretMoved

        void caretMoved​(AuthorCaretEvent caretEvent)
        Called when the caret position is updated.
        Parameters:
        caretEvent - The AuthorCaretEvent containing information about the offset and the author node holding the offset.