Interface PaginationList

    • Method Detail

      • contents

        Iterable<Component> contents()
        Gets the contents of this pagination list.
        Returns:
        The contents of this pagination list
      • title

        Optional<Component> title()
        Gets the title text to be used in the title bar of this pagination.
        Returns:
        The title text
      • header

        Optional<Component> header()
        Gets the header to be displayed for this output on all pages after the title bar but before the contents, if available.

        Header and footer will use this Text's style and color for formatting.

        Returns:
        The header to be displayed
      • footer

        Optional<Component> footer()
        Gets the footer to be displayed for this output on all pages after the contents and page navigation bar, if available.
        Returns:
        The footer
      • padding

        Component padding()
        Gets the padding character to be used when centering headers and footers.
        Returns:
        The padding character
      • linesPerPage

        int linesPerPage()
        Gets the maximum amount of lines that will be sent per page.

        This defaults to the maximum amount of lines that can be displayed on a source's screen at one time if not specified.

        Returns:
        The maximum amount of lines that will be sent per page
      • sendTo

        default void sendTo​(Audience receiver)
        Sends the first page of the constructed pagination list to the specified message receiver.
        Parameters:
        receiver - The receiver to send the first page to
        See Also:
        to send a specific page
      • sendTo

        void sendTo​(Audience receiver,
                    int page)
        Send the specified page of the constructed pagination list to the specified message receiver.

        A page that is out of bounds will result in a friendly error message being sent to the receiver.

        Pages start at an index of 1.

        Parameters:
        receiver - The receiver to send the page to
        page - The page to send, starting at an index of 1
      • sendTo

        default void sendTo​(Iterable<Audience> receivers,
                            int page)
        Sends the specified page of the constructed pagination list all Audiences within an Iterable.
        Parameters:
        receivers - The message receivers to send the page to
        page - The page to send