Interface Dialog

All Superinterfaces:
DialogLike
All Known Subinterfaces:
DialogDefinition
All Known Implementing Classes:
ConfirmationDialog, DialogListDialog, DialogReference, MultiActionDialog, NoticeDialog, ServerLinksDialog

public sealed interface Dialog extends DialogLike permits DialogDefinition, DialogReference
  • Method Details

    • reference

      @Contract("_ -> new") static DialogReference reference(Key key)
      Points at a dialog held by the registry rather than describing one.
      Parameters:
      key - the key the dialog is registered under
      Returns:
      the reference
      Since:
      0.1.0
    • reference

      @Contract("_ -> new") static DialogReference reference(TypedKey<Dialog> key)
      Points at a dialog held by the registry.
      Parameters:
      key - the typed key the dialog is registered under
      Returns:
      the reference
      Since:
      0.1.0
    • notice

      @Contract("_, _ -> new") static NoticeDialog notice(ComponentLike title, ComponentLike message)
      Creates a one button dialog whose button reads gui.ok and only dismisses the screen.
      Parameters:
      title - the screen title
      message - the text to display
      Returns:
      the dialog
      Since:
      0.1.0
    • confirmation

      @Contract("_, _, _, _ -> new") static ConfirmationDialog confirmation(ComponentLike title, ComponentLike message, DialogActionButton yes, DialogActionButton no)
      Creates a two button dialog.
      Parameters:
      title - the screen title
      message - the text to display
      yes - the button for the positive outcome
      no - the button for the negative outcome
      Returns:
      the dialog
      Since:
      0.1.0
    • multiAction

      @Contract("_, _ -> new") static MultiActionDialog multiAction(ComponentLike title, List<DialogActionButton> actions)
      Creates a dialog holding a grid of buttons.
      Parameters:
      title - the screen title
      actions - the buttons to lay out
      Returns:
      the dialog
      Since:
      0.1.0