|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.iids.aos.gui.Util
public class Util
| Constructor Summary | |
|---|---|
Util()
|
|
| Method Summary | |
|---|---|
static void |
addLogOutputStream(java.io.OutputStream o)
Add an output stream to the logger. |
static boolean |
awtThreadInvokeLater(java.lang.Runnable r)
Invoke runnable in the event dispatcher thread. |
static boolean |
awtThreadInvokeNow(java.lang.Runnable r)
Invoke & wait in the event dispatcher thread. |
static void |
disposeWindow(java.awt.Window window)
Cleanly dispose of a window. |
static Diagnoser |
getDiagnoser()
|
static java.lang.String |
getLoggingPattern(org.apache.log4j.Level level)
|
static org.apache.log4j.Logger |
getMainLogger()
Retrieve the main logger for the gui classes. |
static void |
nonAwtThreadInvokeLater(java.lang.Runnable r)
Invokes a Runnable in a different thread than the event
dispatcher thread. |
static void |
nonAwtThreadInvokeNow(java.lang.Runnable r)
Deprecated. No sense in using this method, as it blocks the event dispatcher anyway (even though it uses a non-awt thread, it still waits for it..) |
static void |
popDiagnoser()
Removes the diagnoser op top of the stack. |
static void |
popDiagnoser(Diagnoser d)
Conditional pop: only remove top diagnoser if it is the exact same object reference as d. |
static void |
popupErrorDialog(java.lang.String msg)
Pops up a basic error message dialog. |
static boolean |
popupQuestion(java.lang.String msg)
Pops up an confirmation dialog (YES/NO options). |
static void |
pushDiagnoser(Diagnoser d)
|
static void |
setDisposeOnEsc(java.awt.Window window)
Disposes a window if ESC key is pressed when focus is on the window. |
static void |
setHideOnEsc(java.awt.Window window)
Hides a window if ESC key is pressed when focus is on the window. |
static void |
setKeyAction(java.awt.Window window,
int keyCode,
java.lang.Runnable action)
Set window action to perform on ESC key event. |
static void |
setLoggingLevel(org.apache.log4j.Level level)
Change the logging level at runtime. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Util()
| Method Detail |
|---|
public static boolean awtThreadInvokeNow(java.lang.Runnable r)
r - The Runnable to execute.public static boolean awtThreadInvokeLater(java.lang.Runnable r)
Runnable is invoked sometime in the future.
r - The Runnable to execute.@Deprecated public static void nonAwtThreadInvokeNow(java.lang.Runnable r)
Runnable.run() method finished.
If the current thread is the event dispatcher thread then a new thread
is created for the Runnable. Otherwise the current thread runs it.
public static void nonAwtThreadInvokeLater(java.lang.Runnable r)
Runnable in a different thread than the event
dispatcher thread. Returns immediately, the runnable is executed
sometime in the future.
public static void popupErrorDialog(java.lang.String msg)
msg - The message to be displayed.public static boolean popupQuestion(java.lang.String msg)
msg - The message to be displayed in the dialog.
true if the answer clicked in the dialog was "yes"
false otherwise.public static void pushDiagnoser(Diagnoser d)
public static Diagnoser getDiagnoser()
public static void popDiagnoser()
public static void popDiagnoser(Diagnoser d)
d. This is
checked with == for equality.
public static void setLoggingLevel(org.apache.log4j.Level level)
public static java.lang.String getLoggingPattern(org.apache.log4j.Level level)
public static org.apache.log4j.Logger getMainLogger()
public static void addLogOutputStream(java.io.OutputStream o)
public static void setDisposeOnEsc(java.awt.Window window)
setKeyAction(java.awt.Window, int, java.lang.Runnable) internally.
Before the window is disposed, it fires a WindowClosing event to
all the listeners to notify of the closing window.
window - The window to dispose on ESC.public static void disposeWindow(java.awt.Window window)
window - The window to dispose.public static void setHideOnEsc(java.awt.Window window)
setKeyAction(java.awt.Window, int, java.lang.Runnable) internally.
Before hiding the window, this fires a WindowClosing event
(even though the window does not really close - it can be made
visible again if desired).
window - The window to hide on ESC.
public static void setKeyAction(java.awt.Window window,
int keyCode,
java.lang.Runnable action)
JFrame, JWindow and JDialog.
window - The Window to register the key event forkeyCode - The keyCode that triggers the eventaction - Runnable implementing the action
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||