Package xyz.xenondevs.invui.gui
Class AbstractScrollGui.AbstractBuilder<C>
java.lang.Object
xyz.xenondevs.invui.gui.AbstractGui.AbstractBuilder<ScrollGui<C>,ScrollGui.Builder<C>>
xyz.xenondevs.invui.gui.AbstractScrollGui.AbstractBuilder<C>
- Type Parameters:
C
- The content type.
- All Implemented Interfaces:
Cloneable
,Gui.Builder<ScrollGui<C>,
,ScrollGui.Builder<C>> ScrollGui.Builder<C>
- Enclosing class:
AbstractScrollGui<C>
public abstract static class AbstractScrollGui.AbstractBuilder<C>
extends AbstractGui.AbstractBuilder<ScrollGui<C>,ScrollGui.Builder<C>>
implements ScrollGui.Builder<C>
Builder for
AbstractScrollGuis
.
This class should only be used directly if you're creating a custom AbstractScrollGui.AbstractBuilder
implementation.
Otherwise, use the static builder functions from ScrollGui
, such as
ScrollGui.items()
, ScrollGui.guis()
or ScrollGui.inventories()
to obtain a builder instance.
-
Nested Class Summary
Nested classes/interfaces inherited from interface xyz.xenondevs.invui.gui.Gui.Builder
Gui.Builder.Normal
-
Field Summary
Fields inherited from class xyz.xenondevs.invui.gui.AbstractGui.AbstractBuilder
background, frozen, ignoreObscuredInventorySlots, modifiers, structure
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription@NotNull ScrollGui.Builder
<C> addContent
(C content) Adds content to theScrollGui
.@NotNull ScrollGui.Builder
<C> addScrollHandler
(@NotNull BiConsumer<Integer, Integer> handler) Adds a scroll handler to theScrollGui
.protected void
applyModifiers
(@NotNull ScrollGui<C> gui) Applies theAbstractGui.AbstractBuilder.modifiers
to the givenAbstractGui
.clone()
Clones the Gui Builder.@NotNull ScrollGui.Builder
<C> setContent
(@NotNull List<@NotNull C> content) Sets the content of theScrollGui
for all lines.@NotNull ScrollGui.Builder
<C> setScrollHandlers
(@NotNull List<@NotNull BiConsumer<Integer, Integer>> handlers) Adds content to theScrollGui
.Methods inherited from class xyz.xenondevs.invui.gui.AbstractGui.AbstractBuilder
addIngredient, addIngredient, addIngredient, addIngredient, addIngredient, addIngredient, addIngredient, addIngredient, addIngredientElementSupplier, addModifier, setBackground, setBackground, setFrozen, setIgnoreObscuredInventorySlots, setModifiers, setStructure, setStructure, setStructure
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface xyz.xenondevs.invui.gui.Gui.Builder
addIngredient, addIngredient, addIngredient, addIngredient, addIngredient, addIngredient, addIngredient, addIngredient, addIngredientElementSupplier, addModifier, build, setBackground, setBackground, setFrozen, setIgnoreObscuredInventorySlots, setModifiers, setStructure, setStructure, setStructure
-
Field Details
-
-
scrollHandlers
-
-
Constructor Details
-
AbstractBuilder
public AbstractBuilder()
-
-
Method Details
-
setContent
Description copied from interface:ScrollGui.Builder
Sets the content of theScrollGui
for all lines.- Specified by:
setContent
in interfaceScrollGui.Builder<C>
- Parameters:
content
- The content to set.- Returns:
- This
Gui Builder
.
-
addContent
Description copied from interface:ScrollGui.Builder
Adds content to theScrollGui
.- Specified by:
addContent
in interfaceScrollGui.Builder<C>
- Parameters:
content
- The content to add.- Returns:
- This
Gui Builder
.
-
setScrollHandlers
public @NotNull ScrollGui.Builder<C> setScrollHandlers(@NotNull @NotNull List<@NotNull BiConsumer<Integer, Integer>> handlers) Description copied from interface:ScrollGui.Builder
Adds content to theScrollGui
.- Specified by:
setScrollHandlers
in interfaceScrollGui.Builder<C>
- Parameters:
handlers
- The content to add.- Returns:
- This
Gui Builder
.
-
addScrollHandler
public @NotNull ScrollGui.Builder<C> addScrollHandler(@NotNull @NotNull BiConsumer<Integer, Integer> handler) Description copied from interface:ScrollGui.Builder
Adds a scroll handler to theScrollGui
.- Specified by:
addScrollHandler
in interfaceScrollGui.Builder<C>
- Parameters:
handler
- The scroll handler to add.- Returns:
- This
Gui Builder
.
-
applyModifiers
Description copied from class:AbstractGui.AbstractBuilder
Applies theAbstractGui.AbstractBuilder.modifiers
to the givenAbstractGui
.- Overrides:
applyModifiers
in classAbstractGui.AbstractBuilder<ScrollGui<C>,
ScrollGui.Builder<C>> - Parameters:
gui
- TheAbstractGui
to apply the modifiers to
-
clone
Description copied from interface:Gui.Builder
Clones the Gui Builder.- Specified by:
clone
in interfaceGui.Builder<ScrollGui<C>,
ScrollGui.Builder<C>> - Overrides:
clone
in classAbstractGui.AbstractBuilder<ScrollGui<C>,
ScrollGui.Builder<C>> - Returns:
- The cloned Gui Builder
-