Package space.maxus.flare.ui.compose
Interface ProgressBar
- All Superinterfaces:
Composable,ComposableLike,Configurable<ProgressBar>
A progress bar is a dynamic component that renders progress inside itself.
See more in Flare docs: Progress Bar
See more in Flare docs: Progress Bar
-
Nested Class Summary
Nested classes/interfaces inherited from interface space.maxus.flare.ui.compose.Configurable
Configurable.Configurator<S> -
Method Summary
Modifier and TypeMethodDescriptionstatic ItemStackBuilderemptyBuilder(org.bukkit.Material material, float progress, boolean dotted) Returns an item builder for an empty progress bar partstatic @NotNull ItemProvideremptyProvider(ReactiveState<Float> state, org.bukkit.Material material, boolean dotted) Returns an item builder for an empty progress bar partstatic ItemStackBuilderfullBuilder(org.bukkit.Material material, float progress, boolean dotted) Returns an item builder for a full progress bar partstatic @NotNull ItemProviderfullProvider(ReactiveState<Float> state, org.bukkit.Material material, boolean dotted) Returns an item builder for a full progress bar partdefault @org.jetbrains.annotations.Range(from=0L, to=1L) floatGets current bar progressstatic @NotNull ProgressBarof(ItemProvider full, ItemProvider empty) Constructs a progress bar with full and empty item providersstatic @NotNull ProgressBarof(ItemProvider full, ItemProvider empty, @org.jetbrains.annotations.Range(from=0L, to=1L) float progress) Constructs a progress bar with full and empty item providers and base progressReturns the current progress statedefault voidsetProgress(@org.jetbrains.annotations.Range(from=0L, to=1L) float newProgress) Sets the bar progressMethods 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
-
fullBuilder
Returns an item builder for a full progress bar part- Parameters:
material- Base materialprogress- Bar progressdotted- Whether the display should be dotted.- Returns:
- An item builder for a full progress bar part
- See Also:
-
emptyBuilder
Returns an item builder for an empty progress bar part- Parameters:
material- Base materialprogress- Bar progressdotted- Whether the display should be dotted.- Returns:
- An item builder for an empty progress bar part
- See Also:
-
fullProvider
@NotNull static @NotNull ItemProvider fullProvider(ReactiveState<Float> state, org.bukkit.Material material, boolean dotted) Returns an item builder for a full progress bar part- Parameters:
material- Base materialstate- The bar progress reactive statedotted- Whether the display should be dotted.- Returns:
- An item builder for a full progress bar part
- See Also:
-
emptyProvider
@NotNull static @NotNull ItemProvider emptyProvider(ReactiveState<Float> state, org.bukkit.Material material, boolean dotted) Returns an item builder for an empty progress bar part- Parameters:
material- Base materialstate- The bar progress reactive statedotted- Whether the display should be dotted.- Returns:
- An item builder for an empty progress bar part
- See Also:
-
of
Constructs a progress bar with full and empty item providers- Parameters:
full- Item provider for filled partempty- Item provider for empty part- Returns:
- A progress bar with full and empty item providers
-
of
@NotNull static @NotNull ProgressBar of(ItemProvider full, ItemProvider empty, @org.jetbrains.annotations.Range(from=0L, to=1L) float progress) Constructs a progress bar with full and empty item providers and base progress- Parameters:
full- Item provider for filled partempty- Item provider for empty partprogress- Starting progress of the bar.- Returns:
- A progress bar with full and empty item providers
-
progressState
ReactiveState<Float> progressState()Returns the current progress state- Returns:
- Current progress state.
-
getProgress
default @org.jetbrains.annotations.Range(from=0L, to=1L) float getProgress()Gets current bar progress- Returns:
- Current bar progress
-
setProgress
default void setProgress(@org.jetbrains.annotations.Range(from=0L, to=1L) float newProgress) Sets the bar progress- Parameters:
newProgress- New progress
-