|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.awt.EventQueue
|
+--com.lc.util.awt.DispatchThreadThrowableManager
Base class for handling Throwables from inside the Dispatch Thread.
This class was inspired from de.qfs.lib.gui.EventQueue.
| Constructor Summary | |
DispatchThreadThrowableManager()
Auto-installing constructor. |
|
DispatchThreadThrowableManager(boolean shouldInstall)
Non auto-installing constructor. |
|
DispatchThreadThrowableManager(IThrowableHandler delegate,
boolean shouldInstall)
Creates an instance delegating Throwable handling. |
|
| Method Summary | |
void |
dispatchEvent(java.awt.AWTEvent event)
Overrides dispatchEvent method from
java.awt.EventQueue in order to manage the
Throwable caught.
|
boolean |
handleThrowable(java.lang.Throwable throwable)
Default implementation, delegates to the delegate if it is not null, or does nothing by returning false. |
void |
setUninstallOnThrowableHandling(boolean uninstall)
|
void |
uninstall()
Pops current instance up from EventQueue stack. |
| Methods inherited from class java.awt.EventQueue |
getNextEvent, invokeAndWait, invokeLater, isDispatchThread, peekEvent, peekEvent, pop, postEvent, push |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DispatchThreadThrowableManager()
public DispatchThreadThrowableManager(boolean shouldInstall)
shouldInstall - true if created instance should be
installed.
public DispatchThreadThrowableManager(IThrowableHandler delegate,
boolean shouldInstall)
delegate - The IThrowableHandler to delegate to.| Method Detail |
public boolean handleThrowable(java.lang.Throwable throwable)
handleThrowable in interface IThrowableHandlercom.lc.util.IThrowableHandlerthrowable - The Throwable to handle.true if it was handled, false
if default behavior should be used instead.public void setUninstallOnThrowableHandling(boolean uninstall)
public void uninstall()
ApplicationError - if not installed.public final void dispatchEvent(java.awt.AWTEvent event)
dispatchEvent method from
java.awt.EventQueue in order to manage the
Throwable caught.
This method implicitly calls uninstall
under following conditions :
handleThrowable
implementation returns true,
uninstallOnThrowableHandling is set to true,
dispatchEvent in class java.awt.EventQueue
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||