Issue #3145 - Fix Scan threat labels, dispose font
Change-Id: I385e184d81a021a350c7df7ee4948ad7e407784d Former-commit-id:03356dd554
[formerly 84bd0800b2652b31c06015fa49f816f1402f461d] Former-commit-id:a81569849b
This commit is contained in:
parent
c7f5379b78
commit
4ec26b6e31
3 changed files with 18 additions and 4 deletions
|
@ -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
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
|
@ -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() });
|
||||
|
|
|
@ -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
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -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
|
||||
*
|
||||
|
|
|
@ -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
|
||||
* </pre>
|
||||
*
|
||||
* @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;
|
||||
|
|
Loading…
Add table
Reference in a new issue