Class ItemSlotArea.Builder
java.lang.Object
com.ultikits.ultitools.abstracts.gui.declarative.widgets.ItemSlotArea.Builder
- All Implemented Interfaces:
WidgetBuilder<ItemSlotArea>
- Enclosing class:
ItemSlotArea
A non-thread-safe range builder; defaults to all container indexes at slot zero, in VIEW mode.
- Since:
- 7.0.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final SlotContainerprivate intprivate intprivate @Nullable SlotKeyprivate BindingModeprivate int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull ItemSlotAreabuild()Builds the Widget instance.count(int count) firstIndex(int firstIndex) mode(BindingMode mode) startSlot(int startSlot)
-
Field Details
-
container
-
firstIndex
private int firstIndex -
count
private int count -
startSlot
private int startSlot -
mode
-
key
-
-
Constructor Details
-
Builder
Builder(SlotContainer container)
-
-
Method Details
-
firstIndex
- Parameters:
firstIndex- first visible index; negative indexes and indexes at/after a nonempty container's size are rejected by build, even for an empty area. An empty container accepts only zero.- Returns:
- this builder
-
count
- Parameters:
count- requested area size (zero is empty); its tail may exceed the container @return this builder
-
startSlot
- Parameters:
startSlot- first row-major grid index @return this builder
-
mode
- Parameters:
mode- edit/view mode; moving items requires explicit EDITABLE @return this builder
-
key
- Parameters:
key- reconciliation key @return this builder
-
key
- Parameters:
key- reconciliation key @return this builder
-
build
Description copied from interface:WidgetBuilderBuilds the Widget instance.- Specified by:
buildin interfaceWidgetBuilder<ItemSlotArea>- Returns:
- the immutable range description; nonexistent tail indexes generate no bindings
- Throws:
IllegalArgumentException- if firstIndex is invalid, count is negative, or the requested area is outside a six-row grid
-