|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.geotools.gui.swing.ExceptionMonitor
Utility which enables exception messages to be displayed in a Swing component. The
standard Exception
class contains methods which write the exception to the
error console. This class adds static methods which make the message,
and eventually the exception trace, appear in a viewer component.
Method Summary | |
static void |
main(java.lang.String[] args)
Display a dummy exception. |
static void |
paintStackTrace(java.awt.Graphics2D graphics,
java.awt.Rectangle widgetBounds,
java.lang.Throwable exception)
Writes the specified exception trace in the specified graphics context. |
static void |
show(java.awt.Component owner,
java.lang.Throwable exception)
Displays an error message for the specified exception. |
static void |
show(java.awt.Component owner,
java.lang.Throwable exception,
java.lang.String message)
Displays an error message for the specified exception. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static void show(java.awt.Component owner, java.lang.Throwable exception)
owner
- Component in which the exception is produced, or if unknown.exception
- Exception which has been thrown and is to be reported to the user.public static void show(java.awt.Component owner, java.lang.Throwable exception, java.lang.String message)
owner
- Component in which the exception is produced, or if unknown.exception
- Exception which has been thrown and is to be reported to the user.message
- Message to display. If this parameter is null, then
Throwable.getLocalizedMessage()
will be called to obtain the message.public static void paintStackTrace(java.awt.Graphics2D graphics, java.awt.Rectangle widgetBounds, java.lang.Throwable exception)
Component.paint(java.awt.Graphics)
method and we want
to write it rather than leaving an empty window.
graphics
- Graphics context in which to write exception. The graphics context should
be in its initial state (default affine transform, default colour, etc...)widgetBounds
- Size of the trace which was being drawn.exception
- Exception whose trace we want to write.public static void main(java.lang.String[] args)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |