ExceptionMonitor changes for revisions 1090:1097

Reformatting only, maybe done by some automatic tools. Does not apply to Apache SIS since the code has been reformatted again.

Command line:

svn diff --extensions "--unified --ignore-space-change --ignore-all-space --ignore-eol-style" -r1090:1097 https://svn.osgeo.org/geotools/trunk/modules/extension/widgets-swing/src/main/java/org/geotools/gui/swing/ExceptionMonitor.java
Revision 1090Revision 1097
* <i>Swing</i> component. The standard {@link java.lang.Exception} class
* contains methods which write the exception to the error console.
* This <code>ExceptionMonitor</code> class adds static methods which make
* the message, and eventually the exception trace, appear in a
* viewer component.
*
* <p>&nbsp;</p>
* <p align="center"><img src="doc-files/ExceptionMonitor.png"></p>
* <p>&nbsp;</p>
*
* @version 1.0
* @author Martin Desruisseaux
*/
* <i>Swing</i> component. The standard {@link java.lang.Exception} class
* contains methods which write the exception to the error console.
* This <code>ExceptionMonitor</code> class adds static methods which make
* the message, and eventually the exception trace, appear in a viewer
* component.
*
* <p>&nbsp;</p>
* <p align="center"><img src="doc-files/ExceptionMonitor.png"></p>
* <p>&nbsp;</p>
*
* $Id: ExceptionMonitor.java,v 1.3 2002/07/15 15:52:38 loxnard Exp $
* @version 1.0
* @author Martin Desruisseaux
*/
 *        transform, default colour, etc...)
 * @param widgetBounds Size of the trace which was being drawn.
 */
public static void paintStackTrace(final Graphics2D graphics, final Rectangle widgetBounds, final Throwable exception) {
    /*
     * Obtains the exception trace in the form of a character chain.
     * The carriage returns in this chain can be "\r", "\n" or "r\n".
 *        transform, default colour, etc...)
 * @param widgetBounds Size of the trace which was being drawn.
 */
public static void paintStackTrace(final Graphics2D graphics, final Rectangle widgetBounds,
                                   final Throwable exception) {
    /*
     * Obtains the exception trace in the form of a character chain.
     * The carriage returns in this chain can be "\r", "\n" or "r\n".
* Class in charge of displaying any exception messages and eventually
* their traces. The message will appear in a dialog box or in an
* internal window, depending on the parent.
* <strong>Note:</strong> All methods in this class must be called in the same
* thread as the <i>Swing</i> thread.
*
* @version 1.0
* @author Martin Desruisseaux
* Class in charge of displaying any exception messages and eventually
* their traces. The message will appear in a dialog box or in an
* internal window, depending on the parent.
* <strong>Note:</strong> All methods in this class must be called in the
* same thread as the <i>Swing</i> thread.
*
* @version 1.0
* @author Martin Desruisseaux
textArea.setWrapStyleWord(true);
textArea.setBackground(null);
textArea.setBorder(null); // Certain L&Fs have a border.
/**
 * Constructs the rest of the dialog box.  The title bar will
 * contain the name of the exception class.
textArea.setWrapStyleWord(true);
textArea.setBackground(null);
textArea.setBorder(null); // Certain L&Fs have a border.

/**
 * Constructs the rest of the dialog box.  The title bar will
 * contain the name of the exception class.
JComponent traceComponent=null;
for (Throwable cause  = exception;
               cause != null;
               cause  = cause.getCause())
{
    final JTextArea text=new JTextArea(1, WIDTH);
    text.setTabSize(4);
    text.setText(printStackTrace(cause));
JComponent traceComponent=null;
for (Throwable cause  = exception;
               cause != null;
cause  = cause.getCause()) {
    final JTextArea text=new JTextArea(1, WIDTH);
    text.setTabSize(4);
    text.setText(printStackTrace(cause));
if (traceComponent!=null) {
    if (!(traceComponent instanceof JTabbedPane)) {
        String classname = Utilities.getShortClassName(exception);
        JTabbedPane tabs = new JTabbedPane(JTabbedPane.TOP, JTabbedPane.SCROLL_TAB_LAYOUT);
        tabs.addTab(classname, traceComponent);
        traceComponent = tabs;
    }
if (traceComponent!=null) {
    if (!(traceComponent instanceof JTabbedPane)) {
        String classname = Utilities.getShortClassName(exception);
        JTabbedPane tabs = new JTabbedPane(JTabbedPane.TOP,
                                           JTabbedPane.SCROLL_TAB_LAYOUT);
        tabs.addTab(classname, traceComponent);
        traceComponent = tabs;
    }