Class TextButton.Builder
java.lang.Object
com.ultikits.ultitools.abstracts.gui.declarative.widgets.TextButton.Builder
- All Implemented Interfaces:
WidgetBuilder<TextButton>
- Enclosing class:
TextButton
A reusable builder; text and lore remain immutable after building.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull TextButtonbuild()Builds the Widget instance.onClick(@Nullable GridAction handler) slot(int slot)
-
Field Details
-
text
-
color
-
slot
private int slot -
lore
-
clickHandler
-
key
-
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
text
- Parameters:
text- the deferred label @return this builder
-
color
- Parameters:
color- a colour name; unknown names render plain glass @return this builder
-
slot
- Parameters:
slot- the grid index @return this builder
-
lore
- Parameters:
lore- deferred lore lines @return this builder
-
onClick
- Parameters:
handler- the grid 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<TextButton>- Returns:
- the Widget instance
-