Class Popups
java.lang.Object
edu.ntnu.idatt1002.k2g05.controllers.Popups
Class for showing different types of popups. e.g. Error, Confirmation and Warning popups/dialogs
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
showConfirmation
(String title, String header, String content) Method for showing an confirmation alert.static void
Method for showing an error alert.static javafx.scene.control.ButtonBar.ButtonData
showWarningOfOverriding
(String title, String header, String content) Shows a warning pane
-
Constructor Details
-
Popups
public Popups()
-
-
Method Details
-
showError
Method for showing an error alert.- Parameters:
title
- of the alertheader
- for the alertcontent
- for the alert
-
showConfirmation
Method for showing an confirmation alert.- Parameters:
title
- of the alertheader
- for the alertcontent
- for the alert- Returns:
- true if OK, button is pressed.
-
showWarningOfOverriding
public static javafx.scene.control.ButtonBar.ButtonData showWarningOfOverriding(String title, String header, String content) Shows a warning pane- Parameters:
title
- of warningheader
- of warningcontent
- of warning- Returns:
- YES if override, NO if cancel and CANCEL_CLOSE if delte changes
-