Class TextButton
java.lang.Object
com.ultikits.ultitools.abstracts.gui.declarative.core.Widget
com.ultikits.ultitools.abstracts.gui.declarative.core.RenderObjectWidget
com.ultikits.ultitools.abstracts.gui.declarative.widgets.TextButton
A coloured glass-pane button with deferred text and an optional grid action. @since 6.2.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA reusable builder; text and lore remain immutable after building. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final @Nullable GridActionprivate final Stringprivate final intprivate final Text -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TextButton.Builderbuilder()@NotNull RenderObjectElementCreates the Element corresponding to this Widget.@Nullable GridActiongetColor()getLore()intgetSlot()getText()
-
Field Details
-
text
-
color
-
slot
private final int slot -
lore
-
clickHandler
-
-
Constructor Details
-
TextButton
-
-
Method Details
-
builder
- Returns:
- a new builder
-
getText
- Returns:
- the deferred button label
-
getColor
- Returns:
- the glass colour name
-
getSlot
public int getSlot()- Returns:
- the zero-based grid slot
-
getLore
-
getClickHandler
- Returns:
- the optional grid action
-
createElement
Description copied from class:WidgetCreates the Element corresponding to this Widget.This is a framework-internal method; subclasses should return the Element implementation appropriate to the Widget type.
- StatelessWidget returns a
StatelessElement - StatefulWidget returns a
StatefulElement - RenderObjectWidget returns a
RenderObjectElement
- Specified by:
createElementin classRenderObjectWidget- Returns:
- the corresponding Element instance
- StatelessWidget returns a
-