Class DialogBox
java.lang.Object
javafx.scene.control.Dialog<javafx.scene.control.ButtonType>
javafx.scene.control.Alert
edu.ntnu.idatt2001.carljgu.client.dialogs.DialogBox
- All Implemented Interfaces:
javafx.event.EventTarget
public class DialogBox
extends javafx.scene.control.Alert
A dialog box that extends alert to use
a builder to build a dialog box.
- Version:
- 1.3 23.05.2022
- Author:
- Carl Gützkow
-
Property Summary
Properties inherited from class javafx.scene.control.Alert
alertType
Properties inherited from class javafx.scene.control.Dialog
contentText, dialogPane, graphic, headerText, height, onCloseRequest, onHidden, onHiding, onShowing, onShown, resizable, resultConverter, result, showing, title, width, x, y
-
Nested Class Summary
Nested classes/interfaces inherited from class javafx.scene.control.Alert
javafx.scene.control.Alert.AlertType
-
Constructor Summary
ConstructorDescriptionDialogBox
(DialogBoxBuilder builder) Constructor for a dialog box that uses a builder to set attributes. -
Method Summary
Modifier and TypeMethodDescriptionvoid
setImage
(javafx.scene.image.Image image) Sets the graphic of the alert to a given image.void
setListMessage
(List<String> listMessage) Adds a list view node to the expandable content of the dialog.Methods inherited from class javafx.scene.control.Alert
alertTypeProperty, getAlertType, getButtonTypes, setAlertType
Methods inherited from class javafx.scene.control.Dialog
buildEventDispatchChain, close, contentTextProperty, dialogPaneProperty, getContentText, getDialogPane, getGraphic, getHeaderText, getHeight, getModality, getOnCloseRequest, getOnHidden, getOnHiding, getOnShowing, getOnShown, getOwner, getResult, getResultConverter, getTitle, getWidth, getX, getY, graphicProperty, headerTextProperty, heightProperty, hide, initModality, initOwner, initStyle, isResizable, isShowing, onCloseRequestProperty, onHiddenProperty, onHidingProperty, onShowingProperty, onShownProperty, resizableProperty, resultConverterProperty, resultProperty, setContentText, setDialogPane, setGraphic, setHeaderText, setHeight, setOnCloseRequest, setOnHidden, setOnHiding, setOnShowing, setOnShown, setResizable, setResult, setResultConverter, setTitle, setWidth, setX, setY, show, showAndWait, showingProperty, titleProperty, widthProperty, xProperty, yProperty
-
Constructor Details
-
DialogBox
Constructor for a dialog box that uses a builder to set attributes. If the alert type is NONE, the window will only close if there is at least one button. If the builder has no image defined, then the default image is used. Otherwise, this constructor will add image from resource folder.- Parameters:
builder
- DialogBoxBuilder - a builder class to configure a dialog box
-
-
Method Details
-
setImage
public void setImage(javafx.scene.image.Image image) Sets the graphic of the alert to a given image.- Parameters:
image
- Image - graphical image of the dialog box
-
setListMessage
Adds a list view node to the expandable content of the dialog.- Parameters:
listMessage
- List - a list of strings.
-