Record Class MultiActionDialog
java.lang.Object
java.lang.Record
fr.fidorial.dialog.MultiActionDialog
- All Implemented Interfaces:
Dialog, DialogDefinition, DialogLike
public record MultiActionDialog(DialogBase base, List<DialogActionButton> actions, int columns, @Nullable DialogActionButton exitAction)
extends Record
implements DialogDefinition
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMultiActionDialog(DialogBase base, List<DialogActionButton> actions, int columns, @Nullable DialogActionButton exitAction) Creates an instance of aMultiActionDialogrecord class. -
Method Summary
Modifier and TypeMethodDescriptionactions()Returns the value of theactionsrecord component.base()Returns the value of thebaserecord component.intcolumns()Returns the value of thecolumnsrecord component.columns(int columns) final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexitActionrecord component.exitAction(@Nullable DialogActionButton exitAction) final inthashCode()Returns a hash code value for this object.static MultiActionDialogof(DialogBase base, List<DialogActionButton> actions) Creates a grid of two columns and no footer.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
DEFAULT_COLUMNS
public static final int DEFAULT_COLUMNSDefault number of columns.- Since:
- 0.1.0
- See Also:
-
-
Constructor Details
-
MultiActionDialog
public MultiActionDialog(DialogBase base, List<DialogActionButton> actions, int columns, @Nullable DialogActionButton exitAction) Creates an instance of aMultiActionDialogrecord class.- Parameters:
base- the value for thebaserecord componentactions- the value for theactionsrecord componentcolumns- the value for thecolumnsrecord componentexitAction- the value for theexitActionrecord component
-
-
Method Details
-
of
@Contract("_, _ -> new") public static MultiActionDialog of(DialogBase base, List<DialogActionButton> actions) Creates a grid of two columns and no footer.- Parameters:
base- the shared title, contents and behaviouractions- the buttons of the grid- Returns:
- the dialog
- Since:
- 0.1.0
-
columns
- Parameters:
columns- how many buttons sit side by side- Returns:
- a copy of this dialog laid out in the given number of columns
- Since:
- 0.1.0
-
exitAction
- Parameters:
exitAction- the footer button, ornullfor no footer- Returns:
- a copy of this dialog carrying the given footer
- Since:
- 0.1.0
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
base
Returns the value of thebaserecord component.- Specified by:
basein interfaceDialogDefinition- Returns:
- the value of the
baserecord component
-
actions
Returns the value of theactionsrecord component.- Returns:
- the value of the
actionsrecord component
-
columns
public int columns()Returns the value of thecolumnsrecord component.- Returns:
- the value of the
columnsrecord component
-
exitAction
Returns the value of theexitActionrecord component.- Returns:
- the value of the
exitActionrecord component
-