Interface PaginationList
public interface PaginationList
Represents an immutable iterable of
Component
s, which can be sent to
a Audience
.
An instance of this class may be obtained using PaginationList.Builder
.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Builds a paginated output for an iterable ofComponent
s. -
Method Summary
Modifier and TypeMethodDescriptionstatic PaginationList.Builder
builder()
Creates a newPaginationList.Builder
to build a pagination list.contents()
Gets the contents of this pagination list.footer()
Gets the footer to be displayed for this output on all pages after the contents and page navigation bar, if available.header()
Gets the header to be displayed for this output on all pages after the title bar but before the contents, if available.int
Gets the maximum amount of lines that will be sent per page.padding()
Gets the padding character to be used when centering headers and footers.default void
default void
default void
Sends the first page of the constructed pagination list to the specified message receiver.void
Send the specified page of the constructed pagination list to the specified message receiver.title()
Gets the title text to be used in the title bar of this pagination.
-
Method Details
-
builder
Creates a newPaginationList.Builder
to build a pagination list.- Returns:
- The new builder
-
contents
Gets the contents of this pagination list.- Returns:
- The contents of this pagination list
-
title
Gets the title text to be used in the title bar of this pagination.- Returns:
- The title text
-
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
-
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
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:
-
sendTo
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 topage
- The page to send, starting at an index of 1
-
sendTo
- Parameters:
receivers
- The message receivers to send the first page to- See Also:
-
sendTo
- Parameters:
receivers
- The message receivers to send the page topage
- The page to send
-