Interface ActionButton
Represents an action button in a dialog, which can be used to trigger actions or navigate within the dialog.
Action buttons can have labels, tooltips, and associated actions.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
A builder for creating ActionButton instances. -
Method Summary
Modifier and TypeMethodDescriptionaction()
Returns the action associated with this button, or null if no action is associated.static ActionButton.Builder
Creates a new action button builder with the specified label.static ActionButton
Creates a new action button with the specified label, tooltip, width, and action.label()
Returns the label of the action button.tooltip()
Returns the tooltip of the action button, or null if no tooltip is set.@org.jetbrains.annotations.Range(from=1L, to=1024L) int
width()
Returns the width of the action button.
-
Method Details
-
create
@Contract(value="_, _, _, _ -> new", pure=true) static ActionButton create(Component label, @Nullable Component tooltip, int width, @Nullable DialogAction action) Creates a new action button with the specified label, tooltip, width, and action.- Parameters:
label
- the label of the buttontooltip
- the tooltip to display when hovering over the button, or null if no tooltip is neededwidth
- the width of the buttonaction
- the action to perform when the button is clicked, or null if no action is associated- Returns:
- a new ActionButton instance
-
builder
Creates a new action button builder with the specified label.- Parameters:
label
- the label of the button- Returns:
- a new ActionButton.Builder instance
-
label
Returns the label of the action button.- Returns:
- the label of the button
-
tooltip
Returns the tooltip of the action button, or null if no tooltip is set.- Returns:
- the tooltip of the button, or null
-
width
Returns the width of the action button.- Returns:
- the width of the button
-
action
Returns the action associated with this button, or null if no action is associated.- Returns:
- the action to perform when the button is clicked, or null
-