Package io.github.jonestimd.swing.dialog
Class Dialogs
- java.lang.Object
-
- io.github.jonestimd.swing.dialog.Dialogs
-
public class Dialogs extends java.lang.Object
Factory class for common dialogs.
-
-
Constructor Summary
Constructors Constructor Description Dialogs()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
confirmDiscardChanges(java.awt.Container owner)
Display a dialog to confirm closing a window with unsaved data.static boolean
confirmDiscardChanges(java.util.ResourceBundle bundle, java.awt.Container owner)
Display a dialog to confirm closing a window with unsaved data.
-
-
-
Method Detail
-
confirmDiscardChanges
public static boolean confirmDiscardChanges(java.awt.Container owner)
Display a dialog to confirm closing a window with unsaved data.- Parameters:
owner
- the owner for the dialog (e.g. the window being closed)- Returns:
- true if the user chose to discard unsaved data
-
confirmDiscardChanges
public static boolean confirmDiscardChanges(java.util.ResourceBundle bundle, java.awt.Container owner)
Display a dialog to confirm closing a window with unsaved data.- Parameters:
bundle
- provides title and button textowner
- the owner for the dialog (e.g. the window being closed)- Returns:
- true if the user chose to discard unsaved data
-
-