Interface AuthorSelectionAndCaretModel

  • All Superinterfaces:
    AuthorSelectionModel

    @API(type=NOT_EXTENDABLE,
         src=PUBLIC)
    public interface AuthorSelectionAndCaretModel
    extends AuthorSelectionModel
    Interface to the author selection and caret model providing methods to query and modify the selection intervals and caret position.
    Since:
    15.1
    • Method Detail

      • getCaretOffset

        int getCaretOffset()
        Returns the offset of the caret in the document.
        Returns:
        The offset of the caret in the document.
      • moveTo

        void moveTo​(int offset)
        Moves the caret to the specified position.
        Parameters:
        offset - The new position of the caret.
      • moveTo

        void moveTo​(int offset,
                    boolean select)
        Moves the caret to the new offset, possibly changing the selection.
        Parameters:
        offset - new offset for the caret. The offset must be >= 1 and less than the document size; if not, it is silently ignored.
        select - if true, the current selection is extended to match the new caret offset.