Interface Tabulation
- All Superinterfaces:
Composable,ComposableLike,Configurable<Tabulation>
Tabulation is used to display pagination state.
See more in Flare docs: Tabulation
See more in Flare docs: Tabulation
-
Nested Class Summary
Nested classes/interfaces inherited from interface space.maxus.flare.ui.compose.Configurable
Configurable.Configurator<S> -
Method Summary
Modifier and TypeMethodDescriptionPagination<?>Returns bound paginationstatic @NotNull Tabulationof(Pagination<?> pagination) Constructs a new tabulationstatic @NotNull Tabulationof(Pagination<?> pagination, int idx) Constructs a new tabulationstatic @NotNull Tabulationof(Pagination<?> pagination, @Nullable org.apache.commons.lang3.concurrent.Computable<org.apache.commons.lang3.tuple.Pair<Integer, Frame>, org.bukkit.inventory.ItemStack> selected, @Nullable org.apache.commons.lang3.concurrent.Computable<org.apache.commons.lang3.tuple.Pair<Integer, Frame>, org.bukkit.inventory.ItemStack> unselected, int idx) Constructs a new tabulationReturns selected page frame stateReturns selected page index statestatic ItemStackBuilderselectedItemBuilder(int idx, Frame frame) Returns the selected item builderdefault voidswitchPage(int page) Switches current page to the given pagestatic ItemStackBuilderunselectedItemBuilder(int idx, Frame frame) Returns the unselected item builderMethods 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
-
unselectedItemBuilder
Returns the unselected item builder- Parameters:
idx- The page indexframe- The page frame- Returns:
- Unselected item builder
-
selectedItemBuilder
Returns the selected item builder- Parameters:
idx- The page indexframe- The page frame- Returns:
- Selected item builder
-
of
Constructs a new tabulation- Parameters:
pagination- The pagination to use- Returns:
- Constructed tabulation
-
of
Constructs a new tabulation- Parameters:
pagination- The pagination to useidx- Currently selected page index- Returns:
- Constructed tabulation
-
of
@NotNull static @NotNull Tabulation of(Pagination<?> pagination, @Nullable @Nullable org.apache.commons.lang3.concurrent.Computable<org.apache.commons.lang3.tuple.Pair<Integer, Frame>, org.bukkit.inventory.ItemStack> selected, @Nullable @Nullable org.apache.commons.lang3.concurrent.Computable<org.apache.commons.lang3.tuple.Pair<Integer, Frame>, org.bukkit.inventory.ItemStack> unselected, int idx) Constructs a new tabulation- Parameters:
pagination- The pagination to useselected- Builder for selected page buttonunselected- Builder for unselected page buttonidx- Currently selected page index- Returns:
- Constructed tabulation
-
getPagination
Pagination<?> getPagination()Returns bound pagination- Returns:
- Bound pagination
-
selectedIndex
ReactiveState<Integer> selectedIndex()Returns selected page index state- Returns:
- Selected page index state
-
selectedFrame
ReactiveState<Frame> selectedFrame()Returns selected page frame state- Returns:
- Selected page frame state
-
switchPage
default void switchPage(int page) Switches current page to the given page- Parameters:
page- Page index to switch to
-