|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ch.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 a modeless application window
for testing or demonstration purposes.
Only one QuitPane may be used.
If no exist listener is registered, clicking the title bar's close button
calls System.exit(0), otherwise its notifyExit() method
is 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 |
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. |
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 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)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |