Interface PaginationList.Builder

    • Method Detail

      • contents

        PaginationList.Builder contents​(Iterable<Component> contents)
        Sets the contents of this output as an iterable.

        If this Iterable is a List, bidirectional navigation is supported. Otherwise, only going to the next page will be supported.

        Parameters:
        contents - The contents to output
        Returns:
        This builder
      • contents

        PaginationList.Builder contents​(Component... contents)
        Sets the contents of this output to be the given array of contents.
        Parameters:
        contents - The contents to output
        Returns:
        This builder
      • title

        PaginationList.Builder title​(@Nullable Component title)
        Sets the title text to be used in the title bar of this pagination.

        This should be less than one line long.

        Parameters:
        title - The title to use
        Returns:
        This builder
      • header

        PaginationList.Builder header​(@Nullable Component header)
        Sets the header to be displayed for this output on all pages after the title bar but before the contents.

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

        If the header is not specified, or passed in as null, it will be omitted when displaying the list.

        Parameters:
        header - The header to set
        Returns:
        This builder
      • footer

        PaginationList.Builder footer​(@Nullable Component footer)
        Sets the footer to be displayed for this output on all pages after the contents and page navigation bar.

        If the footer is not specified, or passed in as null, it will be omitted when displaying the list.

        Parameters:
        footer - The footer to set
        Returns:
        This builder
      • padding

        PaginationList.Builder padding​(Component padding)
        Sets the padding character to be used when centering headers and footers.
        Parameters:
        padding - The padding to use
        Returns:
        This builder
      • linesPerPage

        PaginationList.Builder linesPerPage​(int linesPerPage)
        Sets the maximum number of lines that can be displayed 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.

        Parameters:
        linesPerPage - The maximum number of lines to display per page
        Returns:
        This builder
      • sendTo

        default PaginationList sendTo​(Audience receiver)
        Sends the constructed pagination list to the given receiver.
        Parameters:
        receiver - The receiver to send the list to
        Returns:
        The constructed pagination list
      • sendTo

        default PaginationList sendTo​(Iterable<Audience> receivers)
        Sends the constructed pagination list to all Audiences within an Iterable.
        Parameters:
        receivers - The message receivers to send the list to
        Returns:
        The constructed pagination list