public class QuitPane
extends java.lang.Object
Constructor and Description |
---|
QuitPane()
Same as QuitPane(true).
|
QuitPane(boolean visible)
Construct a QuitPane with given visibility.
|
Modifier and Type | Method and Description |
---|---|
static void |
addExitListener(ExitListener listener)
Create a QuitPane dialog, if it's not yet done.
|
void |
addQuitNotifier(Cleanable notifier)
Register a Cleanble whose clean method will be called when
the Quit or Close button is hit.
|
static void |
close()
Hide the dialog.
|
static void |
dispose()
Hide the dialog and release the resources.
|
static javax.swing.JDialog |
getDialog()
Return the dialog.
|
static void |
halt()
Create a QuitPane dialog, if it's not yet done.
|
static void |
halt(boolean exit)
Same as halt(), but if exit = false clicking the title bar's close
button acts the same as clicking the Quit button
(System.exit(0) will not be called anymore).
|
static void |
init()
Same as init(true).
|
static void |
init(boolean visible)
Create a QuitPane dialog, if it's not yet done with the given visibility.
|
static boolean |
quit()
Create a QuitPane dialog, if it's not yet done.
|
static boolean |
quit(boolean exit)
Same as quit(), but if exit = false clicking the title bar's close
button acts the same as clicking the Quit button
(System.exit(0) will not be called anymore).
|
static void |
setVisible(boolean visible)
Show/hide the dialog.
|
public QuitPane()
public QuitPane(boolean visible)
public static void addExitListener(ExitListener listener)
public static boolean quit(boolean exit)
public static boolean quit()
while (!QuitPane.quit()) {}
public static void halt()
public static void halt(boolean exit)
public static void init(boolean visible)
public static void init()
public static void close()
public static void dispose()
public static javax.swing.JDialog getDialog()
public static void setVisible(boolean visible)
visible
- if true, the dialog is shown, otherwise hidden.public void addQuitNotifier(Cleanable notifier)