Interface PaginationDisplay
- All Superinterfaces:
Composable,ComposableLike,Configurable<PaginationDisplay>
Pagination display is used to display pagination state.
See more in Flare docs: PaginationDisplay
See more in Flare docs: PaginationDisplay
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA pagination display builderNested classes/interfaces inherited from interface space.maxus.flare.ui.compose.Configurable
Configurable.Configurator<S> -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull ItemStackBuilderarrowBackwardButton(boolean disabled) Returns the item builder for arrow backward buttonstatic @NotNull ItemStackBuilderarrowForwardButton(boolean disabled) Returns the item builder for arrow forward buttonstatic @NotNull PaginationDisplay.Builderbuilder(Pagination<?> pagination) Creates a new pagination builderPagination<?>Gets the current paginationstatic @NotNull PaginationDisplayof(Pagination<?> pagination) Creates a new pagination displaystatic @NotNull PaginationDisplayof(Pagination<?> pagination, int idx) Creates a new pagination displaystatic @NotNull ItemStackBuilderpageNumber(Frame frame, int page, boolean selected, @Nullable org.bukkit.entity.Player player) Returns the item builder for page select buttonReturns the reactive state of the selected page frameReturns the reactive state of the selected page indexdefault voidswitchPage(int page) Switches to another page indexMethods inherited from interface space.maxus.flare.ui.Composable
asComposable, bind, click, context, contextOrNull, destroy, drag, injectRoot, inside, into, leftClick, markDirty, renderAt, restore, rightClick, root, shiftFrom, shiftInto, viewerMethods inherited from interface space.maxus.flare.ui.compose.Configurable
configure, configureTyped
-
Method Details
-
arrowForwardButton
Returns the item builder for arrow forward button- Parameters:
disabled- Whether the button is disabled- Returns:
- Item builder
-
arrowBackwardButton
Returns the item builder for arrow backward button- Parameters:
disabled- Whether the button is disabled- Returns:
- Item builder
-
pageNumber
@NotNull static @NotNull ItemStackBuilder pageNumber(Frame frame, int page, boolean selected, @Nullable @Nullable org.bukkit.entity.Player player) Returns the item builder for page select button- Parameters:
frame- The page framepage- The index of the pageselected- Whether the button is selectedplayer- The player viewer- Returns:
- Item builder
-
of
Creates a new pagination display- Parameters:
pagination- The pagination used- Returns:
- New pagination display
-
of
Creates a new pagination display- Parameters:
pagination- The pagination usedidx- Currently selected page index- Returns:
- New pagination display
-
builder
Creates a new pagination builder- Parameters:
pagination- The pagination to use- Returns:
- A new pagination builder
-
getPagination
Pagination<?> getPagination()Gets the current pagination- Returns:
- The currently used pagination
-
selectedIndex
ReactiveState<Integer> selectedIndex()Returns the reactive state of the selected page index- Returns:
- The reactive state of the selected page index
-
selectedFrame
ReactiveState<Frame> selectedFrame()Returns the reactive state of the selected page frame- Returns:
- The reactive state of the selected page frame
-
switchPage
default void switchPage(int page) Switches to another page index- Parameters:
page- Page index to switch to
-