Class ItemDisplay.Builder
java.lang.Object
com.ultikits.ultitools.abstracts.gui.declarative.widgets.ItemDisplay.Builder
- All Implemented Interfaces:
WidgetBuilder<ItemDisplay>
- Enclosing class:
ItemDisplay
A reusable builder for an item display.
- Since:
- 6.2.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate @Nullable GridActionprivate final ItemSpecprivate @Nullable SlotKeyprivate int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull ItemDisplaybuild()Builds the Widget instance.onClick(@Nullable GridAction handler) slot(int slot)
-
Field Details
-
icon
-
slot
private int slot -
clickHandler
-
key
-
-
Constructor Details
-
Builder
Builder(ItemSpec icon)
-
-
Method Details
-
slot
- Parameters:
slot- the grid index @return this builder
-
onClick
- Parameters:
handler- the action, or null to remove it @return this builder
-
onClick
- Parameters:
action- a parameterless action, or null to remove it @return this builder
-
key
- Parameters:
key- the reconciliation key @return this builder
-
key
- Parameters:
key- the reconciliation key @return this builder
-
build
Description copied from interface:WidgetBuilderBuilds the Widget instance.- Specified by:
buildin interfaceWidgetBuilder<ItemDisplay>- Returns:
- the Widget instance
-