java.lang.Object
io.github.palexdev.materialfx.dialogs.MFXGenericDialogBuilder
Builder class for
MFXGenericDialogs with fluent api.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal MFXGenericDialogBuilderaddActions(Map.Entry<Node, EventHandler<MouseEvent>>... actions) Adds the given nodes to the dialog's action pane.addActions(Node... actions) Adds the given nodes to the dialog's action pane.addStyleClasses(String... styleClasses) Adds the given style classes to the dialog.addStylesheets(String... stylesheets) Adds the given stylesheets to the dialog.static MFXGenericDialogBuilderbuild()Uses the no-arg constructor, starts from a newMFXGenericDialog.static MFXGenericDialogBuilderbuild(MFXGenericDialog dialog) Uses theMFXGenericDialogBuilder(MFXGenericDialog)constructor, starts from the given dialog.get()makeScrollable(boolean smoothScrolling) Makes the dialog's content scrollable usingMFXGenericDialog.buildScrollableContent(boolean).setActionsOrientation(Orientation orientation) Sets the dialog's actions pane orientation.setContent(Node content) Sets the dialog's content.setContentText(String contentText) Sets the dialog's content text.setHeaderIcon(Node headerIcon) Sets the dialog's header icon.setHeaderText(String headerText) Sets the dialog's header text.setOnAlwaysOnTop(EventHandler<MouseEvent> onAlwaysOnTop) Sets the action to perform when the always on top button is pressed.setOnClose(EventHandler<MouseEvent> onClose) Sets the action to perform when the close button is pressed.setOnMinimize(EventHandler<MouseEvent> onMinimize) Sets the action to perform when the minimize button is pressed.setShowAlwaysOnTop(boolean showAlwaysOnTop) Shows/hides the dialog's always on top button.setShowClose(boolean showClose) Shows/hides the dialog's close button.setShowMinimize(boolean showMinimize) Shows/hides the dialog's minimize button.Uses the built dialog as a content for aMFXStageDialog, passes toMFXStageDialogBuilderto customize it.
-
Constructor Details
-
MFXGenericDialogBuilder
public MFXGenericDialogBuilder() -
MFXGenericDialogBuilder
-
-
Method Details
-
build
Uses the no-arg constructor, starts from a newMFXGenericDialog. -
build
Uses theMFXGenericDialogBuilder(MFXGenericDialog)constructor, starts from the given dialog. -
setHeaderIcon
Sets the dialog's header icon. -
setHeaderText
Sets the dialog's header text. -
setContent
Sets the dialog's content. -
setContentText
Sets the dialog's content text. -
setShowClose
Shows/hides the dialog's close button. -
setShowMinimize
Shows/hides the dialog's minimize button. -
setShowAlwaysOnTop
Shows/hides the dialog's always on top button. -
setActionsOrientation
Sets the dialog's actions pane orientation. -
setOnClose
Sets the action to perform when the close button is pressed. -
setOnMinimize
Sets the action to perform when the minimize button is pressed. -
setOnAlwaysOnTop
Sets the action to perform when the always on top button is pressed. -
makeScrollable
Makes the dialog's content scrollable usingMFXGenericDialog.buildScrollableContent(boolean). -
addStyleClasses
Adds the given style classes to the dialog. -
addStylesheets
Adds the given stylesheets to the dialog. -
addActions
Adds the given nodes to the dialog's action pane.- See Also:
-
addActions
@SafeVarargs public final MFXGenericDialogBuilder addActions(Map.Entry<Node, EventHandler<MouseEvent>>... actions) Adds the given nodes to the dialog's action pane.- See Also:
-
get
- Returns:
- the built dialog
-
toStageDialogBuilder
Uses the built dialog as a content for aMFXStageDialog, passes toMFXStageDialogBuilderto customize it.
-