Interface TranscriptEditorCaretHook

All Known Implementing Classes:
TierChangeCaretHook, TranscriptEditorCaretHookAdapter

public interface TranscriptEditorCaretHook
Actions which may be performed before the caret is moved and may prevent the caret from moving.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    afterMoveCaret(int dot, int moveTo)
    Called when the caret is moved to a new location.
    void
    afterSetDot(int oldDot, int newDot)
    Called after the caret is moved.
    boolean
    beforeMoveCaret(int dot, int moveTo)
    Called when the caret is moved to a new location.
    boolean
    beforeSetDot(int oldDot, int newDot)
    Called before the caret is moved.
    void
    caretFrozen(boolean frozen)
    Called when the caret is frozen or unfrozen.
  • Method Details

    • beforeSetDot

      boolean beforeSetDot(int oldDot, int newDot)
      Called before the caret is moved.
      Parameters:
      oldDot - the old caret position
      newDot - the new caret position to move to
      Returns:
      true if the caret should be moved, false otherwise
    • afterSetDot

      void afterSetDot(int oldDot, int newDot)
      Called after the caret is moved.
      Parameters:
      oldDot - the old caret position
      newDot - the new caret position
      editor - the transcript editor
    • caretFrozen

      void caretFrozen(boolean frozen)
      Called when the caret is frozen or unfrozen.
      Parameters:
      frozen - true if the caret is frozen, false if unfrozen
    • beforeMoveCaret

      boolean beforeMoveCaret(int dot, int moveTo)
      Called when the caret is moved to a new location.
      Parameters:
      dot - the previous location of the caret
      moveTo - the move location of the caret
      Returns:
      true if the caret should be moved, false otherwise
    • afterMoveCaret

      void afterMoveCaret(int dot, int moveTo)
      Called when the caret is moved to a new location.
      Parameters:
      dot - the previous location of the caret
      moveTo - the move location of the caret