Omaha #3242 fix error if user zooms on cross section before it's loaded

Change-Id: I9143840a5074e4e5c9995c94cb21686598d79830

Former-commit-id: 1add8fca08 [formerly 1add8fca08 [formerly 4a7eebe03c9cd84702e6cda1258503da725a10bb]]
Former-commit-id: 46c843f51a
Former-commit-id: 32038939b3
This commit is contained in:
Nate Jensen 2014-06-18 16:37:49 -05:00
parent 953bf4a72f
commit 4c44afbf22
3 changed files with 13 additions and 19 deletions

View file

@ -1,8 +0,0 @@
#Tue Oct 19 10:38:18 CDT 2010
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.6

View file

@ -4,7 +4,7 @@ Bundle-Name: CrossSection
Bundle-SymbolicName: com.raytheon.uf.viz.xy.crosssection;singleton:=true
Bundle-Version: 1.14.0.qualifier
Bundle-Vendor: RAYTHEON
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-ActivationPolicy: lazy
Require-Bundle: com.raytheon.uf.common.colormap,
com.raytheon.uf.common.dataplugin,

View file

@ -76,10 +76,11 @@ import com.vividsolutions.jts.geom.Point;
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jul 3, 2010 bsteffen Initial creation
* Jul 3, 2010 bsteffen Initial creation
* Feb 15, 2013 1638 mschenke Got rid of viz/edex topo classes
* and moved into common
* Aug 13, 2013 2262 dgilling Use new wxmath hgt2pres method.
* Jun 14, 2014 3242 njensen Null safety checks
*
* </pre>
*
@ -158,11 +159,13 @@ public class CrossSectionGraph extends AbstractGraph {
*/
@Override
protected void createAxes() {
yAxisPlacer.setPixelWidth(graphExtent.getWidth());
if (yAxisPlacer != null && xAxisPlacer != null) {
yAxisPlacer.setPixelWidth(graphExtent.getWidth());
createHeightAxis(
((CrossSectionDescriptor) descriptor).getHeightScale(),
zoomLevel);
createHeightAxis(
((CrossSectionDescriptor) descriptor).getHeightScale(),
zoomLevel);
}
}
@Override
@ -217,7 +220,7 @@ public class CrossSectionGraph extends AbstractGraph {
titleColor);
titleString.font = titleFont;
titleString.setCoordinates(x, y);
titleString.textStyle = TextStyle.DROP_SHADOW;
titleString.addTextStyle(TextStyle.DROP_SHADOW);
titleString.horizontalAlignment = HorizontalAlignment.LEFT;
titleString.verticallAlignment = VerticalAlignment.BOTTOM;
titleString.magnification = currentMagnification;
@ -243,7 +246,7 @@ public class CrossSectionGraph extends AbstractGraph {
paintHeightUnits(target, paintProps);
paintTopoLine(target, paintProps);
paintTopoLine(target);
paintCities(target, paintProps);
@ -316,7 +319,7 @@ public class CrossSectionGraph extends AbstractGraph {
caret.setCoordinates(x, y);
city.setCoordinates(x, y);
caret.font = city.font = unitsFont;
city.textStyle = TextStyle.BLANKED;
city.addTextStyle(TextStyle.BLANKED);
caret.horizontalAlignment = city.horizontalAlignment = HorizontalAlignment.CENTER;
caret.verticallAlignment = VerticalAlignment.BOTTOM;
city.verticallAlignment = VerticalAlignment.MIDDLE;
@ -361,8 +364,7 @@ public class CrossSectionGraph extends AbstractGraph {
target.drawStrings(labels);
}
protected void paintTopoLine(IGraphicsTarget target,
PaintProperties paintProps) throws VizException {
protected void paintTopoLine(IGraphicsTarget target) throws VizException {
// Draw topo graph
RGB graphColor = ((CrossSectionDescriptor) descriptor)