|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.aplu.util.QuitPane
public class QuitPane
Modeless dialog containing a "Quit" button only.
Mainly used to hold the thread in a endless loop.
in simple realtime applications or to simulate an modeless application window
for testing or demonstration purposes.
Only one QuitPane may be used.
If no cleanable is registered, clicking the title bar's close button
will call System.exit(0), if a cleanable is registered, its clean() method
will be called.
All Swing methods are invoked in the EDT.
Constructor Summary | |
---|---|
QuitPane()
Same as QuitPane(true). |
|
QuitPane(boolean visible)
Construct a QuitPane with given visibility. |
Method Summary | |
---|---|
static void |
addCleanable(Cleanable cl)
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()
Dispose the dialog |
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() will not be called anymore). |
static void |
halt(Cleanable cl)
Same as halt(), but registers a cleanable, so its clean() method will be called when the title bar's close button is clicked. |
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 void |
setVisible(boolean visible)
Show/hide the dialog. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public QuitPane()
public QuitPane(boolean visible)
Method Detail |
---|
public static void addCleanable(Cleanable cl)
public static boolean quit()
while (!QuitPane.quit()) {}
public static void halt()
public static void halt(boolean exit)
public static void halt(Cleanable cl)
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)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |