java.lang.Object
com.dua3.utility.fx.controls.AbstractDialogPaneBuilder<D,B,R>
com.dua3.utility.fx.controls.AbstractDialogBuilder<Alert,AlertBuilder,ButtonType>
com.dua3.utility.fx.controls.AlertBuilder
Builder for Alert Dialogs.
Provides a fluent interface to create Alerts.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.dua3.utility.fx.controls.AbstractDialogPaneBuilder
AbstractDialogPaneBuilder.ResultHandler<R> -
Method Summary
Modifier and TypeMethodDescriptionbuild()Create Alert instance.buttons(ButtonType... buttons) Define Alert Buttons.Set supplemental CSS.defaultButton(ButtonType button) Define the default Buttons.Set text.Methods inherited from class com.dua3.utility.fx.controls.AbstractDialogBuilder
showAndWait, titleMethods inherited from class com.dua3.utility.fx.controls.AbstractDialogPaneBuilder
applyIfNotNull, getResultHandler, header, resultHandler, setDialogSupplier
-
Method Details
-
build
Create Alert instance.- Overrides:
buildin classAbstractDialogBuilder<Alert,AlertBuilder, ButtonType> - Returns:
- Alert instance
-
text
Set text.- Parameters:
fmt- the format String as defined byFormatterargs- the arguments passed to the formatter- Returns:
this
-
buttons
Define Alert Buttons.- Parameters:
buttons- the buttons to show- Returns:
this
-
defaultButton
Define the default Buttons.- Parameters:
button- the button to use as default- Returns:
this
-
css
Set supplemental CSS.- Parameters:
css- the name of the CSS resource to load (URL.toExternalForm()- Returns:
- this
-