Interface ActionButton


@NonExtendable public 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 Classes
    Modifier and Type
    Interface
    Description
    static interface 
    A builder for creating ActionButton instances.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the action associated with this button, or null if no action is associated.
    Creates a new action button builder with the specified label.
    create(Component label, @Nullable Component tooltip, int width, @Nullable DialogAction action)
    Creates a new action button with the specified label, tooltip, width, and action.
    Returns the label of the action button.
    Returns the tooltip of the action button, or null if no tooltip is set.
    @org.jetbrains.annotations.Range(from=1L, to=1024L) int
    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 button
      tooltip - the tooltip to display when hovering over the button, or null if no tooltip is needed
      width - the width of the button
      action - the action to perform when the button is clicked, or null if no action is associated
      Returns:
      a new ActionButton instance
    • builder

      @Contract(pure=true, value="_ -> new") static ActionButton.Builder builder(Component label)
      Creates a new action button builder with the specified label.
      Parameters:
      label - the label of the button
      Returns:
      a new ActionButton.Builder instance
    • label

      @Contract(pure=true) Component 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

      @Contract(pure=true) @org.jetbrains.annotations.Range(from=1L, to=1024L) int 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