Module com.dua3.utility.fx.controls
Package com.dua3.utility.fx.controls
Class AbstractDialogPaneBuilder<D,B extends AbstractDialogPaneBuilder<D,B,R>,R>
java.lang.Object
com.dua3.utility.fx.controls.AbstractDialogPaneBuilder<D,B,R>
- Type Parameters:
D- the type of the dialog or pane to buildB- the type of the builderR- the result type
- Direct Known Subclasses:
AbstractDialogBuilder,AbstractPaneBuilder
public abstract class AbstractDialogPaneBuilder<D,B extends AbstractDialogPaneBuilder<D,B,R>,R>
extends Object
Abstract base class for DialogPane builders.
Provides a fluent interface to create Dialog panes.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceDialog(Pane) result handler. -
Method Summary
Modifier and TypeMethodDescriptionprotected static <C,D> void applyIfNotNull(BiConsumer<C, D> consumer, @Nullable C a, @Nullable D b) build()Create Alert instance.Gets the result handler for this dialog pane builder.Set Alert header text.resultHandler(AbstractDialogPaneBuilder.ResultHandler<R> resultHandler) Sets the result handler for this dialog pane builder.protected final voidsetDialogSupplier(Supplier<? extends D> dialogSupplier)
-
Method Details
-
setDialogSupplier
-
build
Create Alert instance.- Returns:
- Alert instance
-
applyIfNotNull
-
header
Set Alert header text.- Parameters:
fmt- the format String as defined byFormatterargs- the arguments passed to the formatter- Returns:
this
-
resultHandler
Sets the result handler for this dialog pane builder.- Parameters:
resultHandler- the result handler to be used for handling dialog results- Returns:
- this builder instance
-
getResultHandler
Gets the result handler for this dialog pane builder.- Returns:
- the result handler managing dialog results
-