Package app.service
Class DialogBoxes
java.lang.Object
app.service.DialogBoxes
public class DialogBoxes
extends java.lang.Object
Class containing static methods for different kinds of popup window interactions
with the user.
-
Method Summary
Modifier and Type Method Description static void
showErrorMessage(java.lang.String errorMessage)
Shows a specified message to the user with an error icon.static java.io.File
showOpenDirectoryWithDialog(javafx.stage.Stage stage)
Shows an OS specific directory chooser to choose a directory on the diskstatic java.io.File
showopenFileWithDialog(javafx.stage.Stage stage)
Shows an OS specific file chooser to choose a file on the diskstatic java.io.File
showSaveFileWithDialog(javafx.stage.Stage stage)
Shows an OS specific file chooser to specifyy a new path on the diskMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Method Details
-
showErrorMessage
public static void showErrorMessage(java.lang.String errorMessage)Shows a specified message to the user with an error icon.- Parameters:
errorMessage
- The message to show the user
-
showopenFileWithDialog
public static java.io.File showopenFileWithDialog(javafx.stage.Stage stage)Shows an OS specific file chooser to choose a file on the disk- Parameters:
stage
- The JavaFX stage to connect to the dialog box. This is needed for the window to be able to run on the JavaFX thread.- Returns:
- The file chosen through the dialog window
-
showOpenDirectoryWithDialog
public static java.io.File showOpenDirectoryWithDialog(javafx.stage.Stage stage)Shows an OS specific directory chooser to choose a directory on the disk- Parameters:
stage
- The JavaFX stage to connect to the dialog box. This is needed for the window to be able to run on the JavaFX thread.- Returns:
- The file chosen through the dialog window
-
showSaveFileWithDialog
public static java.io.File showSaveFileWithDialog(javafx.stage.Stage stage)Shows an OS specific file chooser to specifyy a new path on the disk- Parameters:
stage
- The JavaFX stage to connect to the dialog box. This is needed for the window to be able to run on the JavaFX thread.- Returns:
- The filepath chosen through the dialog window
-