public final class GraphicsUtilities extends Object
Graphics2D
handle. Method in this class was
used to be in org.geotools.gui.swing.ExceptionMonitor
. We had to extract them in a
separated class in order to avoid dependencies of renderer module toward the GUI one, especially
since the extracted methods are not Swing specific.Modifier and Type | Method and Description |
---|---|
static void |
paintStackTrace(Graphics2D graphics,
Rectangle widgetBounds,
Throwable exception)
Writes the specified exception trace in the specified graphics context.
|
static String |
printStackTrace(Throwable exception)
Returns an exception trace.
|
public static void paintStackTrace(Graphics2D graphics, Rectangle widgetBounds, Throwable exception)
Component.paint(java.awt.Graphics)
method and we want
to write it rather than leaving an empty window.exception
- Exception whose trace we want to write.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.Copyright © 1996–2019 Geotools. All rights reserved.