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
FieldsFields inherited from class xyz.xenondevs.invui.gui.AbstractGui.AbstractBuilder
background, frozen, ignoreObscuredInventorySlots, modifiers, structure -
Constructor Summary
Constructors -
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 voidapplyModifiers(@NotNull ScrollGui<C> gui) Applies theAbstractGui.AbstractBuilder.modifiersto the givenAbstractGui.clone()Clones the Gui Builder.@NotNull ScrollGui.Builder<C> setContent(@NotNull List<@NotNull C> content) Sets the content of theScrollGuifor 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, setStructureMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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.BuilderSets the content of theScrollGuifor all lines.- Specified by:
setContentin interfaceScrollGui.Builder<C>- Parameters:
content- The content to set.- Returns:
- This
Gui Builder.
-
addContent
Description copied from interface:ScrollGui.BuilderAdds content to theScrollGui.- Specified by:
addContentin 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.BuilderAdds content to theScrollGui.- Specified by:
setScrollHandlersin 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.BuilderAdds a scroll handler to theScrollGui.- Specified by:
addScrollHandlerin interfaceScrollGui.Builder<C>- Parameters:
handler- The scroll handler to add.- Returns:
- This
Gui Builder.
-
applyModifiers
Description copied from class:AbstractGui.AbstractBuilderApplies theAbstractGui.AbstractBuilder.modifiersto the givenAbstractGui.- Overrides:
applyModifiersin classAbstractGui.AbstractBuilder<ScrollGui<C>,ScrollGui.Builder<C>> - Parameters:
gui- TheAbstractGuito apply the modifiers to
-
clone
Description copied from interface:Gui.BuilderClones the Gui Builder.- Specified by:
clonein interfaceGui.Builder<ScrollGui<C>,ScrollGui.Builder<C>> - Overrides:
clonein classAbstractGui.AbstractBuilder<ScrollGui<C>,ScrollGui.Builder<C>> - Returns:
- The cloned Gui Builder
-