Merge "Issue #3145 - Fix Scan threat labels, dispose font" into omaha_14.3.1
Former-commit-id:bb5cc2c9ac
[formerlycd5956d21a
] [formerly364f0d877a
] [formerlybb5cc2c9ac
[formerlycd5956d21a
] [formerly364f0d877a
] [formerlye3c6407be3
[formerly364f0d877a
[formerly 06b3cb4dd8f07600e6513a15a2495b485b0812b6]]]] Former-commit-id:e3c6407be3
Former-commit-id:0fc85255e4
[formerlya46987ef36
] [formerly c5990d4401145dd3609123f0dd6741e9a15c26ae [formerlyb06e8e6e3e
]] Former-commit-id: f1e762a37c388902d6115e2fd3f7522b258d9e24 [formerlyd23ba206c9
] Former-commit-id:fb58021364
This commit is contained in:
commit
a26966b107
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
|
* Oct 13, 2009 2307 dhladky Initial creation
|
||||||
* Apr 18, 2013 1916 njensen Bulk rendering
|
* Apr 18, 2013 1916 njensen Bulk rendering
|
||||||
|
* May 09, 2014 3145 mpduff Fix threat report displays
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
|
@ -196,7 +197,8 @@ public class CWATLocalThreatResource extends CWATResource {
|
||||||
color);
|
color);
|
||||||
ds.horizontalAlignment = HorizontalAlignment.CENTER;
|
ds.horizontalAlignment = HorizontalAlignment.CENTER;
|
||||||
ds.font = font;
|
ds.font = font;
|
||||||
ds.textStyle = TextStyle.BOXED;
|
ds.addTextStyle(TextStyle.BOXED);
|
||||||
|
ds.addTextStyle(TextStyle.BLANKED);
|
||||||
ds.verticallAlignment = VerticalAlignment.MIDDLE;
|
ds.verticallAlignment = VerticalAlignment.MIDDLE;
|
||||||
double[] center = descriptor.worldToPixel(new double[] {
|
double[] center = descriptor.worldToPixel(new double[] {
|
||||||
loc.getLon(), loc.getLat() });
|
loc.getLon(), loc.getLat() });
|
||||||
|
|
|
@ -64,6 +64,7 @@ import com.vividsolutions.jts.geom.Point;
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* Oct 13, 2009 2307 dhladky Initial creation
|
* Oct 13, 2009 2307 dhladky Initial creation
|
||||||
* Apr 22, 2013 1926 njensen Faster rendering
|
* Apr 22, 2013 1926 njensen Faster rendering
|
||||||
|
* May 09, 2014 3145 mpduff Add getter for font so it can be disposed, javadoc fix
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -85,7 +86,7 @@ public class ScanDrawer {
|
||||||
|
|
||||||
private RGB rscColor = null;
|
private RGB rscColor = null;
|
||||||
|
|
||||||
private GeometryFactory factory = new GeometryFactory();
|
private final GeometryFactory factory = new GeometryFactory();
|
||||||
|
|
||||||
// defaults
|
// defaults
|
||||||
private double screenToWorldRatio = 0.0;
|
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) {
|
public void setFont(IFont font) {
|
||||||
this.font = font;
|
this.font = font;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the font
|
||||||
|
*
|
||||||
|
* @return font
|
||||||
|
*/
|
||||||
|
public IFont getFont() {
|
||||||
|
return font;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the Cell drawing config up
|
* 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 02, 2013 1731 mpduff Fix problem with DMD updates.
|
||||||
* Apr 22, 2013 1926 njensen Faster rendering
|
* Apr 22, 2013 1926 njensen Faster rendering
|
||||||
* Mar 3, 2014 2804 mschenke Set back up clipping pane
|
* Mar 3, 2014 2804 mschenke Set back up clipping pane
|
||||||
|
* May 09, 2014 3145 mpduff Dispose the ScanDrawer font
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author dhladky
|
* @author dhladky
|
||||||
|
@ -218,6 +219,7 @@ public class ScanResource extends
|
||||||
protected void disposeInternal() {
|
protected void disposeInternal() {
|
||||||
if (drawer != null) {
|
if (drawer != null) {
|
||||||
if (drawer.font != null) {
|
if (drawer.font != null) {
|
||||||
|
drawer.getFont().dispose();
|
||||||
drawer.setFont(null);
|
drawer.setFont(null);
|
||||||
}
|
}
|
||||||
drawer = null;
|
drawer = null;
|
||||||
|
|
Loading…
Add table
Reference in a new issue