Interface SingleOptionDialogInput.OptionEntry

Enclosing interface:
SingleOptionDialogInput

@NonExtendable public static interface SingleOptionDialogInput.OptionEntry
Represents a single option entry in a single option dialog input.

Only 1 option is allowed to have initial selected.

  • Method Details

    • create

      @Contract(pure=true, value="_, _, _ -> new") static SingleOptionDialogInput.OptionEntry create(String id, @Nullable @Nullable Component display, boolean initial)
      Creates a new option entry.
      Parameters:
      id - the unique identifier for the option
      display - the display name for the option, or null if not set
      initial - whether this option is initially selected
      Returns:
      a new option entry instance
    • id

      @Contract(pure=true) String id()
      The unique identifier for the option.
      Returns:
      the option ID
    • display

      The display name for the option, or null if not set.
      Returns:
      the display component, or null
    • initial

      @Contract(pure=true) boolean initial()
      Whether this option is initially selected.

      Only 1 option is allowed to have initial selected.

      Returns:
      true if the option is initially selected, false otherwise