Interface DialogType
- All Known Subinterfaces:
ConfirmationType
,DialogListType
,MultiActionType
,NoticeType
,ServerLinksType
public sealed interface DialogType
permits ConfirmationType, DialogListType, MultiActionType, NoticeType, ServerLinksType
Represents a type of dialog.
-
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic ConfirmationType
confirmation
(ActionButton yesButton, ActionButton noButton) Creates a confirmation dialog with the specified yes and no buttons.static DialogListType.Builder
dialogList
(RegistrySet<Dialog> dialogs) Creates a dialog list builder with the specified dialogs.static DialogListType
dialogList
(RegistrySet<Dialog> dialogs, @Nullable ActionButton exitAction, @org.checkerframework.checker.index.qual.Positive int columns, @org.jetbrains.annotations.Range(from=1L, to=1024L) int buttonWidth) Creates a dialog list dialog with the specified dialogs, exit action, columns, and button width.static MultiActionType.Builder
multiAction
(List<ActionButton> actions) Creates a multi-action dialog builder with the specified actions.static MultiActionType
multiAction
(List<ActionButton> actions, @Nullable ActionButton exitAction, @org.checkerframework.checker.index.qual.Positive int columns) Creates a multi-action dialog with the specified actions, exit action, and number of columns.static NoticeType
notice()
Creates a notice dialog with the default action button.static NoticeType
notice
(ActionButton action) Creates a notice dialog with the specified action button.static ServerLinksType
serverLinks
(@Nullable ActionButton exitAction, @org.checkerframework.checker.index.qual.Positive int columns, @org.jetbrains.annotations.Range(from=1L, to=1024L) int buttonWidth) Creates a server links dialog with the specified exit action, number of columns, and button width.
-
Method Details
-
confirmation
@Contract(value="_, _ -> new", pure=true) static ConfirmationType confirmation(ActionButton yesButton, ActionButton noButton) Creates a confirmation dialog with the specified yes and no buttons.- Parameters:
yesButton
- the button to confirm the actionnoButton
- the button to cancel the action- Returns:
- a new instance
-
dialogList
@Contract(value="_, _, _, _ -> new", pure=true) static DialogListType dialogList(RegistrySet<Dialog> dialogs, @Nullable ActionButton exitAction, @org.checkerframework.checker.index.qual.Positive int columns, @org.jetbrains.annotations.Range(from=1L, to=1024L) int buttonWidth) Creates a dialog list dialog with the specified dialogs, exit action, columns, and button width.- Parameters:
dialogs
- the set of dialogs to displayexitAction
- the action button to exit the dialogcolumns
- the number of columns to display in the dialogbuttonWidth
- the width of each button in the dialog- Returns:
- a new instance
-
dialogList
@Contract(value="_ -> new", pure=true) static DialogListType.Builder dialogList(RegistrySet<Dialog> dialogs) Creates a dialog list builder with the specified dialogs.- Parameters:
dialogs
- the set of dialogs to display- Returns:
- a new builder instance
-
multiAction
@Contract(value="_, _, _ -> new", pure=true) static MultiActionType multiAction(List<ActionButton> actions, @Nullable ActionButton exitAction, @org.checkerframework.checker.index.qual.Positive int columns) Creates a multi-action dialog with the specified actions, exit action, and number of columns.- Parameters:
actions
- the list of action buttons to displayexitAction
- the action button to exit the dialogcolumns
- the number of columns to display in the dialog- Returns:
- a new instance
-
multiAction
@Contract(value="_ -> new", pure=true) static MultiActionType.Builder multiAction(List<ActionButton> actions) Creates a multi-action dialog builder with the specified actions.- Parameters:
actions
- the list of action buttons to display- Returns:
- a new builder instance
-
notice
Creates a notice dialog with the default action button.- Returns:
- a new instance
-
notice
Creates a notice dialog with the specified action button.- Parameters:
action
- the action button to display in the notice- Returns:
- a new instance
-
serverLinks
@Contract(value="_, _, _ -> new", pure=true) static ServerLinksType serverLinks(@Nullable ActionButton exitAction, @org.checkerframework.checker.index.qual.Positive int columns, @org.jetbrains.annotations.Range(from=1L, to=1024L) int buttonWidth) Creates a server links dialog with the specified exit action, number of columns, and button width.- Parameters:
exitAction
- the action button to exit the dialogcolumns
- the number of columns to display in the dialogbuttonWidth
- the width of each button in the dialog- Returns:
- a new instance
-