diff --git a/cave/com.raytheon.uf.viz.monitor.scan/src/com/raytheon/uf/viz/monitor/scan/resource/CWATLocalThreatResource.java b/cave/com.raytheon.uf.viz.monitor.scan/src/com/raytheon/uf/viz/monitor/scan/resource/CWATLocalThreatResource.java index 50ca859700..c991ff8b04 100644 --- a/cave/com.raytheon.uf.viz.monitor.scan/src/com/raytheon/uf/viz/monitor/scan/resource/CWATLocalThreatResource.java +++ b/cave/com.raytheon.uf.viz.monitor.scan/src/com/raytheon/uf/viz/monitor/scan/resource/CWATLocalThreatResource.java @@ -58,6 +58,7 @@ import com.vividsolutions.jts.geom.Coordinate; * ------------ ---------- ----------- -------------------------- * Oct 13, 2009 2307 dhladky Initial creation * Apr 18, 2013 1916 njensen Bulk rendering + * May 09, 2014 3145 mpduff Fix threat report displays * * * @@ -196,7 +197,8 @@ public class CWATLocalThreatResource extends CWATResource { color); ds.horizontalAlignment = HorizontalAlignment.CENTER; ds.font = font; - ds.textStyle = TextStyle.BOXED; + ds.addTextStyle(TextStyle.BOXED); + ds.addTextStyle(TextStyle.BLANKED); ds.verticallAlignment = VerticalAlignment.MIDDLE; double[] center = descriptor.worldToPixel(new double[] { loc.getLon(), loc.getLat() }); diff --git a/cave/com.raytheon.uf.viz.monitor.scan/src/com/raytheon/uf/viz/monitor/scan/resource/ScanDrawer.java b/cave/com.raytheon.uf.viz.monitor.scan/src/com/raytheon/uf/viz/monitor/scan/resource/ScanDrawer.java index 4a06c56d0b..890507793b 100644 --- a/cave/com.raytheon.uf.viz.monitor.scan/src/com/raytheon/uf/viz/monitor/scan/resource/ScanDrawer.java +++ b/cave/com.raytheon.uf.viz.monitor.scan/src/com/raytheon/uf/viz/monitor/scan/resource/ScanDrawer.java @@ -64,6 +64,7 @@ import com.vividsolutions.jts.geom.Point; * ------------ ---------- ----------- -------------------------- * Oct 13, 2009 2307 dhladky Initial creation * Apr 22, 2013 1926 njensen Faster rendering + * May 09, 2014 3145 mpduff Add getter for font so it can be disposed, javadoc fix * * * @@ -85,7 +86,7 @@ public class ScanDrawer { private RGB rscColor = null; - private GeometryFactory factory = new GeometryFactory(); + private final GeometryFactory factory = new GeometryFactory(); // defaults private double screenToWorldRatio = 0.0; @@ -668,14 +669,23 @@ public class ScanDrawer { } /** - * sets the screen to World ratio; + * Sets the font. The font must be disposed by class using this drawer * - * @param screenToWorldRatio + * @param font */ public void setFont(IFont font) { this.font = font; } + /** + * Get the font + * + * @return font + */ + public IFont getFont() { + return font; + } + /** * Sets the Cell drawing config up * diff --git a/cave/com.raytheon.uf.viz.monitor.scan/src/com/raytheon/uf/viz/monitor/scan/resource/ScanResource.java b/cave/com.raytheon.uf.viz.monitor.scan/src/com/raytheon/uf/viz/monitor/scan/resource/ScanResource.java index 0cc16d4de6..b9698bd02f 100644 --- a/cave/com.raytheon.uf.viz.monitor.scan/src/com/raytheon/uf/viz/monitor/scan/resource/ScanResource.java +++ b/cave/com.raytheon.uf.viz.monitor.scan/src/com/raytheon/uf/viz/monitor/scan/resource/ScanResource.java @@ -85,6 +85,7 @@ import com.vividsolutions.jts.geom.Coordinate; * Apr 02, 2013 1731 mpduff Fix problem with DMD updates. * Apr 22, 2013 1926 njensen Faster rendering * Mar 3, 2014 2804 mschenke Set back up clipping pane + * May 09, 2014 3145 mpduff Dispose the ScanDrawer font * * * @author dhladky @@ -218,6 +219,7 @@ public class ScanResource extends protected void disposeInternal() { if (drawer != null) { if (drawer.font != null) { + drawer.getFont().dispose(); drawer.setFont(null); } drawer = null;