Interface Selection


  • public interface Selection
    This interface provides helpful information and functionality relating to a user's selection within the user interface.
    • Method Detail

      • selection

        static Selection selection​(ByteArray selectionContents)
        A helper method to create an instance of Selection without positional data.
        Parameters:
        selectionContents - The contents of the selection.
        Returns:
        A new instance of Selection
      • selection

        static Selection selection​(int startIndexInclusive,
                                   int endIndexExclusive)
        A helper method to create an instance of Selection without content data.
        Parameters:
        startIndexInclusive - The start position of the selection range.
        endIndexExclusive - The end position of the selection range.
        Returns:
        A new instance of Selection
      • selection

        static Selection selection​(ByteArray selectionContents,
                                   int startIndexInclusive,
                                   int endIndexExclusive)
        A helper method to create an instance of Selection.
        Parameters:
        selectionContents - The contents of the selection.
        startIndexInclusive - The start position of the selection range.
        endIndexExclusive - The end position of the selection range.
        Returns:
        A new instance of Selection
      • contents

        ByteArray contents()
        Returns:
        The contents that are derived from within the user's selection range.
      • offsets

        Range offsets()
        Returns:
        The positional data of where the user has selected.