Interface SelectionCapable


  • @ParametersAreNonnullByDefault
    public interface SelectionCapable
    Support for selection capability.
    • Method Detail

      • getSelection

        @Nonnull
        SelectionRange getSelection()
        Returns current selection.
        Returns:
        selection range or empty selection range
      • setSelection

        void setSelection​(SelectionRange selection)
        Sets current selection.
        Parameters:
        selection - selection range or empty selection range
      • setSelection

        void setSelection​(long start,
                          long end)
        Sets current selection range from start to end including the start and not including the end position.
        Parameters:
        start - selection start position
        end - selection end position without actual end position itself
      • clearSelection

        void clearSelection()
        Clears selection range - sets empty selection.
      • hasSelection

        boolean hasSelection()
        Returns true if there is active selection for clipboard handling.
        Returns:
        true if non-empty selection is active
      • getSelectionHandler

        @Nonnull
        CodeAreaSelection getSelectionHandler()
        Returns selection handler.
        Returns:
        code area selection handler
      • addSelectionChangedListener

        void addSelectionChangedListener​(SelectionChangedListener selectionChangedListener)
        Adds selection change listener.
        Parameters:
        selectionChangedListener - selection change listener
      • removeSelectionChangedListener

        void removeSelectionChangedListener​(SelectionChangedListener selectionChangedListener)
        Removes selection change listener.
        Parameters:
        selectionChangedListener - selection change listener