17.1.1 edex build ready
This commit is contained in:
parent
7e05f25909
commit
b67b8c9336
62 changed files with 254 additions and 476 deletions
|
@ -271,7 +271,7 @@ public class AdvisoryResource extends
|
|||
dStrings.setCoordinates(pixelLoc[0], pixelLoc[1]);
|
||||
dStrings.addTextStyle(TextStyle.DROP_SHADOW);
|
||||
dStrings.horizontalAlignment = HorizontalAlignment.LEFT;
|
||||
dStrings.verticallAlignment = VerticalAlignment.TOP;
|
||||
dStrings.verticalAlignment = VerticalAlignment.TOP;
|
||||
target.drawStrings(dStrings);
|
||||
}
|
||||
}
|
||||
|
@ -313,7 +313,7 @@ public class AdvisoryResource extends
|
|||
dStrings.setCoordinates(pixelLoc[0], pixelLoc[1]);
|
||||
dStrings.addTextStyle(TextStyle.DROP_SHADOW);
|
||||
dStrings.horizontalAlignment = HorizontalAlignment.CENTER;
|
||||
dStrings.verticallAlignment = VerticalAlignment.MIDDLE;
|
||||
dStrings.verticalAlignment = VerticalAlignment.MIDDLE;
|
||||
strings.add(dStrings);
|
||||
} else if (record.getType() == AdvisoryResourceType.TEXT) {
|
||||
double[] pixelLoc = descriptor.worldToPixel(new double[] {
|
||||
|
@ -326,7 +326,7 @@ public class AdvisoryResource extends
|
|||
dStrings.setCoordinates(pixelLoc[0], pixelLoc[1]);
|
||||
dStrings.addTextStyle(TextStyle.DROP_SHADOW);
|
||||
dStrings.horizontalAlignment = HorizontalAlignment.LEFT;
|
||||
dStrings.verticallAlignment = VerticalAlignment.TOP;
|
||||
dStrings.verticalAlignment = VerticalAlignment.TOP;
|
||||
strings.add(dStrings);
|
||||
}
|
||||
}
|
||||
|
@ -396,7 +396,7 @@ public class AdvisoryResource extends
|
|||
dStrings.setCoordinates(xLoc, yLoc);
|
||||
dStrings.addTextStyle(TextStyle.BLANKED);
|
||||
dStrings.horizontalAlignment = HorizontalAlignment.LEFT;
|
||||
dStrings.verticallAlignment = VerticalAlignment.TOP;
|
||||
dStrings.verticalAlignment = VerticalAlignment.TOP;
|
||||
target.drawStrings(dStrings);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -106,7 +106,7 @@ public class SigWxCatResource extends SigWxPolygonResource {
|
|||
string.font = font;
|
||||
string.setCoordinates(x, y);
|
||||
string.horizontalAlignment = HorizontalAlignment.CENTER;
|
||||
string.verticallAlignment = VerticalAlignment.TOP;
|
||||
string.verticalAlignment = VerticalAlignment.TOP;
|
||||
target.drawStrings(string);
|
||||
}
|
||||
|
||||
|
|
|
@ -155,7 +155,7 @@ public class SigWxCloudsResource extends SigWxPolygonResource {
|
|||
string.font = font;
|
||||
string.setCoordinates(x, y);
|
||||
string.horizontalAlignment = HorizontalAlignment.CENTER;
|
||||
string.verticallAlignment = VerticalAlignment.TOP;
|
||||
string.verticalAlignment = VerticalAlignment.TOP;
|
||||
target.drawStrings(string);
|
||||
}
|
||||
|
||||
|
|
|
@ -356,7 +356,7 @@ public class SigWxJetStreamResource extends SigWxResource {
|
|||
string.font = font;
|
||||
string.setCoordinates(tmpX, locationPixel[1]);
|
||||
string.horizontalAlignment = halignLevel;
|
||||
string.verticallAlignment = valignLevel;
|
||||
string.verticalAlignment = valignLevel;
|
||||
target.drawStrings(string);
|
||||
} else {
|
||||
DrawableString string = new DrawableString(flightLevelStr,
|
||||
|
@ -364,7 +364,7 @@ public class SigWxJetStreamResource extends SigWxResource {
|
|||
string.font = font;
|
||||
string.setCoordinates(locationPixel[0], locationPixel[1]);
|
||||
string.horizontalAlignment = halignLevel;
|
||||
string.verticallAlignment = valignLevel;
|
||||
string.verticalAlignment = valignLevel;
|
||||
target.drawStrings(string);
|
||||
}
|
||||
}
|
||||
|
@ -375,7 +375,7 @@ public class SigWxJetStreamResource extends SigWxResource {
|
|||
string.font = font;
|
||||
string.setCoordinates(locationPixel[0], locationPixel[1]);
|
||||
string.horizontalAlignment = halignSpeed;
|
||||
string.verticallAlignment = valignSpeed;
|
||||
string.verticalAlignment = valignSpeed;
|
||||
target.drawStrings(string);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -168,7 +168,7 @@ public class SigWxTropHeightResource extends SigWxResource {
|
|||
string.font = font;
|
||||
string.setCoordinates(locationPixel[0], locationPixel[1]);
|
||||
string.horizontalAlignment = HorizontalAlignment.CENTER;
|
||||
string.verticallAlignment = VerticalAlignment.MIDDLE;
|
||||
string.verticalAlignment = VerticalAlignment.MIDDLE;
|
||||
target.drawStrings(string);
|
||||
}
|
||||
|
||||
|
|
|
@ -120,7 +120,7 @@ public class SigWxVtsResource extends SigWxResource {
|
|||
DrawableString string = new DrawableString(text, color);
|
||||
string.font = font;
|
||||
string.setCoordinates(loc[0], loc[1]);
|
||||
string.verticallAlignment = VerticalAlignment.MIDDLE;
|
||||
string.verticalAlignment = VerticalAlignment.MIDDLE;
|
||||
target.drawStrings(string);
|
||||
}
|
||||
|
||||
|
|
|
@ -363,7 +363,7 @@ public class CcfpResource extends
|
|||
DrawableString string = new DrawableString(lines, color);
|
||||
string.setCoordinates(pt[0], pt[1], pt[2]);
|
||||
string.addTextStyle(TextStyle.BLANKED);
|
||||
string.verticallAlignment = VerticalAlignment.MIDDLE;
|
||||
string.verticalAlignment = VerticalAlignment.MIDDLE;
|
||||
target.drawStrings(string);
|
||||
}
|
||||
|
||||
|
|
|
@ -504,7 +504,7 @@ public class D2DColorBarResource extends
|
|||
drawable.font = colorBarFont;
|
||||
drawable.setCoordinates(xPos, yPos, zPos);
|
||||
drawable.horizontalAlignment = IGraphicsTarget.HorizontalAlignment.CENTER;
|
||||
drawable.verticallAlignment = IGraphicsTarget.VerticalAlignment.MIDDLE;
|
||||
drawable.verticalAlignment = IGraphicsTarget.VerticalAlignment.MIDDLE;
|
||||
drawable.addTextStyle(TextStyle.BLANKED);
|
||||
drawable.basics.alpha = paintProps.getAlpha();
|
||||
|
||||
|
|
|
@ -24,7 +24,8 @@ Require-Bundle: com.raytheon.uf.viz.core;bundle-version="1.14.0",
|
|||
com.raytheon.uf.viz.image.export;bundle-version="1.14.0",
|
||||
org.eclipse.core.runtime;bundle-version="3.8.0",
|
||||
com.raytheon.viz.volumebrowser;bundle-version="1.15.0",
|
||||
org.eclipse.e4.ui.model.workbench
|
||||
org.eclipse.e4.ui.model.workbench,
|
||||
gov.noaa.nws.ncep.ui.pgen;bundle-version="1.0.0"
|
||||
Export-Package: com.raytheon.uf.viz.d2d.nsharp,
|
||||
com.raytheon.uf.viz.d2d.nsharp.display,
|
||||
com.raytheon.uf.viz.d2d.nsharp.rsc,
|
||||
|
|
|
@ -1245,7 +1245,7 @@ public class DataStoreResource extends
|
|||
ds.addTextStyle(TextStyle.BLANKED, new RGB(255, 255, 255));
|
||||
ds.addTextStyle(TextStyle.BOXED, new RGB(255, 255, 255));
|
||||
ds.horizontalAlignment = HorizontalAlignment.LEFT;
|
||||
ds.verticallAlignment = VerticalAlignment.BOTTOM;
|
||||
ds.verticalAlignment = VerticalAlignment.BOTTOM;
|
||||
target.drawStrings(ds);
|
||||
}
|
||||
}
|
||||
|
@ -1313,7 +1313,7 @@ public class DataStoreResource extends
|
|||
- offsetY);
|
||||
string.font = getFont(target);
|
||||
string.horizontalAlignment = HorizontalAlignment.CENTER;
|
||||
string.verticallAlignment = VerticalAlignment.MIDDLE;
|
||||
string.verticalAlignment = VerticalAlignment.MIDDLE;
|
||||
boolean add = true;
|
||||
|
||||
IExtent strExtent = new PixelExtent(
|
||||
|
|
|
@ -174,7 +174,7 @@ public class HpeLabelResource extends
|
|||
ColorableCapability.class).getColor());
|
||||
drawableString.font = font;
|
||||
drawableString.horizontalAlignment = HorizontalAlignment.CENTER;
|
||||
drawableString.verticallAlignment = VerticalAlignment.MIDDLE;
|
||||
drawableString.verticalAlignment = VerticalAlignment.MIDDLE;
|
||||
}
|
||||
|
||||
private String getText(Date date, String productId) {
|
||||
|
|
|
@ -152,9 +152,9 @@ public class KmlStringsGenerator extends KmlFeatureGenerator {
|
|||
DrawableString dstring2 = inMap;
|
||||
// try determine which of the two dtrings would be considered
|
||||
// "first"
|
||||
if (dstring2.verticallAlignment != dstring.verticallAlignment) {
|
||||
if (dstring2.verticallAlignment == VerticalAlignment.BOTTOM
|
||||
|| dstring.verticallAlignment == VerticalAlignment.TOP) {
|
||||
if (dstring2.verticalAlignment != dstring.verticalAlignment) {
|
||||
if (dstring2.verticalAlignment == VerticalAlignment.BOTTOM
|
||||
|| dstring.verticalAlignment == VerticalAlignment.TOP) {
|
||||
DrawableString tmp = dstring2;
|
||||
dstring2 = dstring;
|
||||
dstring = tmp;
|
||||
|
|
|
@ -305,9 +305,9 @@ public class KmlCanvasRenderingExtension extends
|
|||
} else if (HorizontalAlignment.CENTER == string.horizontalAlignment) {
|
||||
realX -= bounds.getWidth() / 2;
|
||||
}
|
||||
if (VerticalAlignment.TOP == string.verticallAlignment) {
|
||||
if (VerticalAlignment.TOP == string.verticalAlignment) {
|
||||
realY -= bounds.getY();
|
||||
} else if (VerticalAlignment.MIDDLE == string.verticallAlignment) {
|
||||
} else if (VerticalAlignment.MIDDLE == string.verticalAlignment) {
|
||||
realY -= bounds.getY() / 2;
|
||||
}
|
||||
if (string.getTextStyles().contains(TextStyle.BLANKED)) {
|
||||
|
@ -444,11 +444,11 @@ public class KmlCanvasRenderingExtension extends
|
|||
bounds.setFrame(bounds.getMinX() - bounds.getWidth() / 2,
|
||||
bounds.getMinY(), bounds.getWidth(), bounds.getHeight());
|
||||
}
|
||||
if (VerticalAlignment.BOTTOM == string.verticallAlignment) {
|
||||
if (VerticalAlignment.BOTTOM == string.verticalAlignment) {
|
||||
bounds.setFrame(bounds.getMinX(),
|
||||
bounds.getMinY() - bounds.getHeight(),
|
||||
bounds.getWidth(), bounds.getHeight());
|
||||
} else if (VerticalAlignment.MIDDLE == string.verticallAlignment) {
|
||||
} else if (VerticalAlignment.MIDDLE == string.verticalAlignment) {
|
||||
bounds.setFrame(bounds.getMinX(),
|
||||
bounds.getMinY() - bounds.getHeight() / 2,
|
||||
bounds.getWidth(), bounds.getHeight());
|
||||
|
|
|
@ -1281,20 +1281,20 @@ public class FFMPResource extends
|
|||
getCapability(ColorableCapability.class).getColor());
|
||||
fieldDescString.font = font;
|
||||
fieldDescString.horizontalAlignment = HorizontalAlignment.CENTER;
|
||||
fieldDescString.verticallAlignment = VerticalAlignment.MIDDLE;
|
||||
fieldDescString.verticalAlignment = VerticalAlignment.MIDDLE;
|
||||
|
||||
basinLocatorString = new DrawableString("X", new RGB(255, 255,
|
||||
255));
|
||||
basinLocatorString.font = xfont;
|
||||
basinLocatorString.horizontalAlignment = HorizontalAlignment.CENTER;
|
||||
basinLocatorString.verticallAlignment = VerticalAlignment.MIDDLE;
|
||||
basinLocatorString.verticalAlignment = VerticalAlignment.MIDDLE;
|
||||
basinLocatorString.addTextStyle(TextStyle.BLANKED);
|
||||
|
||||
hpeLabelString = new DrawableString("", getCapability(
|
||||
ColorableCapability.class).getColor());
|
||||
hpeLabelString.font = font;
|
||||
hpeLabelString.horizontalAlignment = HorizontalAlignment.CENTER;
|
||||
hpeLabelString.verticallAlignment = VerticalAlignment.TOP;
|
||||
hpeLabelString.verticalAlignment = VerticalAlignment.TOP;
|
||||
|
||||
}
|
||||
});
|
||||
|
|
|
@ -368,19 +368,19 @@ public class FogResource extends
|
|||
strings[0].font = font;
|
||||
strings[0].setCoordinates(pixel1[0], pixel1[1]);
|
||||
strings[0].addTextStyle(TextStyle.BLANKED);
|
||||
strings[0].verticallAlignment = VerticalAlignment.MIDDLE;
|
||||
strings[0].verticalAlignment = VerticalAlignment.MIDDLE;
|
||||
|
||||
strings[1] = new DrawableString("MODERATE", color);
|
||||
strings[1].font = font;
|
||||
strings[1].setCoordinates(pixel2[0], pixel2[1]);
|
||||
strings[1].addTextStyle(TextStyle.BLANKED);
|
||||
strings[1].verticallAlignment = VerticalAlignment.MIDDLE;
|
||||
strings[1].verticalAlignment = VerticalAlignment.MIDDLE;
|
||||
|
||||
strings[2] = new DrawableString("HIGH", color);
|
||||
strings[2].font = font;
|
||||
strings[2].setCoordinates(pixel3[0], pixel3[1]);
|
||||
strings[2].addTextStyle(TextStyle.BLANKED);
|
||||
strings[2].verticallAlignment = VerticalAlignment.MIDDLE;
|
||||
strings[2].verticalAlignment = VerticalAlignment.MIDDLE;
|
||||
|
||||
target.drawStrings(strings);
|
||||
}
|
||||
|
|
|
@ -199,7 +199,7 @@ public class CWATLocalThreatResource extends CWATResource {
|
|||
ds.font = font;
|
||||
ds.addTextStyle(TextStyle.BOXED);
|
||||
ds.addTextStyle(TextStyle.BLANKED);
|
||||
ds.verticallAlignment = VerticalAlignment.MIDDLE;
|
||||
ds.verticalAlignment = VerticalAlignment.MIDDLE;
|
||||
double[] center = descriptor.worldToPixel(new double[] {
|
||||
loc.getLon(), loc.getLat() });
|
||||
ds.setCoordinates(center[0], center[1]);
|
||||
|
|
|
@ -436,7 +436,7 @@ public class ScanDrawer {
|
|||
DrawableString ds = new DrawableString(dtdr.getIdent(),
|
||||
getResourceColor());
|
||||
ds.horizontalAlignment = HorizontalAlignment.RIGHT;
|
||||
ds.verticallAlignment = VerticalAlignment.BOTTOM;
|
||||
ds.verticalAlignment = VerticalAlignment.BOTTOM;
|
||||
ds.font = font;
|
||||
ds.addTextStyle(TextStyle.DROP_SHADOW);
|
||||
|
||||
|
@ -606,7 +606,7 @@ public class ScanDrawer {
|
|||
string.setCoordinates(x, y);
|
||||
string.addTextStyle(TextStyle.DROP_SHADOW);
|
||||
string.horizontalAlignment = HorizontalAlignment.CENTER;
|
||||
string.verticallAlignment = VerticalAlignment.MIDDLE;
|
||||
string.verticalAlignment = VerticalAlignment.MIDDLE;
|
||||
aTarget.drawStrings(string);
|
||||
}
|
||||
|
||||
|
|
|
@ -470,7 +470,7 @@ public class ScanResource extends
|
|||
string.font = getScanDrawer().font;
|
||||
string.addTextStyle(TextStyle.BLANKED);
|
||||
string.horizontalAlignment = HorizontalAlignment.LEFT;
|
||||
string.verticallAlignment = VerticalAlignment.MIDDLE;
|
||||
string.verticalAlignment = VerticalAlignment.MIDDLE;
|
||||
}
|
||||
target.drawStrings(strings);
|
||||
}
|
||||
|
@ -494,7 +494,7 @@ public class ScanResource extends
|
|||
ColorableCapability.class).getColor());
|
||||
string.font = getScanDrawer().font;
|
||||
string.horizontalAlignment = HorizontalAlignment.LEFT;
|
||||
string.verticallAlignment = VerticalAlignment.MIDDLE;
|
||||
string.verticalAlignment = VerticalAlignment.MIDDLE;
|
||||
string.addTextStyle(TextStyle.BLANKED);
|
||||
string.basics.x = pixel[0];
|
||||
string.basics.y = pixel[1];
|
||||
|
|
|
@ -137,28 +137,28 @@ public class NcwfMovementResource extends
|
|||
|
||||
// This works but it is supposed to avoid putting text over arrows
|
||||
spdStr.horizontalAlignment = HorizontalAlignment.CENTER;
|
||||
spdStr.verticallAlignment = VerticalAlignment.MIDDLE;
|
||||
spdStr.verticalAlignment = VerticalAlignment.MIDDLE;
|
||||
topStr.horizontalAlignment = HorizontalAlignment.CENTER;
|
||||
topStr.verticallAlignment = VerticalAlignment.MIDDLE;
|
||||
topStr.verticalAlignment = VerticalAlignment.MIDDLE;
|
||||
if (dir <= 90 && dir >= 0) {
|
||||
topStr.verticallAlignment = VerticalAlignment.BOTTOM;
|
||||
topStr.verticalAlignment = VerticalAlignment.BOTTOM;
|
||||
topStr.horizontalAlignment = HorizontalAlignment.LEFT;
|
||||
spdStr.verticallAlignment = VerticalAlignment.TOP;
|
||||
spdStr.verticalAlignment = VerticalAlignment.TOP;
|
||||
spdStr.horizontalAlignment = HorizontalAlignment.RIGHT;
|
||||
} else if (dir >= 270 && dir < 360) {
|
||||
topStr.verticallAlignment = VerticalAlignment.BOTTOM;
|
||||
topStr.verticalAlignment = VerticalAlignment.BOTTOM;
|
||||
topStr.horizontalAlignment = HorizontalAlignment.RIGHT;
|
||||
spdStr.verticallAlignment = VerticalAlignment.TOP;
|
||||
spdStr.verticalAlignment = VerticalAlignment.TOP;
|
||||
spdStr.horizontalAlignment = HorizontalAlignment.LEFT;
|
||||
} else if (dir > 90 && dir < 180) {
|
||||
topStr.verticallAlignment = VerticalAlignment.TOP;
|
||||
topStr.verticalAlignment = VerticalAlignment.TOP;
|
||||
topStr.horizontalAlignment = HorizontalAlignment.LEFT;
|
||||
spdStr.verticallAlignment = VerticalAlignment.BOTTOM;
|
||||
spdStr.verticalAlignment = VerticalAlignment.BOTTOM;
|
||||
spdStr.horizontalAlignment = HorizontalAlignment.RIGHT;
|
||||
} else {
|
||||
topStr.verticallAlignment = VerticalAlignment.TOP;
|
||||
topStr.verticalAlignment = VerticalAlignment.TOP;
|
||||
topStr.horizontalAlignment = HorizontalAlignment.RIGHT;
|
||||
spdStr.verticallAlignment = VerticalAlignment.BOTTOM;
|
||||
spdStr.verticalAlignment = VerticalAlignment.BOTTOM;
|
||||
spdStr.horizontalAlignment = HorizontalAlignment.LEFT;
|
||||
}
|
||||
// Draw the tops string
|
||||
|
|
|
@ -516,7 +516,7 @@ public class ProfilerResource extends
|
|||
parameters[i].addTextStyle(TextStyle.BLANKED);
|
||||
parameters[i].font = font;
|
||||
parameters[i].horizontalAlignment = IGraphicsTarget.HorizontalAlignment.CENTER;
|
||||
parameters[i].verticallAlignment = verticalAlignment;
|
||||
parameters[i].verticalAlignment = verticalAlignment;
|
||||
parameters[i].basics.y = y;
|
||||
parameters[i].magnification = magnification;
|
||||
|
||||
|
@ -567,7 +567,7 @@ public class ProfilerResource extends
|
|||
string1.addTextStyle(TextStyle.BLANKED);
|
||||
string1.font = font;
|
||||
string1.horizontalAlignment = IGraphicsTarget.HorizontalAlignment.RIGHT;
|
||||
string1.verticallAlignment = IGraphicsTarget.VerticalAlignment.MIDDLE;
|
||||
string1.verticalAlignment = IGraphicsTarget.VerticalAlignment.MIDDLE;
|
||||
string1.basics.x = ProfilerUtils.profilerRectangle.x
|
||||
- ProfilerUtils.LABEL_OFFSET;
|
||||
string1.basics.y = ProfilerUtils.profilerRectangle.y;
|
||||
|
@ -608,7 +608,7 @@ public class ProfilerResource extends
|
|||
ProfilerUtils.GRAPH_COLOR);
|
||||
string.addTextStyle(TextStyle.BLANKED);
|
||||
string.font = font;
|
||||
string.verticallAlignment = IGraphicsTarget.VerticalAlignment.MIDDLE;
|
||||
string.verticalAlignment = IGraphicsTarget.VerticalAlignment.MIDDLE;
|
||||
string.basics.y = calcY(i * 1000);
|
||||
rect = target.getStringsBounds(string);
|
||||
|
||||
|
@ -666,7 +666,7 @@ public class ProfilerResource extends
|
|||
ProfilerUtils.GRAPH_COLOR);
|
||||
string.addTextStyle(TextStyle.BLANKED);
|
||||
string.font = font;
|
||||
string.verticallAlignment = IGraphicsTarget.VerticalAlignment.MIDDLE;
|
||||
string.verticalAlignment = IGraphicsTarget.VerticalAlignment.MIDDLE;
|
||||
string.basics.y = calcY(height);
|
||||
rect = target.getStringsBounds(string);
|
||||
|
||||
|
|
|
@ -215,7 +215,7 @@ public class TCSResource extends
|
|||
string.font = font;
|
||||
string.setCoordinates(loc[0], loc[1]);
|
||||
string.horizontalAlignment = HorizontalAlignment.CENTER;
|
||||
string.verticallAlignment = VerticalAlignment.MIDDLE;
|
||||
string.verticalAlignment = VerticalAlignment.MIDDLE;
|
||||
target.drawStrings(string);
|
||||
}
|
||||
|
||||
|
@ -238,13 +238,13 @@ public class TCSResource extends
|
|||
strings[0].font = font;
|
||||
strings[0].setCoordinates(loc[0], loc[1]);
|
||||
strings[0].horizontalAlignment = HorizontalAlignment.CENTER;
|
||||
strings[0].verticallAlignment = VerticalAlignment.MIDDLE;
|
||||
strings[0].verticalAlignment = VerticalAlignment.MIDDLE;
|
||||
|
||||
strings[1] = new DrawableString(name, color);
|
||||
strings[1].font = font;
|
||||
strings[1].setCoordinates(loc[0], loc[1] + (7 * scale));
|
||||
strings[1].horizontalAlignment = HorizontalAlignment.CENTER;
|
||||
strings[1].verticallAlignment = VerticalAlignment.MIDDLE;
|
||||
strings[1].verticalAlignment = VerticalAlignment.MIDDLE;
|
||||
|
||||
target.drawStrings(strings);
|
||||
return;
|
||||
|
@ -261,7 +261,7 @@ public class TCSResource extends
|
|||
DrawableString string1 = new DrawableString(displayTime, color);
|
||||
string1.font = font;
|
||||
string1.setCoordinates(loc[0] + (2 * scale), loc[1]);
|
||||
string1.verticallAlignment = VerticalAlignment.MIDDLE;
|
||||
string1.verticalAlignment = VerticalAlignment.MIDDLE;
|
||||
strings.add(string1);
|
||||
|
||||
// Plotting wind speed
|
||||
|
@ -270,7 +270,7 @@ public class TCSResource extends
|
|||
string2.font = font;
|
||||
string2.setCoordinates(loc[0] - (1.5 * scale), loc[1]);
|
||||
string2.horizontalAlignment = HorizontalAlignment.RIGHT;
|
||||
string2.verticallAlignment = VerticalAlignment.MIDDLE;
|
||||
string2.verticalAlignment = VerticalAlignment.MIDDLE;
|
||||
strings.add(string2);
|
||||
|
||||
// Plotting pressure
|
||||
|
@ -280,7 +280,7 @@ public class TCSResource extends
|
|||
string3.font = font;
|
||||
string3.setCoordinates(loc[0], loc[1] + (2 * scale));
|
||||
string3.horizontalAlignment = HorizontalAlignment.CENTER;
|
||||
string3.verticallAlignment = VerticalAlignment.MIDDLE;
|
||||
string3.verticalAlignment = VerticalAlignment.MIDDLE;
|
||||
strings.add(string3);
|
||||
}
|
||||
|
||||
|
@ -294,7 +294,7 @@ public class TCSResource extends
|
|||
string4.font = font;
|
||||
string4.setCoordinates(loc[0], loc[1] + (7 * scale));
|
||||
string4.horizontalAlignment = HorizontalAlignment.CENTER;
|
||||
string4.verticallAlignment = VerticalAlignment.MIDDLE;
|
||||
string4.verticalAlignment = VerticalAlignment.MIDDLE;
|
||||
strings.add(string4);
|
||||
|
||||
target.drawStrings(strings);
|
||||
|
@ -445,22 +445,22 @@ public class TCSResource extends
|
|||
strings[0] = new DrawableString(LEGEND_12_FT, color);
|
||||
strings[0].font = font;
|
||||
strings[0].setCoordinates(x, y + (scale * 2));
|
||||
strings[0].verticallAlignment = VerticalAlignment.MIDDLE;
|
||||
strings[0].verticalAlignment = VerticalAlignment.MIDDLE;
|
||||
|
||||
strings[1] = new DrawableString(LEGEND_34_KT, color);
|
||||
strings[1].font = font;
|
||||
strings[1].setCoordinates(x, y + (scale * 4));
|
||||
strings[1].verticallAlignment = VerticalAlignment.MIDDLE;
|
||||
strings[1].verticalAlignment = VerticalAlignment.MIDDLE;
|
||||
|
||||
strings[2] = new DrawableString(LEGEND_50_KT, color);
|
||||
strings[2].font = font;
|
||||
strings[2].setCoordinates(x, y + (scale * 6));
|
||||
strings[2].verticallAlignment = VerticalAlignment.MIDDLE;
|
||||
strings[2].verticalAlignment = VerticalAlignment.MIDDLE;
|
||||
|
||||
strings[3] = new DrawableString(LEGEND_64_KT, color);
|
||||
strings[3].font = font;
|
||||
strings[3].setCoordinates(x, y + (scale * 8));
|
||||
strings[3].verticallAlignment = VerticalAlignment.MIDDLE;
|
||||
strings[3].verticalAlignment = VerticalAlignment.MIDDLE;
|
||||
|
||||
target.drawStrings(strings);
|
||||
target.setupClippingPlane(paintProps.getView().getExtent());
|
||||
|
|
|
@ -299,7 +299,7 @@ public class VAAResource extends
|
|||
DrawableString string = new DrawableString(volcanoName, color);
|
||||
string.font = font;
|
||||
string.setCoordinates(loc[0] + 30, loc[1]);
|
||||
string.verticallAlignment = VerticalAlignment.MIDDLE;
|
||||
string.verticalAlignment = VerticalAlignment.MIDDLE;
|
||||
target.drawStrings(string);
|
||||
}
|
||||
|
||||
|
@ -323,7 +323,7 @@ public class VAAResource extends
|
|||
DrawableString string = new DrawableString(message, color);
|
||||
string.font = font;
|
||||
string.setCoordinates(x, y);
|
||||
string.verticallAlignment = VerticalAlignment.MIDDLE;
|
||||
string.verticalAlignment = VerticalAlignment.MIDDLE;
|
||||
target.drawStrings(string);
|
||||
}
|
||||
target.setupClippingPlane(paintProps.getView().getExtent());
|
||||
|
|
|
@ -223,7 +223,7 @@ public class CrossSectionGraph extends AbstractGraph {
|
|||
titleString.setCoordinates(x, y);
|
||||
titleString.addTextStyle(TextStyle.DROP_SHADOW);
|
||||
titleString.horizontalAlignment = HorizontalAlignment.LEFT;
|
||||
titleString.verticallAlignment = VerticalAlignment.BOTTOM;
|
||||
titleString.verticalAlignment = VerticalAlignment.BOTTOM;
|
||||
titleString.magnification = currentMagnification;
|
||||
target.drawStrings(titleString);
|
||||
|
||||
|
@ -322,8 +322,8 @@ public class CrossSectionGraph extends AbstractGraph {
|
|||
caret.font = city.font = unitsFont;
|
||||
city.addTextStyle(TextStyle.BLANKED);
|
||||
caret.horizontalAlignment = city.horizontalAlignment = HorizontalAlignment.CENTER;
|
||||
caret.verticallAlignment = VerticalAlignment.BOTTOM;
|
||||
city.verticallAlignment = VerticalAlignment.MIDDLE;
|
||||
caret.verticalAlignment = VerticalAlignment.BOTTOM;
|
||||
city.verticalAlignment = VerticalAlignment.MIDDLE;
|
||||
caret.magnification = city.magnification = currentMagnification;
|
||||
labels.add(caret);
|
||||
labels.add(city);
|
||||
|
@ -358,7 +358,7 @@ public class CrossSectionGraph extends AbstractGraph {
|
|||
dString.font = unitsFont;
|
||||
dString.setCoordinates(x, y);
|
||||
dString.horizontalAlignment = HorizontalAlignment.CENTER;
|
||||
dString.verticallAlignment = VerticalAlignment.TOP;
|
||||
dString.verticalAlignment = VerticalAlignment.TOP;
|
||||
dString.magnification = currentMagnification;
|
||||
labels.add(dString);
|
||||
}
|
||||
|
|
|
@ -181,9 +181,9 @@ public class TimeSeriesGraph extends AbstractGraph {
|
|||
|
||||
String value = df.format(xAxes[i].getDiscreteValue());
|
||||
if (i == 0) {
|
||||
parameters.verticallAlignment = VerticalAlignment.BOTTOM;
|
||||
parameters.verticalAlignment = VerticalAlignment.BOTTOM;
|
||||
} else {
|
||||
parameters.verticallAlignment = VerticalAlignment.MIDDLE;
|
||||
parameters.verticalAlignment = VerticalAlignment.MIDDLE;
|
||||
}
|
||||
parameters.setText(value, colorToUse);
|
||||
parameters.setCoordinates(coords[0].x, coords[0].y,
|
||||
|
|
|
@ -264,7 +264,7 @@ public class VarHeightGraph extends AbstractGraph {
|
|||
parameters.font = unitsFont;
|
||||
parameters.addTextStyle(TextStyle.DROP_SHADOW);
|
||||
parameters.horizontalAlignment = HorizontalAlignment.CENTER;
|
||||
parameters.verticallAlignment = VerticalAlignment.TOP;
|
||||
parameters.verticalAlignment = VerticalAlignment.TOP;
|
||||
parameters.magnification = this.currentMagnification;
|
||||
|
||||
parameters.setText(value, rcsColor);
|
||||
|
|
|
@ -554,7 +554,7 @@ public abstract class AbstractGraph implements IGraph {
|
|||
DrawableString titleString = new DrawableString(title, titleColor);
|
||||
titleString.addTextStyle(TextStyle.DROP_SHADOW);
|
||||
titleString.horizontalAlignment = HorizontalAlignment.LEFT;
|
||||
titleString.verticallAlignment = VerticalAlignment.BOTTOM;
|
||||
titleString.verticalAlignment = VerticalAlignment.BOTTOM;
|
||||
titleString.rotation = 90;
|
||||
titleString.magnification = this.currentMagnification;
|
||||
int width = target.getStringsBounds(titleString).getBounds().width;
|
||||
|
@ -640,7 +640,7 @@ public abstract class AbstractGraph implements IGraph {
|
|||
|
||||
parameters.font = unitsFont;
|
||||
parameters.horizontalAlignment = HorizontalAlignment.CENTER;
|
||||
parameters.verticallAlignment = VerticalAlignment.TOP;
|
||||
parameters.verticalAlignment = VerticalAlignment.TOP;
|
||||
parameters.magnification = this.currentMagnification;
|
||||
|
||||
if (labelsHeight == 0) {
|
||||
|
@ -701,8 +701,8 @@ public abstract class AbstractGraph implements IGraph {
|
|||
label2.magnification = this.currentMagnification;
|
||||
label1.font = unitsFont;
|
||||
label2.font = unitsFont;
|
||||
label1.verticallAlignment = VerticalAlignment.MIDDLE;
|
||||
label2.verticallAlignment = VerticalAlignment.MIDDLE;
|
||||
label1.verticalAlignment = VerticalAlignment.MIDDLE;
|
||||
label2.verticalAlignment = VerticalAlignment.MIDDLE;
|
||||
label1.horizontalAlignment = HorizontalAlignment.RIGHT;
|
||||
label2.horizontalAlignment = HorizontalAlignment.LEFT;
|
||||
Rectangle2D bounds = target.getStringsBounds(label1);
|
||||
|
@ -710,13 +710,13 @@ public abstract class AbstractGraph implements IGraph {
|
|||
label1.setCoordinates(coord.x, coord.y, coord.z);
|
||||
if (label1.basics.y + bounds.getHeight() / 2 > graphExtent
|
||||
.getMaxY()) {
|
||||
label1.verticallAlignment = VerticalAlignment.BOTTOM;
|
||||
label2.verticallAlignment = VerticalAlignment.BOTTOM;
|
||||
label1.verticalAlignment = VerticalAlignment.BOTTOM;
|
||||
label2.verticalAlignment = VerticalAlignment.BOTTOM;
|
||||
}
|
||||
if (label1.basics.y - bounds.getHeight() / 2 < graphExtent
|
||||
.getMinY()) {
|
||||
label1.verticallAlignment = VerticalAlignment.TOP;
|
||||
label2.verticallAlignment = VerticalAlignment.TOP;
|
||||
label1.verticalAlignment = VerticalAlignment.TOP;
|
||||
label2.verticalAlignment = VerticalAlignment.TOP;
|
||||
}
|
||||
if (label1.basics.x - bounds.getWidth() / ratio < viewExtent
|
||||
.getMinX()) {
|
||||
|
|
|
@ -109,7 +109,7 @@ public class HodographBackgroundResource extends
|
|||
/ paintProps.getCanvasBounds().width;
|
||||
|
||||
DrawableString label = new DrawableString(direction + "\u00B0", GREY);
|
||||
label.verticallAlignment = VerticalAlignment.MIDDLE;
|
||||
label.verticalAlignment = VerticalAlignment.MIDDLE;
|
||||
label.horizontalAlignment = HorizontalAlignment.CENTER;
|
||||
label.addTextStyle(TextStyle.BLANKED);
|
||||
double[] center = descriptor
|
||||
|
@ -123,7 +123,7 @@ public class HodographBackgroundResource extends
|
|||
Coordinate intersection = line.intersection(bottom);
|
||||
if (intersection != null) {
|
||||
label.setCoordinates(intersection.x, intersection.y - padding);
|
||||
label.verticallAlignment = VerticalAlignment.BOTTOM;
|
||||
label.verticalAlignment = VerticalAlignment.BOTTOM;
|
||||
return label;
|
||||
}
|
||||
LineSegment top = new LineSegment(extent.getMinX(), extent.getMinY(),
|
||||
|
@ -131,7 +131,7 @@ public class HodographBackgroundResource extends
|
|||
intersection = line.intersection(top);
|
||||
if (intersection != null) {
|
||||
label.setCoordinates(intersection.x, intersection.y + padding);
|
||||
label.verticallAlignment = VerticalAlignment.TOP;
|
||||
label.verticalAlignment = VerticalAlignment.TOP;
|
||||
return label;
|
||||
}
|
||||
LineSegment left = new LineSegment(extent.getMinX(), extent.getMinY(),
|
||||
|
|
|
@ -844,7 +844,7 @@ public class ZoneSelectorResource extends DbMapResource {
|
|||
node.getLocation()[1]);
|
||||
ds.font = getFont(target);
|
||||
ds.horizontalAlignment = HorizontalAlignment.CENTER;
|
||||
ds.verticallAlignment = VerticalAlignment.MIDDLE;
|
||||
ds.verticalAlignment = VerticalAlignment.MIDDLE;
|
||||
ds.addTextStyle(TextStyle.DROP_SHADOW);
|
||||
strings.add(ds);
|
||||
|
||||
|
|
|
@ -676,7 +676,7 @@ public class StormTrackDisplay implements IRenderable {
|
|||
radiusFromPoint, angle);
|
||||
DrawableString str = new DrawableString(text, color);
|
||||
str.horizontalAlignment = hAlignment;
|
||||
str.verticallAlignment = vAlignment;
|
||||
str.verticalAlignment = vAlignment;
|
||||
// set the string magnification
|
||||
str.magnification = magnification;
|
||||
str.setCoordinates(labelLoc[0], labelLoc[1]);
|
||||
|
|
|
@ -292,7 +292,7 @@ public class AzimuthToolLayer extends
|
|||
DrawableString str = new DrawableString("", null);
|
||||
str.font = labelFont;
|
||||
str.horizontalAlignment = HorizontalAlignment.CENTER;
|
||||
str.verticallAlignment = VerticalAlignment.MIDDLE;
|
||||
str.verticalAlignment = VerticalAlignment.MIDDLE;
|
||||
labels[i] = str;
|
||||
}
|
||||
|
||||
|
|
|
@ -230,7 +230,7 @@ public class RangeRingsLayer extends AbstractMovableToolLayer<RangeRing>
|
|||
string.font = labelFont;
|
||||
string.setCoordinates(labelLoc[0], labelLoc[1]);
|
||||
string.horizontalAlignment = HorizontalAlignment.CENTER;
|
||||
string.verticallAlignment = VerticalAlignment.TOP;
|
||||
string.verticalAlignment = VerticalAlignment.TOP;
|
||||
strings.add(string);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -244,7 +244,7 @@ public class SamplePainter {
|
|||
ds.addTextStyle(TextStyle.DROP_SHADOW, this.shadowColor);
|
||||
}
|
||||
ds.horizontalAlignment = HorizontalAlignment.CENTER;
|
||||
ds.verticallAlignment = VerticalAlignment.BOTTOM;
|
||||
ds.verticalAlignment = VerticalAlignment.BOTTOM;
|
||||
ds.basics.x = screenloc[0] + (this.xOffset * ratio);
|
||||
ds.basics.y = screenloc[1] + ((this.yOffset + OFFSET) * ratio);
|
||||
|
||||
|
|
|
@ -1478,7 +1478,7 @@ public class GFEResource extends
|
|||
Coordinate coord = c.asPixel(descriptor.getGridGeometry());
|
||||
ds.setCoordinates(coord.x, coord.y);
|
||||
ds.horizontalAlignment = HorizontalAlignment.CENTER;
|
||||
ds.verticallAlignment = VerticalAlignment.MIDDLE;
|
||||
ds.verticalAlignment = VerticalAlignment.MIDDLE;
|
||||
ds.rotation = 0.0;
|
||||
target.drawStrings(ds);
|
||||
}
|
||||
|
|
|
@ -171,7 +171,7 @@ public class ContinuousColorbar implements IColorBarDisplay {
|
|||
DrawableString dstring = new DrawableString("", seColorBarTextColor);
|
||||
dstring.font = colorbarResource.getColorbarScaleFont();
|
||||
dstring.horizontalAlignment = HorizontalAlignment.CENTER;
|
||||
dstring.verticallAlignment = VerticalAlignment.MIDDLE;
|
||||
dstring.verticalAlignment = VerticalAlignment.MIDDLE;
|
||||
|
||||
DrawableLine dline = new DrawableLine();
|
||||
dline.basics.color = seColorBarTickColor;
|
||||
|
|
|
@ -514,7 +514,7 @@ public class DiscreteColorbar implements IColorBarDisplay,
|
|||
|
||||
dstring.setCoordinates(pickupLabelDrawPoint / xScaleFactor, center);
|
||||
dstring.horizontalAlignment = pickupValueAlignment;
|
||||
dstring.verticallAlignment = VerticalAlignment.MIDDLE;
|
||||
dstring.verticalAlignment = VerticalAlignment.MIDDLE;
|
||||
dstring.addTextStyle(TextStyle.BLANKED);
|
||||
dstring.addTextStyle(TextStyle.BOXED);
|
||||
dstring.addTextStyle(TextStyle.DROP_SHADOW,
|
||||
|
@ -553,7 +553,7 @@ public class DiscreteColorbar implements IColorBarDisplay,
|
|||
dstring.setCoordinates(labelLoc, center);
|
||||
dstring.font = colorbarResource.getColorbarWxLabelFont();
|
||||
dstring.horizontalAlignment = HorizontalAlignment.CENTER;
|
||||
dstring.verticallAlignment = VerticalAlignment.MIDDLE;
|
||||
dstring.verticalAlignment = VerticalAlignment.MIDDLE;
|
||||
strings.add(dstring);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -232,7 +232,7 @@ public class HydroColorBarResource extends
|
|||
string.setCoordinates(
|
||||
xMin + offset + width * entry.getLocation(), y1);
|
||||
string.horizontalAlignment = HorizontalAlignment.CENTER;
|
||||
string.verticallAlignment = VerticalAlignment.TOP;
|
||||
string.verticalAlignment = VerticalAlignment.TOP;
|
||||
strings.add(string);
|
||||
}
|
||||
}
|
||||
|
@ -253,7 +253,7 @@ public class HydroColorBarResource extends
|
|||
DrawableString string = new DrawableString(getDataInfo(), new RGB(250,
|
||||
250, 0));
|
||||
string.setCoordinates(xMin + padding, y1);
|
||||
string.verticallAlignment = VerticalAlignment.TOP;
|
||||
string.verticalAlignment = VerticalAlignment.TOP;
|
||||
target.drawStrings(string);
|
||||
|
||||
return yMax - legendHeight;
|
||||
|
|
|
@ -203,7 +203,7 @@ public class ArealFfgResource extends
|
|||
ds.setCoordinates(valueCoor.x, valueCoor.y);
|
||||
ds.font = font;
|
||||
ds.horizontalAlignment = HorizontalAlignment.CENTER;
|
||||
ds.verticallAlignment = VerticalAlignment.MIDDLE;
|
||||
ds.verticalAlignment = VerticalAlignment.MIDDLE;
|
||||
|
||||
stringList.add(ds);
|
||||
}
|
||||
|
|
|
@ -185,7 +185,7 @@ public class MPELegendResource extends
|
|||
double xLoc = xMin + offset + (cbarSize * i);
|
||||
strings.setText(entry.getText(), textColor);
|
||||
strings.horizontalAlignment = HorizontalAlignment.CENTER;
|
||||
strings.verticallAlignment = VerticalAlignment.TOP;
|
||||
strings.verticalAlignment = VerticalAlignment.TOP;
|
||||
strings.setCoordinates(xLoc, y1);
|
||||
target.drawStrings(strings);
|
||||
}
|
||||
|
@ -200,7 +200,7 @@ public class MPELegendResource extends
|
|||
strings.setText(rsc.getName(), textColor);
|
||||
double xLoc = xMin + padding;
|
||||
strings.horizontalAlignment = HorizontalAlignment.LEFT;
|
||||
strings.verticallAlignment = VerticalAlignment.TOP;
|
||||
strings.verticalAlignment = VerticalAlignment.TOP;
|
||||
strings.setCoordinates(xLoc, y1);
|
||||
target.drawStrings(strings);
|
||||
|
||||
|
|
|
@ -261,7 +261,7 @@ public class LPIResource extends
|
|||
string.setCoordinates(p.pixel[0] + offsetX, p.pixel[1]
|
||||
+ offsetY);
|
||||
string.horizontalAlignment = align;
|
||||
string.verticallAlignment = VerticalAlignment.MIDDLE;
|
||||
string.verticalAlignment = VerticalAlignment.MIDDLE;
|
||||
strings.add(string);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -433,7 +433,7 @@ public class DisplayMeanArealPrecipResource extends
|
|||
string.setText(area_id, txtcolor);
|
||||
string.setCoordinates(labelCoor.x, labelCoor.y);
|
||||
string.horizontalAlignment = HorizontalAlignment.LEFT;
|
||||
string.verticallAlignment = VerticalAlignment.TOP;
|
||||
string.verticalAlignment = VerticalAlignment.TOP;
|
||||
target.drawStrings(string);
|
||||
} catch (VizException e1) {
|
||||
// TODO Auto-generated catch block
|
||||
|
@ -445,7 +445,7 @@ public class DisplayMeanArealPrecipResource extends
|
|||
string.setText(valStr, txtcolor);
|
||||
string.setCoordinates(valueCoor.x, valueCoor.y);
|
||||
string.horizontalAlignment = HorizontalAlignment.LEFT;
|
||||
string.verticallAlignment = VerticalAlignment.TOP;
|
||||
string.verticalAlignment = VerticalAlignment.TOP;
|
||||
target.drawStrings(string);
|
||||
} catch (VizException e1) {
|
||||
// TODO Auto-generated catch block
|
||||
|
|
|
@ -458,7 +458,7 @@ public class MPEGageResource extends AbstractMPEInputResource implements
|
|||
string.font = font;
|
||||
string.basics.xOrColors = xor;
|
||||
string.horizontalAlignment = HorizontalAlignment.LEFT;
|
||||
string.verticallAlignment = VerticalAlignment.BOTTOM;
|
||||
string.verticalAlignment = VerticalAlignment.BOTTOM;
|
||||
|
||||
string.setCoordinates(
|
||||
point.x
|
||||
|
|
|
@ -322,7 +322,7 @@ public class MPELegendResource extends
|
|||
// strings.setText(entry.getText(), textColor);
|
||||
strings.setText(entry.getText(), textColor);
|
||||
strings.horizontalAlignment = HorizontalAlignment.CENTER;
|
||||
strings.verticallAlignment = VerticalAlignment.TOP;
|
||||
strings.verticalAlignment = VerticalAlignment.TOP;
|
||||
strings.setCoordinates(xLoc, y1);
|
||||
target.drawStrings(strings);
|
||||
}
|
||||
|
@ -376,7 +376,7 @@ public class MPELegendResource extends
|
|||
double xLoc = xMin + offsetForTypeString + (cbarSize * (index - 2));
|
||||
strings.setText(typeString, productTypeTextColor);
|
||||
strings.horizontalAlignment = HorizontalAlignment.CENTER;
|
||||
strings.verticallAlignment = VerticalAlignment.TOP;
|
||||
strings.verticalAlignment = VerticalAlignment.TOP;
|
||||
strings.setCoordinates(xLoc, y1);
|
||||
target.drawStrings(strings);
|
||||
}
|
||||
|
@ -404,7 +404,7 @@ public class MPELegendResource extends
|
|||
double xLoc = xMin + padding;
|
||||
strings.setText(qpeString, textColor);
|
||||
strings.horizontalAlignment = HorizontalAlignment.LEFT;
|
||||
strings.verticallAlignment = VerticalAlignment.TOP;
|
||||
strings.verticalAlignment = VerticalAlignment.TOP;
|
||||
strings.setCoordinates(xLoc, y1);
|
||||
target.drawStrings(strings);
|
||||
} else {
|
||||
|
@ -413,7 +413,7 @@ public class MPELegendResource extends
|
|||
strings.setText(fieldString, textColor);
|
||||
double xLoc = xMin + padding;
|
||||
strings.horizontalAlignment = HorizontalAlignment.LEFT;
|
||||
strings.verticallAlignment = VerticalAlignment.TOP;
|
||||
strings.verticalAlignment = VerticalAlignment.TOP;
|
||||
strings.setCoordinates(xLoc, y1);
|
||||
target.drawStrings(strings);
|
||||
}
|
||||
|
@ -466,7 +466,7 @@ public class MPELegendResource extends
|
|||
double xLoc = xMin + offset + (cbarSize * i);
|
||||
strings.setText(entry.getText(), textColor);
|
||||
strings.horizontalAlignment = HorizontalAlignment.CENTER;
|
||||
strings.verticallAlignment = VerticalAlignment.TOP;
|
||||
strings.verticalAlignment = VerticalAlignment.TOP;
|
||||
strings.setCoordinates(xLoc, y1);
|
||||
target.drawStrings(strings);
|
||||
}
|
||||
|
@ -481,7 +481,7 @@ public class MPELegendResource extends
|
|||
strings.setText(rsc.getName(), textColor);
|
||||
double xLoc = xMin + padding;
|
||||
strings.horizontalAlignment = HorizontalAlignment.LEFT;
|
||||
strings.verticallAlignment = VerticalAlignment.TOP;
|
||||
strings.verticalAlignment = VerticalAlignment.TOP;
|
||||
strings.setCoordinates(xLoc, y1);
|
||||
target.drawStrings(strings);
|
||||
} else {
|
||||
|
@ -495,7 +495,7 @@ public class MPELegendResource extends
|
|||
strings.setText(DrawDQCStations.qcmode, textColor);
|
||||
double xLoc = xMin + padding;
|
||||
strings.horizontalAlignment = HorizontalAlignment.LEFT;
|
||||
strings.verticallAlignment = VerticalAlignment.TOP;
|
||||
strings.verticalAlignment = VerticalAlignment.TOP;
|
||||
strings.setCoordinates(xLoc, y1);
|
||||
target.drawStrings(strings);
|
||||
}
|
||||
|
@ -507,7 +507,7 @@ public class MPELegendResource extends
|
|||
strings.setText(DrawDQCStations.qcmode, textColor);
|
||||
double xLoc = xMin + padding;
|
||||
strings.horizontalAlignment = HorizontalAlignment.LEFT;
|
||||
strings.verticallAlignment = VerticalAlignment.TOP;
|
||||
strings.verticalAlignment = VerticalAlignment.TOP;
|
||||
strings.setCoordinates(xLoc, y1);
|
||||
target.drawStrings(strings);
|
||||
}
|
||||
|
@ -583,7 +583,7 @@ public class MPELegendResource extends
|
|||
|
||||
strings.setText("Hrap x, y: ", textColor);
|
||||
strings.horizontalAlignment = HorizontalAlignment.LEFT;
|
||||
strings.verticallAlignment = VerticalAlignment.BOTTOM;
|
||||
strings.verticalAlignment = VerticalAlignment.BOTTOM;
|
||||
strings.setCoordinates(x, y);
|
||||
target.drawStrings(strings);
|
||||
x += target.getStringsBounds(strings).getWidth() * scale;
|
||||
|
@ -591,14 +591,14 @@ public class MPELegendResource extends
|
|||
String hrap = String.format("%4s, %4s", hrapX, hrapY);
|
||||
strings.setText(hrap, textColor);
|
||||
strings.horizontalAlignment = HorizontalAlignment.LEFT;
|
||||
strings.verticallAlignment = VerticalAlignment.BOTTOM;
|
||||
strings.verticalAlignment = VerticalAlignment.BOTTOM;
|
||||
strings.setCoordinates(x, y);
|
||||
target.drawStrings(strings);
|
||||
x += target.getStringsBounds(strings).getWidth() * scale;
|
||||
|
||||
strings.setText(" Lat, Lon: ", textColor);
|
||||
strings.horizontalAlignment = HorizontalAlignment.LEFT;
|
||||
strings.verticallAlignment = VerticalAlignment.BOTTOM;
|
||||
strings.verticalAlignment = VerticalAlignment.BOTTOM;
|
||||
strings.setCoordinates(x, y);
|
||||
target.drawStrings(strings);
|
||||
x += target.getStringsBounds(strings).getWidth() * scale;
|
||||
|
@ -606,49 +606,49 @@ public class MPELegendResource extends
|
|||
String latlon = String.format("%5s, %7s", lat, lon);
|
||||
strings.setText(latlon, textColor);
|
||||
strings.horizontalAlignment = HorizontalAlignment.LEFT;
|
||||
strings.verticallAlignment = VerticalAlignment.BOTTOM;
|
||||
strings.verticalAlignment = VerticalAlignment.BOTTOM;
|
||||
strings.setCoordinates(x, y);
|
||||
target.drawStrings(strings);
|
||||
x += target.getStringsBounds(strings).getWidth() * scale;
|
||||
|
||||
strings.setText(" Value: ", textColor);
|
||||
strings.horizontalAlignment = HorizontalAlignment.LEFT;
|
||||
strings.verticallAlignment = VerticalAlignment.BOTTOM;
|
||||
strings.verticalAlignment = VerticalAlignment.BOTTOM;
|
||||
strings.setCoordinates(x, y);
|
||||
target.drawStrings(strings);
|
||||
x += target.getStringsBounds(strings).getWidth() * scale;
|
||||
|
||||
strings.setText(value, textColor);
|
||||
strings.horizontalAlignment = HorizontalAlignment.LEFT;
|
||||
strings.verticallAlignment = VerticalAlignment.BOTTOM;
|
||||
strings.verticalAlignment = VerticalAlignment.BOTTOM;
|
||||
strings.setCoordinates(x, y);
|
||||
target.drawStrings(strings);
|
||||
x += target.getStringsBounds(strings).getWidth() * scale;
|
||||
|
||||
strings.setText(" County: ", textColor);
|
||||
strings.horizontalAlignment = HorizontalAlignment.LEFT;
|
||||
strings.verticallAlignment = VerticalAlignment.BOTTOM;
|
||||
strings.verticalAlignment = VerticalAlignment.BOTTOM;
|
||||
strings.setCoordinates(x, y);
|
||||
target.drawStrings(strings);
|
||||
x += target.getStringsBounds(strings).getWidth() * scale;
|
||||
|
||||
strings.setText(county, textColor);
|
||||
strings.horizontalAlignment = HorizontalAlignment.LEFT;
|
||||
strings.verticallAlignment = VerticalAlignment.BOTTOM;
|
||||
strings.verticalAlignment = VerticalAlignment.BOTTOM;
|
||||
strings.setCoordinates(x, y);
|
||||
target.drawStrings(strings);
|
||||
x += target.getStringsBounds(strings).getWidth() * scale;
|
||||
|
||||
strings.setText(" Basin: ", textColor);
|
||||
strings.horizontalAlignment = HorizontalAlignment.LEFT;
|
||||
strings.verticallAlignment = VerticalAlignment.BOTTOM;
|
||||
strings.verticalAlignment = VerticalAlignment.BOTTOM;
|
||||
strings.setCoordinates(x, y);
|
||||
target.drawStrings(strings);
|
||||
x += target.getStringsBounds(strings).getWidth() * scale;
|
||||
|
||||
strings.setText(basin, textColor);
|
||||
strings.horizontalAlignment = HorizontalAlignment.LEFT;
|
||||
strings.verticallAlignment = VerticalAlignment.BOTTOM;
|
||||
strings.verticalAlignment = VerticalAlignment.BOTTOM;
|
||||
strings.setCoordinates(x, y);
|
||||
target.drawStrings(strings);
|
||||
}
|
||||
|
|
|
@ -401,7 +401,7 @@ public class PointFreezePlotResource extends
|
|||
string.setText(tbuf, color);
|
||||
string.setCoordinates(xLoc, yLoc);
|
||||
string.horizontalAlignment = HorizontalAlignment.LEFT;
|
||||
string.verticallAlignment = VerticalAlignment.TOP;
|
||||
string.verticalAlignment = VerticalAlignment.TOP;
|
||||
target.drawStrings(string);
|
||||
if (i == find_station_flag) {
|
||||
find_station_flag = -1;
|
||||
|
@ -559,7 +559,7 @@ public class PointFreezePlotResource extends
|
|||
string.setText(label, color);
|
||||
string.setCoordinates(xLoc, yLoc);
|
||||
string.horizontalAlignment = HorizontalAlignment.LEFT;
|
||||
string.verticallAlignment = VerticalAlignment.BOTTOM;
|
||||
string.verticalAlignment = VerticalAlignment.BOTTOM;
|
||||
target.drawStrings(string);
|
||||
temp++;
|
||||
}
|
||||
|
|
|
@ -498,7 +498,7 @@ public class PointPrecipPlotResource extends
|
|||
|
||||
dstr.setText(tbuf, color);
|
||||
dstr.horizontalAlignment = HorizontalAlignment.LEFT;
|
||||
dstr.verticallAlignment = VerticalAlignment.TOP;
|
||||
dstr.verticalAlignment = VerticalAlignment.TOP;
|
||||
// orig code
|
||||
// dstr.setCoordinates(xc + (.75 * padding) + (text_width * scale),
|
||||
// yc
|
||||
|
@ -794,7 +794,7 @@ public class PointPrecipPlotResource extends
|
|||
string.setText(label, color);
|
||||
string.setCoordinates(xLoc, yLoc);
|
||||
string.horizontalAlignment = HorizontalAlignment.LEFT;
|
||||
string.verticallAlignment = VerticalAlignment.BOTTOM;
|
||||
string.verticalAlignment = VerticalAlignment.BOTTOM;
|
||||
target.drawStrings(string);
|
||||
}
|
||||
target.drawLine(lines);
|
||||
|
|
|
@ -631,7 +631,7 @@ public class PointTempPlotResource extends
|
|||
string.setText(label, color);
|
||||
string.setCoordinates(xLoc, yLoc);
|
||||
string.horizontalAlignment = HorizontalAlignment.LEFT;
|
||||
string.verticallAlignment = VerticalAlignment.BOTTOM;
|
||||
string.verticalAlignment = VerticalAlignment.BOTTOM;
|
||||
target.drawStrings(string);
|
||||
temp++;
|
||||
}
|
||||
|
|
|
@ -401,7 +401,7 @@ public class RadarCoverageResource extends
|
|||
string.setCoordinates(screenExtent.getMinX() + 50,
|
||||
screenExtent.getMinY() + 50);
|
||||
string.horizontalAlignment = HorizontalAlignment.LEFT;
|
||||
string.verticallAlignment = VerticalAlignment.TOP;
|
||||
string.verticalAlignment = VerticalAlignment.TOP;
|
||||
target.drawStrings(string);
|
||||
|
||||
if (missingData) {
|
||||
|
|
|
@ -1331,7 +1331,7 @@ public class RadarGraphicsPage implements IRenderable {
|
|||
DrawableString string = new DrawableString(str, this.color);
|
||||
string.font = this.font;
|
||||
string.setCoordinates(x, y);
|
||||
string.verticallAlignment = VerticalAlignment.TOP;
|
||||
string.verticalAlignment = VerticalAlignment.TOP;
|
||||
target.getExtension(ICanvasRenderingExtension.class)
|
||||
.drawStrings(paintProps, string);
|
||||
}
|
||||
|
|
|
@ -227,14 +227,14 @@ public class RadarGraphicsResource extends AbstractRadarResource<MapDescriptor>
|
|||
ColorableCapability.class).getColor());
|
||||
offscreen.setCoordinates(xPos, yPos);
|
||||
offscreen.horizontalAlignment = HorizontalAlignment.CENTER;
|
||||
offscreen.verticallAlignment = VerticalAlignment.MIDDLE;
|
||||
offscreen.verticalAlignment = VerticalAlignment.MIDDLE;
|
||||
|
||||
DrawableString notShown = new DrawableString(filteredCount
|
||||
+ " FEATURES NOT SHOWN", this.getCapability(
|
||||
ColorableCapability.class).getColor());
|
||||
notShown.setCoordinates(xPos, yPos + 20);
|
||||
notShown.horizontalAlignment = HorizontalAlignment.CENTER;
|
||||
notShown.verticallAlignment = VerticalAlignment.MIDDLE;
|
||||
notShown.verticalAlignment = VerticalAlignment.MIDDLE;
|
||||
target.getExtension(ICanvasRenderingExtension.class)
|
||||
.drawStrings(paintProps, offscreen, notShown);
|
||||
} finally {
|
||||
|
|
|
@ -220,7 +220,7 @@ public class RadarMLResource extends RadarGraphicsResource {
|
|||
DrawableString info = new DrawableString(text, rgbs);
|
||||
info.font = textFont;
|
||||
info.horizontalAlignment = HorizontalAlignment.LEFT;
|
||||
info.verticallAlignment = VerticalAlignment.TOP;
|
||||
info.verticalAlignment = VerticalAlignment.TOP;
|
||||
info.setCoordinates(extent.getMinX() + X_OFFSET * ratio,
|
||||
extent.getMinY() + Y_OFFSET * ratio);
|
||||
target.drawStrings(info);
|
||||
|
|
|
@ -255,7 +255,7 @@ public class CellTrendGraph extends XYGraph {
|
|||
strings[i] = new DrawableString(dataSeriesLabels.get(i),
|
||||
colorCap.getColor());
|
||||
strings[i].setCoordinates(labelx[i] + offset, labely[i]);
|
||||
strings[i].verticallAlignment = VerticalAlignment.MIDDLE;
|
||||
strings[i].verticalAlignment = VerticalAlignment.MIDDLE;
|
||||
}
|
||||
|
||||
target.drawLine(lines.toArray(new DrawableLine[0]));
|
||||
|
|
|
@ -143,7 +143,7 @@ public class RadarGSMResource extends AbstractRadarResource<RadarXYDescriptor> {
|
|||
string.setCoordinates(400, yOffset);
|
||||
string.addTextStyle(TextStyle.BOXED);
|
||||
string.horizontalAlignment = HorizontalAlignment.CENTER;
|
||||
string.verticallAlignment = VerticalAlignment.TOP;
|
||||
string.verticalAlignment = VerticalAlignment.TOP;
|
||||
target.drawStrings(string);
|
||||
|
||||
yOffset += 40;
|
||||
|
@ -439,7 +439,7 @@ public class RadarGSMResource extends AbstractRadarResource<RadarXYDescriptor> {
|
|||
DrawableString string = new DrawableString(text, color);
|
||||
string.font = (IFont) Font.getFont("serif");
|
||||
string.setCoordinates(xOffset, yOffset);
|
||||
string.verticallAlignment = VerticalAlignment.TOP;
|
||||
string.verticalAlignment = VerticalAlignment.TOP;
|
||||
target.drawStrings(string);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -303,7 +303,7 @@ public class RadarXYResource extends RadarImageResource<RadarXYDescriptor> {
|
|||
string.setCoordinates((c.x + X_OFFSET_NWP) * SCALAR,
|
||||
(c.y + Y_OFFSET_NWP) * SCALAR, 0.0);
|
||||
string.horizontalAlignment = HorizontalAlignment.LEFT;
|
||||
string.verticallAlignment = VerticalAlignment.TOP;
|
||||
string.verticalAlignment = VerticalAlignment.TOP;
|
||||
strings.add(string);
|
||||
}
|
||||
target.drawStrings(strings);
|
||||
|
|
|
@ -516,7 +516,7 @@ public class RedbookFrame implements IRenderable {
|
|||
dstring.setCoordinates(x, y);
|
||||
dstring.font = font;
|
||||
dstring.horizontalAlignment = HorizontalAlignment.LEFT;
|
||||
dstring.verticallAlignment = top ? VerticalAlignment.TOP
|
||||
dstring.verticalAlignment = top ? VerticalAlignment.TOP
|
||||
: VerticalAlignment.BOTTOM;
|
||||
Rectangle2D bounds = target.getStringsBounds(dstring);
|
||||
if (blanked) {
|
||||
|
|
|
@ -1865,7 +1865,7 @@ public class WarngenLayer extends AbstractStormTrackResource {
|
|||
string.magnification = magnification;
|
||||
string.setCoordinates(out[0], out[1]);
|
||||
string.horizontalAlignment = IGraphicsTarget.HorizontalAlignment.CENTER;
|
||||
string.verticallAlignment = IGraphicsTarget.VerticalAlignment.MIDDLE;
|
||||
string.verticalAlignment = IGraphicsTarget.VerticalAlignment.MIDDLE;
|
||||
strings.add(string);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -427,7 +427,7 @@ public abstract class AbstractWWAResource extends
|
|||
params.font = warningsFont;
|
||||
params.setCoordinates(d[0], d[1]);
|
||||
params.horizontalAlignment = HorizontalAlignment.RIGHT;
|
||||
params.verticallAlignment = VerticalAlignment.BOTTOM;
|
||||
params.verticalAlignment = VerticalAlignment.BOTTOM;
|
||||
params.magnification = getCapability(
|
||||
MagnificationCapability.class).getMagnification();
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<property name="build.ws"
|
||||
value="gtk" />
|
||||
<property name="build.arch"
|
||||
value="x86" />
|
||||
value="x86_86" />
|
||||
<property name="lightning"
|
||||
value="false" />
|
||||
|
||||
|
@ -53,43 +53,6 @@
|
|||
<param name="feature"
|
||||
value="com.raytheon.uf.edex.dataplugins.feature" />
|
||||
</antcall>
|
||||
<antcall target="build">
|
||||
<param name="feature"
|
||||
value="com.raytheon.uf.edex.registry.request.feature" />
|
||||
</antcall>
|
||||
<antcall target="build">
|
||||
<param name="feature"
|
||||
value="edu.wisc.ssec.cimss.edex.convectprob.feature" />
|
||||
</antcall>
|
||||
<!--
|
||||
<antcall target="build">
|
||||
<param name="feature"
|
||||
value="gov.noaa.nws.crh.edex.grib.decoderpostprocessor.feature" />
|
||||
</antcall>
|
||||
-->
|
||||
<antcall target="build">
|
||||
<param name="feature"
|
||||
value="gov.noaa.nws.obs.edex.geodb.feature" />
|
||||
</antcall>
|
||||
<antcall target="build">
|
||||
<param name="feature"
|
||||
value="gov.noaa.nws.sr.oun.edex.mping.feature" />
|
||||
</antcall>
|
||||
<!--
|
||||
<antcall target="build">
|
||||
<param name="feature"
|
||||
value="com.raytheon.uf.edex.datadelivery.feature" />
|
||||
</antcall>
|
||||
<antcall target="build">
|
||||
<param name="feature"
|
||||
value="com.raytheon.uf.edex.ogc.feature" />
|
||||
</antcall>
|
||||
|
||||
<antcall target="build">
|
||||
<param name="feature"
|
||||
value="com.raytheon.uf.edex.hazards.feature" />
|
||||
</antcall>
|
||||
-->
|
||||
<antcall target="build">
|
||||
<param name="feature"
|
||||
value="com.raytheon.uf.edex.bufr.feature" />
|
||||
|
@ -98,6 +61,12 @@
|
|||
<param name="feature"
|
||||
value="com.raytheon.uf.edex.grid.feature" />
|
||||
</antcall>
|
||||
<!--
|
||||
<antcall target="build">
|
||||
<param name="feature"
|
||||
value="com.raytheon.uf.edex.ohd.feature" />
|
||||
</antcall>
|
||||
-->
|
||||
<antcall target="build">
|
||||
<param name="feature"
|
||||
value="com.raytheon.uf.edex.archive.feature" />
|
||||
|
@ -110,10 +79,18 @@
|
|||
<param name="feature"
|
||||
value="com.raytheon.uf.edex.satellite.feature" />
|
||||
</antcall>
|
||||
<antcall target="build">
|
||||
<param name="feature"
|
||||
value="com.raytheon.uf.edex.goesr.feature" />
|
||||
</antcall>
|
||||
<antcall target="build">
|
||||
<param name="feature"
|
||||
value="com.raytheon.uf.edex.gfe.feature" />
|
||||
</antcall>
|
||||
<antcall target="build">
|
||||
<param name="feature"
|
||||
value="com.raytheon.uf.edex.hydro.feature" />
|
||||
</antcall>
|
||||
<antcall target="build">
|
||||
<param name="feature"
|
||||
value="com.raytheon.uf.edex.radar.feature" />
|
||||
|
@ -130,10 +107,6 @@
|
|||
<param name="feature"
|
||||
value="com.raytheon.uf.edex.ncep.nco.feature" />
|
||||
</antcall>
|
||||
<antcall target="build">
|
||||
<param name="feature"
|
||||
value="com.raytheon.uf.edex.binlightning.feature" />
|
||||
</antcall>
|
||||
<antcall target="build">
|
||||
<param name="feature"
|
||||
value="com.raytheon.uf.edex.ost.feature" />
|
||||
|
@ -160,15 +133,12 @@
|
|||
</antcall>
|
||||
<antcall target="build">
|
||||
<param name="feature"
|
||||
value="com.raytheon.uf.edex.goesr.feature" />
|
||||
value="com.raytheon.uf.edex.binlightning.feature" />
|
||||
</antcall>
|
||||
<!-- optionali, but should confirm they build and install -->
|
||||
<!--
|
||||
<antcall target="build">
|
||||
<param name="feature"
|
||||
value="com.raytheon.uf.edex.ohd.feature" />
|
||||
value="gov.noaa.nws.obs.edex.geodb.feature" />
|
||||
</antcall>
|
||||
-->
|
||||
|
||||
</target>
|
||||
|
||||
|
|
|
@ -1,223 +0,0 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.uf.edex.ndm.dataplugin.subscriber;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileReader;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStreamWriter;
|
||||
|
||||
import com.raytheon.uf.common.localization.ILocalizationFile;
|
||||
import com.raytheon.uf.common.localization.IPathManager;
|
||||
import com.raytheon.uf.common.localization.LocalizationContext;
|
||||
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel;
|
||||
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationType;
|
||||
import com.raytheon.uf.common.localization.PathManagerFactory;
|
||||
import com.raytheon.uf.common.localization.exception.LocalizationException;
|
||||
import com.raytheon.uf.common.pointdata.vadriver.VA_Driver;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.edex.ndm.ingest.INationalDatasetSubscriber;
|
||||
import com.raytheon.uf.edex.plugin.modelsounding.decoder.ModelSoundingDataAdapter;
|
||||
|
||||
/**
|
||||
* Subscriber to update the local model sounding sites whenever the national spi
|
||||
* file changes.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------- -------- ----------- --------------------------
|
||||
* Jan 29, 2011 bfarmer Initial creation
|
||||
* Dec 02, 2013 2537 bsteffen Ensure streams are closed.
|
||||
* Mar 06, 2014 2876 mpduff New NDM plugin.
|
||||
* Mar 02, 2016 5434 bkowal Relocated to ndm dataplugin.
|
||||
* Jul 11, 2016 5744 mapeters Save to common_static (not edex_static)
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bfarmer
|
||||
*/
|
||||
|
||||
public class ModelBufrSubscriber implements INationalDatasetSubscriber {
|
||||
|
||||
private static final String MODEL_STATION_LIST = ModelSoundingDataAdapter.MODEL_STATION_LIST;
|
||||
|
||||
private static final String MODEL_STATION_INFO = "modelBufrStationInfo.txt";
|
||||
|
||||
private static final String MODEL_GOODNESS = "modelBufr.goodness";
|
||||
|
||||
private static final IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(ModelBufrSubscriber.class);
|
||||
|
||||
@Override
|
||||
public void notify(String fileName, File file) {
|
||||
|
||||
statusHandler.handle(Priority.EVENTA,
|
||||
"modelBufr:Processing input file [" + fileName + "]");
|
||||
|
||||
if ("modelBufr.spi".equals(fileName)) {
|
||||
IPathManager pathMgr = PathManagerFactory.getPathManager();
|
||||
LocalizationContext lc = pathMgr.getContext(
|
||||
LocalizationType.COMMON_STATIC, LocalizationLevel.SITE);
|
||||
ILocalizationFile outLocFile = pathMgr.getLocalizationFile(lc,
|
||||
ModelSoundingDataAdapter.SPI_FILE);
|
||||
saveFile(file, outLocFile);
|
||||
ModelSoundingDataAdapter.updateSPIData();
|
||||
} else if (MODEL_STATION_LIST.equals(fileName)
|
||||
|| MODEL_STATION_INFO.equals(fileName)) {
|
||||
// Both are saved as MODEL_STATION_LIST in localization
|
||||
processModelStationTxtFile(file);
|
||||
}
|
||||
}
|
||||
|
||||
private void processModelStationTxtFile(File file) {
|
||||
IPathManager pathMgr = PathManagerFactory.getPathManager();
|
||||
LocalizationContext lc = pathMgr.getContext(
|
||||
LocalizationType.COMMON_STATIC, LocalizationLevel.SITE);
|
||||
ILocalizationFile outLocFile = pathMgr.getLocalizationFile(lc,
|
||||
MODEL_STATION_LIST);
|
||||
File goodnessFile = pathMgr.getFile(lc, MODEL_GOODNESS);
|
||||
saveFile(file, outLocFile);
|
||||
generateSPI(file, goodnessFile);
|
||||
|
||||
File spiFile = pathMgr.getFile(lc, ModelSoundingDataAdapter.SPI_FILE);
|
||||
if (!spiFile.exists()) {
|
||||
try {
|
||||
spiFile.createNewFile();
|
||||
} catch (IOException e) {
|
||||
statusHandler.handle(
|
||||
Priority.SIGNIFICANT,
|
||||
"modelBufr:Could not create spiFile file: "
|
||||
+ spiFile.getName(), e);
|
||||
}
|
||||
}
|
||||
|
||||
VA_Driver driver = new VA_Driver();
|
||||
driver.setWeight(0.5f);
|
||||
driver.vaStationsFile(goodnessFile, null, spiFile);
|
||||
// updateStationList will reload spi files also
|
||||
ModelSoundingDataAdapter.update();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param file
|
||||
* @param goodnessFile
|
||||
*/
|
||||
private void generateSPI(File file, File goodnessFile) {
|
||||
String line;
|
||||
String[] splitLine;
|
||||
try {
|
||||
try (BufferedReader fis = new BufferedReader(new FileReader(file));
|
||||
BufferedWriter fos = new BufferedWriter(new FileWriter(
|
||||
goodnessFile))) {
|
||||
while ((line = fis.readLine()) != null) {
|
||||
if (line.length() > 0) {
|
||||
// check for commented lines
|
||||
if ('#' != line.charAt(0)) {
|
||||
try {
|
||||
splitLine = line.split("\\|");
|
||||
Integer elevation;
|
||||
Double latitude;
|
||||
Double longitude;
|
||||
String cause = "elevation";
|
||||
try {
|
||||
elevation = Integer.parseInt(splitLine[4]
|
||||
.trim());
|
||||
cause = "latitude";
|
||||
latitude = Double.parseDouble(splitLine[2]
|
||||
.trim());
|
||||
cause = "longitude";
|
||||
longitude = Double.parseDouble(splitLine[3]
|
||||
.trim());
|
||||
} catch (NumberFormatException nfe) {
|
||||
String err = String
|
||||
.format("modelBufr:Invalid %s in data line [%s]",
|
||||
cause, line);
|
||||
statusHandler.handle(Priority.PROBLEM, err);
|
||||
continue;
|
||||
}
|
||||
String stationName = splitLine[1].trim();
|
||||
fos.write("0 ");
|
||||
fos.write(stationName);
|
||||
fos.write(String.format(" %8.4f %9.4f %5d %9d",
|
||||
latitude, longitude, elevation, 0));
|
||||
fos.newLine();
|
||||
} catch (Exception e) {
|
||||
String err = String.format(
|
||||
"modelBufr:Error in data line [%s]",
|
||||
line);
|
||||
statusHandler.handle(Priority.PROBLEM, err, e);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
statusHandler.handle(Priority.SIGNIFICANT,
|
||||
"modelBufr:Could not read File ", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Save the contents of the given File to the given ILocalizationFile
|
||||
*
|
||||
* @param file
|
||||
* @param outFile
|
||||
*/
|
||||
private void saveFile(File file, ILocalizationFile outFile) {
|
||||
if ((file != null) && file.exists()) {
|
||||
try (BufferedReader fis = new BufferedReader(new FileReader(file));
|
||||
BufferedWriter fos = new BufferedWriter(
|
||||
new OutputStreamWriter(outFile.openOutputStream()))) {
|
||||
String line = null;
|
||||
try {
|
||||
while ((line = fis.readLine()) != null) {
|
||||
fos.write(line);
|
||||
fos.newLine();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
"Could not read file: " + file.getName(), e);
|
||||
|
||||
}
|
||||
} catch (FileNotFoundException e) {
|
||||
statusHandler.handle(Priority.PROBLEM, "Failed to find file: "
|
||||
+ file.getName(), e);
|
||||
} catch (LocalizationException e) {
|
||||
statusHandler.handle(
|
||||
Priority.PROBLEM,
|
||||
"Failed to open output stream for file: "
|
||||
+ outFile.getPath(), e);
|
||||
} catch (IOException e) {
|
||||
// Error occurred closing fis/fos, ignore
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -68,7 +68,7 @@ import com.raytheon.uf.edex.plugin.modelsounding.common.SoundingModels;
|
|||
* Sep 16, 2014 3628 mapeters Replaced static imports.
|
||||
* Jul 12, 2016 5744 mapeters SoundingStations constructor no longer takes
|
||||
* path parameter
|
||||
* Mar 14, 2017 mjames Remove spi file spatial filter.
|
||||
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -81,10 +81,41 @@ public class ModelSoundingDataAdapter {
|
|||
|
||||
private static final Object LOCK = new Object();
|
||||
|
||||
public static final String SPI_FILE = "basemaps" + IPathManager.SEPARATOR
|
||||
+ "modelBufr.spi";
|
||||
|
||||
public static final String MODEL_STATION_LIST = "modelBufrStationList.txt";
|
||||
|
||||
private static SoundingStations stationsList = new SoundingStations(
|
||||
MODEL_STATION_LIST);
|
||||
private static SoundingStations stationsList = new SoundingStations();
|
||||
|
||||
private static SPIContainer SPI_DATA = populateSPIData();
|
||||
|
||||
public static void updateSPIData() {
|
||||
SPIContainer spi = populateSPIData();
|
||||
synchronized (LOCK) {
|
||||
if ((spi != null) && (spi.isLoaded())) {
|
||||
SPI_DATA = spi;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void updateStationList() {
|
||||
SoundingStations ss = new SoundingStations();
|
||||
synchronized (LOCK) {
|
||||
stationsList = ss;
|
||||
}
|
||||
}
|
||||
|
||||
public static void update() {
|
||||
SoundingStations ss = new SoundingStations();
|
||||
SPIContainer spi = populateSPIData();
|
||||
synchronized (LOCK) {
|
||||
stationsList = ss;
|
||||
if ((spi != null) && (spi.isLoaded())) {
|
||||
SPI_DATA = spi;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the temporal and model information.
|
||||
|
@ -487,4 +518,29 @@ public class ModelSoundingDataAdapter {
|
|||
return retValue;
|
||||
}
|
||||
|
||||
private static SPIContainer populateSPIData() {
|
||||
SPIContainer container = null;
|
||||
|
||||
PathManager pathMgr = (PathManager) PathManagerFactory.getPathManager();
|
||||
|
||||
LocalizationContext ctx = pathMgr.getContext(
|
||||
LocalizationType.COMMON_STATIC, LocalizationLevel.SITE);
|
||||
String site = ctx.getContextName();
|
||||
|
||||
logger.info("Loading " + SPI_FILE + " for site [" + site + "]");
|
||||
|
||||
File srcFile = pathMgr.getFile(ctx, SPI_FILE);
|
||||
|
||||
container = new SPIContainer(srcFile);
|
||||
if (container.isLoaded()) {
|
||||
logger.info("Loading " + SPI_FILE + " for site [" + site
|
||||
+ "] Successful");
|
||||
} else {
|
||||
logger.error("Loading " + SPI_FILE + " for site [" + site
|
||||
+ "] failed");
|
||||
}
|
||||
|
||||
return container;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -10,7 +10,8 @@ Require-Bundle: com.raytheon.edex.common,
|
|||
javax.measure,
|
||||
javax.persistence,
|
||||
com.raytheon.uf.common.dataplugin.satellite;bundle-version="1.0.0",
|
||||
com.raytheon.edex.plugin.satellite;bundle-version="1.12.1174"
|
||||
com.raytheon.edex.plugin.satellite;bundle-version="1.12.1174",
|
||||
org.apache.commons.codec;bundle-version="1.10.0"
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
||||
Import-Package: com.raytheon.uf.common.localization,
|
||||
com.raytheon.uf.common.menus,
|
||||
|
|
|
@ -153,40 +153,21 @@ if [ "${1}" = "-edex" ]; then
|
|||
fi
|
||||
|
||||
if [ "${1}" = "-rh6" ]; then
|
||||
buildEDEX
|
||||
buildRPM "awips2"
|
||||
buildRPM "awips2-java"
|
||||
buildRPM "awips2-pypies"
|
||||
buildRPM "awips2-python"
|
||||
buildRPM "awips2-python-nose"
|
||||
buildRPM "awips2-python-qpid"
|
||||
buildRPM "awips2-python-werkzeug"
|
||||
buildRPM "awips2-python-numpy"
|
||||
buildRPM "awips2-python-pupynere"
|
||||
buildRPM "awips2-python-h5py"
|
||||
buildRPM "awips2-python-matplotlib"
|
||||
buildRPM "awips2-python-scientific"
|
||||
buildRPM "awips2-python-scipy"
|
||||
buildRPM "awips2-python-tables"
|
||||
buildRPM "awips2-python-pmw"
|
||||
buildRPM "awips2-python-tpg"
|
||||
buildRPM "awips2-python-awips"
|
||||
buildRPM "awips2-python-shapely"
|
||||
buildRPM "awips2-python-jep"
|
||||
buildRPM "awips2-python-dateutil"
|
||||
buildRPM "awips2-python-pytz"
|
||||
buildRPM "awips2-python-six"
|
||||
buildRPM "awips2-python-pyparsing"
|
||||
buildRPM "awips2-python-setuptools"
|
||||
buildRPM "awips2-ldm"
|
||||
buildRPM "awips2-tools"
|
||||
buildRPM "awips2-notification"
|
||||
#buildEDEX
|
||||
#buildRPM "awips2"
|
||||
#buildRPM "awips2-java"
|
||||
#buildRPM "awips2-pypies"
|
||||
#buildRPM "awips2-python-awips"
|
||||
#buildRPM "awips2-python-jep"
|
||||
#buildRPM "awips2-ldm"
|
||||
#buildRPM "awips2-tools"
|
||||
#buildRPM "awips2-notification"
|
||||
buildRPM "awips2-hydroapps-shared"
|
||||
buildRPM "awips2-postgresql"
|
||||
buildRPM "awips2-common-base"
|
||||
#buildRPM "awips2-ant"
|
||||
#buildRPM "awips2-maven"
|
||||
#buildRPM "awips2-eclipse"
|
||||
buildRPM "awips2-ant"
|
||||
buildRPM "awips2-maven"
|
||||
buildRPM "awips2-eclipse"
|
||||
buildRPM "awips2-httpd-pypies"
|
||||
buildRPM "awips2-qpid-lib"
|
||||
buildRPM "awips2-qpid-java"
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#!/bin/bash -v
|
||||
set -xe
|
||||
if [ ${2} = "buildCAVE"]; then
|
||||
#if [ ${2} = "buildCAVE"]; then
|
||||
rm -rf /awips2/jenkins/buildspace/workspace/AWIPS2-UPC_build/baseline/
|
||||
fi
|
||||
#fi
|
||||
export JENKINS_WORKSPACE=/awips2/repo/awips2-builds
|
||||
|
||||
# determine where we are ...
|
||||
|
|
|
@ -7,25 +7,17 @@ javaUtilities/* rpms pythonPackages nativeLib/*
|
|||
../awips2-core/viz/*
|
||||
../awips2-core-foss/lib/*
|
||||
../awips2-foss/lib/*
|
||||
../awips2-ohd/lib/*
|
||||
../awips2-ohd/edex/*
|
||||
../awips2-ohd/features/*
|
||||
../awips2-rpm/foss
|
||||
../awips2-rpm/installers
|
||||
../awips2-nws/common/*
|
||||
../awips2-nws/viz/*
|
||||
../awips2-nws/features/*
|
||||
../awips2-nws/edex/*
|
||||
../awips2-ncep/common/*
|
||||
../awips2-ncep/viz/*
|
||||
../awips2-ncep/features/*
|
||||
../awips2-ncep/edex/*
|
||||
../awips2-gsd/features/*
|
||||
../awips2-gsd/viz/*
|
||||
../awips2-cimss/viz/*
|
||||
../awips2-cimss/features/*
|
||||
../awips2-cimss/common/*
|
||||
../awips2-cimss/edex/*
|
||||
../awips2-goesr/cave/*
|
||||
../awips2-goesr/edexOsgi/*
|
||||
../awips2-drawing/viz/*
|
||||
../awips2-drawing/features/*
|
||||
../awips2-nws/common/*
|
||||
../awips2-nws/edex/*
|
||||
../awips2-nws/features/*
|
||||
|
|
Loading…
Add table
Reference in a new issue