13.5.2-5 baseline

Former-commit-id: dc60765dcb [formerly 31111f4f52] [formerly 0745317d53] [formerly dc60765dcb [formerly 31111f4f52] [formerly 0745317d53] [formerly 67cceefe5d [formerly 0745317d53 [formerly ed50e9426fd099fd9336b7bfc8d0c5c35f8500f4]]]]
Former-commit-id: 67cceefe5d
Former-commit-id: 4c4dd59711 [formerly c8ead44672] [formerly 738f26259951c00c72cc70df42f55b887349b3ef [formerly 6202bacae1]]
Former-commit-id: e26890a39b824d77b4f4c3c0acd1eed489865f1e [formerly c79546c83a]
Former-commit-id: fb70a4b4b0
This commit is contained in:
Steve Harris 2013-09-16 10:14:25 -04:00
parent 3a21a9eb6c
commit bbbcc661b7
13 changed files with 283 additions and 168 deletions

View file

@ -34,6 +34,8 @@ import java.util.List;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jul 24, 2013 2189 mschenke Initial creation
* Sep 13, 2013 16581 kshrestha Variables scaleFont and smoothing
* initialized to true.
*
* </pre>
*
@ -45,9 +47,9 @@ public abstract class AbstractAWTFont implements IFont {
protected Font font;
protected boolean scaleFont;
protected boolean scaleFont = true;
protected boolean smoothing;
protected boolean smoothing = true;
protected AbstractAWTFont(String fontName, float fontSize, Style[] styles) {
this(new Font(fontName, toAwtStyle(styles), (int) fontSize));

View file

@ -68,6 +68,8 @@ import com.vividsolutions.jts.geom.Coordinate;
* Aug 27, 2013 #2287 randerso Replaced hard coded constant with densityFactor
* parameter to allow application specific density
* scaling to better match A1 displays
* Sep 10, 2013 DR 16257 MPorricelli Fix so that wind for global grids displays on
* mercator maps.
*
* </pre>
*
@ -215,14 +217,31 @@ public abstract class AbstractGriddedDisplay<T> implements IRenderable {
// space
// Linear distance(between (0,0) and (0,1) makes more sense but
// looks to sparse.
DirectPosition2D p1 = new DirectPosition2D(0, 0);
DirectPosition2D p2 = new DirectPosition2D(1, 1);
try {
grid2grid.transform(p1, p1);
grid2grid.transform(p2, p2);
} catch (TransformException e) {
throw new VizException(e);
}
DirectPosition2D p1 = new DirectPosition2D();
DirectPosition2D p2 = new DirectPosition2D();
boolean doneTryingCoords = false;
int i = -1;
// starting with coords (0,0), (1,1), try until tranform succeeds,
// or until have gone through a set of diagonal coords
do {
try {
i++;
if (i + 1 < gridDims[0] && i + 1 < gridDims[1]) {
p1.x = p1.y = i;
p2.x = p2.y = i + 1;
grid2grid.transform(p1, p1);
grid2grid.transform(p2, p2);
doneTryingCoords = true;
}
} catch (TransformException e) {
if (i + 1 >= gridDims[0] || i + 1 >= gridDims[1]) {
doneTryingCoords = true;
throw new VizException(e);
}
}
} while (!doneTryingCoords);
pixelSize = p1.distance(p2);
IExtent viewPixelExtent = paintProps.getView().getExtent();

View file

@ -61,6 +61,10 @@ import com.vividsolutions.jts.geom.Coordinate;
* adjustment of density.
* Added gridRelative flag to indicate whether direction
* data is relative to grid or true north
* Sep 9, 2013 DR16257 MPorricelli When setDestinationGeographicPoint fails (which can
* happen for global lat/lon grid winds displayed on
* Equidistant Cylindrical map) try again with different
* pixel location.
*
* </pre>
*
@ -157,7 +161,7 @@ public class GriddedVectorDisplay extends AbstractGriddedDisplay<Coordinate> {
if (Float.isNaN(spd) || Float.isNaN(dir)) {
return;
}
int tryDiffPixLoc = 0;
try {
ReferencedCoordinate rCoord = new ReferencedCoordinate(
gridGeometryOfGrid, ijcoord);
@ -169,12 +173,24 @@ public class GriddedVectorDisplay extends AbstractGriddedDisplay<Coordinate> {
if (stationPixelLocation != null) {
stationPixelLocation[1]--;
double[] newWorldLocation = this.descriptor
.pixelToWorld(stationPixelLocation);
this.gc.setStartingGeographicPoint(stationLocation[0],
stationLocation[1]);
this.gc.setDestinationGeographicPoint(newWorldLocation[0],
newWorldLocation[1]);
do {
try {
double[] newWorldLocation = this.descriptor
.pixelToWorld(stationPixelLocation);
this.gc.setStartingGeographicPoint(stationLocation[0],
stationLocation[1]);
this.gc.setDestinationGeographicPoint(
newWorldLocation[0], newWorldLocation[1]);
tryDiffPixLoc = 2; // setting of pts succeeded; do not need to try again
} catch (Exception e2) {
if (tryDiffPixLoc == 0) { // setting of points failed first time through
stationPixelLocation[1] += 2; // try pixel location in opposite dir of 1st try
tryDiffPixLoc++;
} else
throw new VizException(e2); // failed on second try; give up
}
} while (tryDiffPixLoc < 2);
}
if (gridRelative) {
@ -185,6 +201,7 @@ public class GriddedVectorDisplay extends AbstractGriddedDisplay<Coordinate> {
// rotate dir from true north to display up
dir -= this.gc.getAzimuth();
} catch (Exception e) {
throw new VizException(e);
}

View file

@ -44,6 +44,10 @@ import org.opengis.referencing.operation.TransformException;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Oct 13, 2011 bsteffen Initial creation
* Sep 10, 2013 DR 16257 MPorricelli Eliminate values that
* fail to be tranformed,e.g.
* when too close to pole for
* mercator projections
*
* </pre>
*
@ -146,7 +150,19 @@ public class PlotLocationCache {
ConcatenatedTransform.create(grid2crs, crs2crs),
crs2grid);
grid2grid.transform(result, 0, result, 0, xDim * yDim);
try {
grid2grid.transform(result, 0, result, 0, xDim * yDim);
} catch (TransformException e1) {
// Set values to NaN when fail transform
for (int i = 0; i < result.length; i += 2) {
try {
grid2grid.transform(result, i, result, i, 1);
} catch (TransformException e2) {
result[i] = Float.NaN;
result[i + 1] = Float.NaN;
}
}
}
} catch (FactoryException e) {
throw new RuntimeException(e);
} catch (InvalidGridGeometryException e) {

View file

@ -27,6 +27,7 @@ import com.raytheon.uf.common.activetable.ActiveTableMode;
import com.raytheon.uf.common.activetable.ActiveTableRecord;
import com.raytheon.uf.common.activetable.GetActiveTableRequest;
import com.raytheon.uf.common.activetable.GetActiveTableResponse;
import com.raytheon.uf.common.dataplugin.warning.EmergencyType;
import com.raytheon.uf.common.dataplugin.warning.WarningRecord.WarningAction;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
@ -48,6 +49,7 @@ import com.raytheon.viz.texteditor.util.VtecUtil;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jul 23, 2013 2176 jsanchez Initial creation
* Sep 4, 2013 2176 jsanchez Moved EmergencyType to a public class.
*
* </pre>
*
@ -62,38 +64,6 @@ public class EmergencyConfirmationMsg implements IWarnGenConfirmationable {
private String productMessage;
private static class EmergencyType {
private static final EmergencyType TORNADO = new EmergencyType(
"TORNADO EMERGENCY", "TO.W");
private static final EmergencyType FLASH_FLOOD = new EmergencyType(
"FLASH FLOOD EMERGENCY", "FF.W");
private final String value;
private final String phensig;
private final static EmergencyType[] values = new EmergencyType[] {
TORNADO, FLASH_FLOOD };
private EmergencyType(String type, String phensig) {
this.value = type;
this.phensig = phensig;
}
public static EmergencyType valueOf(String phensig) {
EmergencyType type = null;
for (EmergencyType t : values) {
if (t.phensig.equals(phensig)) {
type = t;
break;
}
}
return type;
}
};
/**
* Orders the ActiveTableRecord based on the issue time (ascending)
*/
@ -126,11 +96,11 @@ public class EmergencyConfirmationMsg implements IWarnGenConfirmationable {
// Check if the warning product is a valid EmergencyType.
if (type != null) {
boolean currentEmergency = body.contains("EMERGENCY");
boolean currentEmergency = EmergencyType.isEmergency(body);
if (action == WarningAction.NEW && currentEmergency) {
// Only occurs when the warning is first issued and not any
// other action
productMessage = "This is a " + type.value;
productMessage = "This is a " + type.getValue();
} else if (action == WarningAction.CON
|| action == WarningAction.EXT
|| action == WarningAction.CANCON) {
@ -159,14 +129,14 @@ public class EmergencyConfirmationMsg implements IWarnGenConfirmationable {
new ActiveTableRecordComparator());
ActiveTableRecord record = records
.get(records.size() - 1);
boolean wasEmergency = record.getRawmessage().contains(
"EMERGENCY");
boolean wasEmergency = EmergencyType.isEmergency(record
.getRawmessage());
if (!wasEmergency && currentEmergency) {
productMessage = "This is an upgrade of a "
+ type.value;
+ type.getValue();
} else if (wasEmergency && !currentEmergency) {
productMessage = "This is a downgrade of a "
+ type.value;
+ type.getValue();
}
}
} catch (VizException e) {

View file

@ -44,7 +44,6 @@ import java.util.Scanner;
import java.util.TimeZone;
import java.util.Timer;
import java.util.TimerTask;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@ -331,7 +330,7 @@ import com.raytheon.viz.ui.dialogs.SWTMessageBox;
* 25July2013 15733 GHull Read font and color prefs from TextEditorCfg.
* 23Aug2013 DR 16514 D. Friedman Fix handling of completed product requests. Do not change
* command history or close browser window for "update obs".
*
* 04Sep2013 2176 jsanchez Changed the order of the QC check dialogs.
* </pre>
*
* @author lvenable
@ -2952,20 +2951,23 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
* The font size sub menu.
*/
private void createFontSizeSubMenu(Menu fontSizeSubMenu) {
FontSizeCfg fontSizeCfg = TextEditorCfg.getTextEditorCfg().getFontSizeCfg();
SizeButtonCfg seldFontBtn = TextEditorCfg.getTextEditorCfg().getSelectedFontButton();
FontSizeCfg fontSizeCfg = TextEditorCfg.getTextEditorCfg()
.getFontSizeCfg();
SizeButtonCfg seldFontBtn = TextEditorCfg.getTextEditorCfg()
.getSelectedFontButton();
for (SizeButtonCfg buttonCfg : fontSizeCfg.getButtons()) {
MenuItem item = new MenuItem(fontSizeSubMenu, SWT.RADIO);
item.setText(buttonCfg.getLabelName());
item.setSelection( false );
item.setSelection(false);
item.setData(buttonCfg);
// if this button is the initial selection.
if( seldFontBtn.getLabelName().equals( buttonCfg.getLabelName() ) ) {
if (seldFontBtn.getLabelName().equals(buttonCfg.getLabelName())) {
item.setSelection(true);
setDefaultFont( seldFontBtn.getFontSize(), seldFontBtn.getFontName() );
setDefaultFont(seldFontBtn.getFontSize(),
seldFontBtn.getFontName());
}
item.addSelectionListener(new SelectionAdapter() {
@ -2973,10 +2975,12 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
public void widgetSelected(SelectionEvent event) {
MenuItem item = (MenuItem) event.getSource();
if (item.getSelection()) {
int selectFontSize = ( (SizeButtonCfg) item.getData()).getFontSize();
String seldFontName = ((SizeButtonCfg) item.getData()).getFontName();
setDefaultFont( selectFontSize, seldFontName );
int selectFontSize = ((SizeButtonCfg) item.getData())
.getFontSize();
String seldFontName = ((SizeButtonCfg) item.getData())
.getFontName();
setDefaultFont(selectFontSize, seldFontName);
textEditor.setFont(dftFont);
headerTF.setFont(dftFont);
@ -2987,8 +2991,8 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
}
public void setDefaultFont( int fontSize, String fontName ) {
dftFont = new Font( getDisplay(), fontName, fontSize, SWT.NORMAL);
public void setDefaultFont(int fontSize, String fontName) {
dftFont = new Font(getDisplay(), fontName, fontSize, SWT.NORMAL);
}
/**
@ -3723,7 +3727,7 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
textEditorComp = new Composite(shell, SWT.NONE);
GridLayout gridLayout = new GridLayout(1, false);
// TextColorsCfg textColorCfg = null;
// TextColorsCfg textColorCfg = null;
textEditorComp.setLayout(gridLayout);
textEditorComp.setLayoutData(gd);
@ -3745,8 +3749,8 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
airportToolTip = new DefaultToolTip(textEditor, SWT.DEFAULT, true);
textEditor.setKeyBinding(SWT.INSERT, SWT.NULL); // DR 7826
// textColorCfg = getTextColorCfg();
setDefaultTextColor( TextEditorCfg.getTextEditorCfg() );
// textColorCfg = getTextColorCfg();
setDefaultTextColor(TextEditorCfg.getTextEditorCfg());
textEditor.setForeground(textForeground);
textEditor.setBackground(textBackground);
@ -3948,42 +3952,46 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
});
}
// private TextColorsCfg getTextColorCfg() {
// TextColorsCfg textColorsCfg = TextEditorCfg.getTextEditorCfg().getTextColorsCfg();
//
// // Perform Sanity Checks on configuration.
// StringBuilder message = new StringBuilder();
//
// for (TextColorElement textElm : textColorsCfg.getTextColorElements()) {
// String prmtName = textElm.getParamName();
// if (prmtName == null) {
// message.append("Item \"paramName\" problem!\n");
//
// }
//
// if( textElm.getColor() == null ) {
// message.append("Item \"color\" data enter problem!\n");
// }
//
// if (message.length() > 0) {
// message.insert(0, "TextColorsCfg broblem(s): ");
// IUFStatusHandler statusHandler = UFStatus
// .getHandler(TextEditorDialog.class);
// statusHandler.handle(Priority.PROBLEM, message.toString());
// }
//
// }
//
// return textColorsCfg;
// }
// private TextColorsCfg getTextColorCfg() {
// TextColorsCfg textColorsCfg =
// TextEditorCfg.getTextEditorCfg().getTextColorsCfg();
//
// // Perform Sanity Checks on configuration.
// StringBuilder message = new StringBuilder();
//
// for (TextColorElement textElm : textColorsCfg.getTextColorElements()) {
// String prmtName = textElm.getParamName();
// if (prmtName == null) {
// message.append("Item \"paramName\" problem!\n");
//
// }
//
// if( textElm.getColor() == null ) {
// message.append("Item \"color\" data enter problem!\n");
// }
//
// if (message.length() > 0) {
// message.insert(0, "TextColorsCfg broblem(s): ");
// IUFStatusHandler statusHandler = UFStatus
// .getHandler(TextEditorDialog.class);
// statusHandler.handle(Priority.PROBLEM, message.toString());
// }
//
// }
//
// return textColorsCfg;
// }
private void setDefaultTextColor(TextEditorCfg txtClrCfg ) {
textBackground = new Color( shell.getDisplay(), txtClrCfg.getTextBackgroundColor() );
textForeground = new Color(shell.getDisplay(), txtClrCfg.getTextForegroundColor() );
highlightBackground = new Color(shell.getDisplay(), txtClrCfg.getHighlightTextBackgroundColor() );
highlightForeground = new Color(shell.getDisplay(), txtClrCfg.getHighlightTextForegroundColor() );
private void setDefaultTextColor(TextEditorCfg txtClrCfg) {
textBackground = new Color(shell.getDisplay(),
txtClrCfg.getTextBackgroundColor());
textForeground = new Color(shell.getDisplay(),
txtClrCfg.getTextForegroundColor());
highlightBackground = new Color(shell.getDisplay(),
txtClrCfg.getHighlightTextBackgroundColor());
highlightForeground = new Color(shell.getDisplay(),
txtClrCfg.getHighlightTextForegroundColor());
}
/**
@ -4858,14 +4866,14 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
@Override
public void dialogClosed(Object returnValue) {
if (Boolean.TRUE.equals(returnValue)) {
checkEmergencyProduct(resend);
finishSendProduct(resend);
}
}
});
wgcd.open();
} else {
checkEmergencyProduct(resend);
finishSendProduct(resend);
}
} else {
finishSendProduct(resend);
@ -4915,7 +4923,7 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
@Override
public void dialogClosed(Object returnValue) {
if (Boolean.TRUE.equals(returnValue)) {
warngenCloseCallback(resend);
checkEmergencyProduct(resend);
}
}
});
@ -4943,14 +4951,14 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
@Override
public void dialogClosed(Object returnValue) {
if (Boolean.TRUE.equals(returnValue)) {
finishSendProduct(resend);
warngenCloseCallback(resend);
}
}
});
wgcd.open();
} else {
finishSendProduct(resend);
warngenCloseCallback(resend);
}
}
@ -5903,7 +5911,7 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
return;
}
if (! isObsUpdated) {
if (!isObsUpdated) {
if (browser != null) {
browser.close();
browser = null;
@ -6097,7 +6105,7 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
private void postExecute(boolean hasAttachment, boolean enterEditor,
boolean validExecuteCommand, String attachedFilename) {
if (!this.isDisposed()) {
if (! productQueryJob.isExpectingRequests()) {
if (!productQueryJob.isExpectingRequests()) {
if (hasAttachment) {
statusBarLabel.setText("Attachment: " + attachedFilename);
} else {

View file

@ -40,6 +40,7 @@ import com.vividsolutions.jts.geom.prep.PreparedGeometryFactory;
* Mar 25, 2013 1605 jsanchez Set ClosestPoint's prepGeom.
* Apr 24, 2013 1944 jsanchez Updated calculateLocationPortion visibility to public.
* May 2, 2013 1963 jsanchez Referenced calculatePortion from GisUtil if intersection less than DEFAULT_PORTION_TOLERANCE.
* Sep 13, 2013 DR 16601 D. Friedman Fix from jsanchez: Allow cities outside the CWA.
*
* </pre>
*
@ -156,8 +157,6 @@ public class DbAreaSourceDataAdaptor extends AbstractDbSourceDataAdaptor {
filter = new HashMap<String, RequestConstraint>();
}
filter.put(cwaField, new RequestConstraint(localizedSite));
return filter;
}

View file

@ -20,6 +20,7 @@
package com.raytheon.viz.warngen.gui;
import com.raytheon.uf.common.dataplugin.warning.AbstractWarningRecord;
import com.raytheon.uf.common.dataplugin.warning.EmergencyType;
import com.raytheon.uf.common.dataplugin.warning.WarningRecord.WarningAction;
import com.raytheon.uf.common.time.SimulatedTime;
import com.raytheon.uf.common.time.util.TimeUtil;
@ -39,6 +40,7 @@ import com.raytheon.uf.common.time.util.TimeUtil;
* Aug 7, 2013 2243 jsanchez Set all the attributes of an AbstractWarningRecord and added an expiration string. Removed calendar object.
* Aug 15,2013 2243 jsanchez Improved the expiration string off by one minute. Fixed for practice mode.
* Aug 15,2013 2243 jsanchez Improved the expiration string off by one minute.
* Sep 4,2013 2176 jsanchez Used EmergencyType class to identify emergency products.
* </pre>
*
* @author rferrel
@ -96,8 +98,8 @@ public class FollowupData extends AbstractWarningRecord {
rval.append(buildExpStr(status, record));
}
if (record.getRawmessage().contains("EMERGENCY")) {
rval.append(" EMER");
if (EmergencyType.isEmergency(record.getRawmessage())) {
rval.append(" " + EmergencyType.EMER);
}
equvialentString = rval.substring(0,
record.getProductClass().equals("T") ? 20 : 18);

View file

@ -15,6 +15,7 @@ import org.opengis.referencing.crs.CoordinateReferenceSystem;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.warning.AbstractWarningRecord;
import com.raytheon.uf.common.dataplugin.warning.EmergencyType;
import com.raytheon.uf.common.dataplugin.warning.PracticeWarningRecord;
import com.raytheon.uf.common.dataplugin.warning.WarningRecord.WarningAction;
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
@ -80,6 +81,7 @@ import com.vividsolutions.jts.geom.prep.PreparedGeometryFactory;
* Remove frameAltered condition in matchesFrame. It prevented entries from being displayed.
* Check if geometry is null when inspecting.
* Jul 22, 2013 2176 jsanchez Updated the wire frame and text for EMERGENCY warnings.
* Sep 4, 2013 2176 jsanchez Made the polygon line width thicker and made regular text not bold.
* </pre>
*
* @author jsanchez
@ -133,7 +135,9 @@ public abstract class AbstractWWAResource extends
/** map of dataURI to a warning entry **/
protected Map<String, WarningEntry> entryMap;
protected IFont warningsFont;
protected IFont warningsFont = null;
protected IFont emergencyFont = null;
protected RGB color;
@ -368,8 +372,8 @@ public abstract class AbstractWWAResource extends
int outlineWidth = getCapability(OutlineCapability.class)
.getOutlineWidth();
// Make wire frame outline thicker for EMERGENCY warnings
if (record.getRawmessage().contains("EMERGENCY")) {
outlineWidth *= 2;
if (EmergencyType.isEmergency(record.getRawmessage())) {
outlineWidth *= 3;
}
target.drawWireframeShape(
@ -398,7 +402,10 @@ public abstract class AbstractWWAResource extends
* paintProps.getZoomLevel() / 1000;
String[] textToPrint = getText(record, mapWidth);
if (warningsFont == null) {
warningsFont = target.getDefaultFont().deriveWithSize(
warningsFont = target.initializeFont(target
.getDefaultFont().getFontName(), 11,
new IFont.Style[0]);
emergencyFont = target.getDefaultFont().deriveWithSize(
11);
}
// DR14992: reverse the textToPrint array to plot the
@ -418,15 +425,24 @@ public abstract class AbstractWWAResource extends
params.verticallAlignment = VerticalAlignment.BOTTOM;
params.magnification = getCapability(
MagnificationCapability.class).getMagnification();
target.drawStrings(params);
// Draws the string again to have it appear bolder
if (textToPrintReversed[2].endsWith("EMER")) {
params.setText(new String[] { "", "", "EMER", "" },
color);
target.drawStrings(params);
if (EmergencyType.isEmergency(record.getRawmessage())) {
// moves over text to add EMER in a different font
textToPrintReversed[2] = String.format("%1$-21" + "s",
textToPrintReversed[2]);
params.setText(textToPrintReversed, color);
DrawableString emergencyString = new DrawableString(
params);
emergencyString.font = emergencyFont;
emergencyString.setText(new String[] { "", "",
" " + EmergencyType.EMER, "" }, color);
target.drawStrings(emergencyString);
}
target.drawStrings(params);
}
}
}
@ -598,12 +614,7 @@ public abstract class AbstractWWAResource extends
textToPrint[0] += "." + vid;
}
textToPrint[0] += "." + record.getEtn();
if (record.getRawmessage().contains("EMERGENCY")) {
textToPrint[1] = record.getPil() + " EMER";
} else {
textToPrint[1] = record.getPil();
}
textToPrint[1] = record.getPil();
SimpleDateFormat startFormat = DEFAULT_FORMAT;
SimpleDateFormat endFormat = DEFAULT_FORMAT;

View file

@ -60,7 +60,8 @@ import com.vividsolutions.jts.geom.Geometry;
* Sep 27, 2012 1149 jsanchez Refactored methods from AbstractWarningsResource into this class.
* Apr 18, 2013 1877 jsanchez Ordered the records the same for update and initial load.
* Removed no longer needed frameAltered. Do not set wire frame for a CAN.
* Jul 24, 2013 DR16350 mgamazaychikov Fix the problem with plotting EXP warning
* Jul 24, 2013 DR16350 mgamazaychikov Fix the problem with plotting EXP warning
* Sep 5, 2013 2176 jsanchez Disposed the emergency font.
* </pre>
*
* @author jsanchez
@ -143,6 +144,10 @@ public class WarningsResource extends AbstractWWAResource {
if (warningsFont != null) {
warningsFont.dispose();
}
if (emergencyFont != null) {
emergencyFont.dispose();
}
}
@Override
@ -234,7 +239,7 @@ public class WarningsResource extends AbstractWWAResource {
for (AbstractWarningRecord warnrec : recordsToLoad) {
WarningAction act = WarningAction.valueOf(warnrec.getAct());
if (act == WarningAction.CON || act == WarningAction.CAN
|| act == WarningAction.EXT) {
|| act == WarningAction.EXT) {
AbstractWarningRecord createShape = null;
for (String key : entryMap.keySet()) {
WarningEntry entry = entryMap.get(key);

View file

@ -49,6 +49,7 @@ import com.vividsolutions.jts.geom.GeometryFactory;
* Sep 27, 2012 1149 jsanchez Refactored methods from AbstractWarningsResource into this class.
* May 06, 2013 1930 bsteffen Check for null in WatchesResource.
* May 10, 2013 1951 rjpeter Updated ugcZones references
* Sep 5, 2013 2176 jsanchez Disposed the emergency font.
* </pre>
*
* @author jsanchez
@ -140,6 +141,10 @@ public class WatchesResource extends AbstractWWAResource {
if (warningsFont != null) {
warningsFont.dispose();
}
if (emergencyFont != null) {
emergencyFont.dispose();
}
}
@Override

View file

@ -0,0 +1,91 @@
/**
* 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.common.dataplugin.warning;
/**
* Helps manage and identify emergency products.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Sep 4, 2013 2176 jsanchez Initial creation
*
* </pre>
*
* @author jsanchez
* @version 1.0
*/
public class EmergencyType {
public static final String EMER = "EMER";
private static final EmergencyType TORNADO = new EmergencyType(
"TORNADO EMERGENCY", "TO.W");
private static final EmergencyType FLASH_FLOOD = new EmergencyType(
"FLASH FLOOD EMERGENCY", "FF.W");
private final String value;
private final String phensig;
private final static EmergencyType[] values = new EmergencyType[] {
TORNADO, FLASH_FLOOD };
private EmergencyType(String type, String phensig) {
this.value = type;
this.phensig = phensig;
}
public static EmergencyType valueOf(String phensig) {
EmergencyType type = null;
for (EmergencyType t : values) {
if (t.phensig.equals(phensig)) {
type = t;
break;
}
}
return type;
}
/**
* Checks to see if the text product is an emergency product.
*
* @param rawmessage
* @return
*/
public static boolean isEmergency(String rawmessage) {
for (EmergencyType type : values) {
if (rawmessage != null && rawmessage.contains(type.getValue())) {
return true;
}
}
return false;
}
public String getValue() {
return value;
}
}

View file

@ -1,30 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!--
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.
-->
<configuration>
<warngenOfficeShort>OMAHA/VALLEY NE</warngenOfficeShort>
<warngenOfficeLoc>OMAHA</warngenOfficeLoc>
<backupCWAs>EAX/KANSAS CITY,DMX/DES MOINES,BOX/BOSTON,LBF/NORTH PLATTE,PQR/PORTLAND</backupCWAs>
<siteNode>OMA</siteNode>
<defaultTemplate>severethunderstorm</defaultTemplate>
<mainWarngenProducts>Flash Flood/ffw,Severe Thunderstorm/severethunderstorm,Tornado/tornado</mainWarngenProducts>
<otherWarngenProducts>Severe Weather Statement/SVS,Flash Flood Statement/ffs,non-convective FFW (Dam Break)/dambreak,non-convective Flash Flood Statement/dambreakffs,Areal Flood Warning/flw,Areal Flood Warning Followup/fls,Areal Flood Advisory/fla,Areal Flood Advisory Followup/flas,Special Marine Warning/smw,Marine Weather Statement (SMW Follow)/smws,Marine Weather Statement standalone/marinestatement,Short Term Forecast/shortterm,Special Weather Statement (zones)/sws</otherWarngenProducts>
<followupListRefreshDelay>5000</followupListRefreshDelay>
</configuration>