OB_14.1.1-25 baseline

Former-commit-id: c66bac30c7 [formerly c085bc6879] [formerly c67833407c] [formerly 074abeb0fa [formerly c67833407c [formerly dd2417b58b33005985f80cc83b45134132b3e5a1]]]
Former-commit-id: 074abeb0fa
Former-commit-id: ec4f283a91b4ae374dc7edc0c06351378f44b61f [formerly 36fdf6bfe4]
Former-commit-id: 95ada25b65
This commit is contained in:
Brian.Dyke 2014-03-25 13:55:54 -04:00
parent 49f7c81de1
commit 5b848e5480
4 changed files with 47 additions and 11 deletions

View file

@ -31,7 +31,8 @@ import java.util.TimeZone;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Dec 8, 2008 1737 grichard Initial creation.
* Mar 14, 2014 DR 17175 D. Friedman Fixed Atlantic and Samoa time zones
* Mar 14, 2014 DR 17175 D. Friedman Fixed Atlantic and Samoa time zones.
* Add short name map.
* </pre>
*
* @author grichard
@ -72,6 +73,8 @@ public final class TextWarningConstants {
public static HashMap<String, TimeZone> timeZoneAbbreviationMap = null;
public static HashMap<String, TimeZone> timeZoneShortNameMap = null;
static {
// build the abbreviation map
timeZoneAbbreviationMap = new HashMap<String, TimeZone>();
@ -85,6 +88,24 @@ public final class TextWarningConstants {
timeZoneAbbreviationMap.put("P", TimeZone.getTimeZone("PST8PDT"));
timeZoneAbbreviationMap.put("S", TimeZone.getTimeZone("US/Samoa"));
timeZoneAbbreviationMap.put("V", TimeZone.getTimeZone("America/Puerto_Rico"));
HashMap<String, TimeZone> t = timeZoneAbbreviationMap;
timeZoneShortNameMap = new HashMap<String, TimeZone>();
timeZoneShortNameMap.put("AKST", t.get("A"));
timeZoneShortNameMap.put("AKDT", t.get("A"));
timeZoneShortNameMap.put("CST", t.get("C"));
timeZoneShortNameMap.put("CDT", t.get("C"));
timeZoneShortNameMap.put("EST", t.get("E"));
timeZoneShortNameMap.put("EDT", t.get("E"));
timeZoneShortNameMap.put("CHST", t.get("G"));
timeZoneShortNameMap.put("ChST", t.get("G"));
timeZoneShortNameMap.put("HST", t.get("H"));
timeZoneShortNameMap.put("MST", t.get("m"));
timeZoneShortNameMap.put("MDT", t.get("M"));
timeZoneShortNameMap.put("PST", t.get("P"));
timeZoneShortNameMap.put("PDT", t.get("P"));
timeZoneShortNameMap.put("SST", t.get("S"));
timeZoneShortNameMap.put("AST", t.get("V"));
}
/**

View file

@ -333,6 +333,7 @@ import com.raytheon.viz.ui.dialogs.SWTMessageBox;
* 12Sep2013 DR 2249 rferrel Change Time stamp in file name created by warngen to use
* simulated time.
* 20Nov2013 DR 16777 D. Friedman Check if OUPRequest will work before setting ETN.
* 14Mar2014 DR 17175 D. Friedman Get correct time zone for MND header time sync.
* </pre>
*
* @author lvenable
@ -5809,11 +5810,15 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
if (m.find()) {
SimpleDateFormat headerFormat = new SimpleDateFormat(
"hmm a z EEE MMM d yyyy");
headerFormat
.setTimeZone(TextWarningConstants.timeZoneAbbreviationMap
.get(m.group(5).substring(0, 1)));
product = product.replace(m.group(1), headerFormat.format(now)
.toUpperCase());
TimeZone tz = TextWarningConstants.timeZoneShortNameMap
.get(m.group(5));
if (tz != null) {
headerFormat.setTimeZone(tz);
product = product.replace(m.group(1), headerFormat.format(now)
.toUpperCase());
} else {
statusHandler.warn("Could not sync MND header time because the time zone could not be determined. Will proceed with save/send.");
}
}
return product;
}

View file

@ -41,6 +41,7 @@ import com.raytheon.viz.texteditor.util.VtecUtil;
* ------------ ---------- ----------- --------------------------
* Initial creation
* Aug 25, 2011 10719 rferrel ugcPtrn now local to file.
* Mar 14, 2014 DR 17175 D. Friedman Get correct time zone from times.
* </pre>
*
* @version 1.0
@ -90,8 +91,12 @@ public class TimeConsistentCheck implements IQCCheck {
// Event ending time (second bullet) vs Expiration
m = secondBulletPtrn.matcher(body);
if (m.find()) {
TimeZone timeZone = TextWarningConstants.timeZoneAbbreviationMap
.get(m.group(4).substring(0, 1));
TimeZone timeZone = TextWarningConstants.timeZoneShortNameMap
.get(m.group(4));
if (timeZone == null) {
errorMsg += "Could not determine time zone in second bullet";
return errorMsg;
}
int am_pm = m.group(3).equals("AM") ? Calendar.AM : Calendar.PM;
int minute = Integer.parseInt(m.group(2));
int hour = Integer.parseInt(m.group(1)) == 12 ? 0 : Integer
@ -134,8 +139,12 @@ public class TimeConsistentCheck implements IQCCheck {
m = thirdBulletPtrn.matcher(body);
if (m.find()) {
TimeZone timeZone = TextWarningConstants.timeZoneAbbreviationMap
.get(m.group(4).substring(0, 1));
TimeZone timeZone = TextWarningConstants.timeZoneShortNameMap
.get(m.group(4));
if (timeZone == null) {
errorMsg += "Could not determine time zone in third bullet";
return errorMsg;
}
int am_pm = m.group(3).equals("AM") ? Calendar.AM : Calendar.PM;
int minute = Integer.parseInt(m.group(2));
int hour = Integer.parseInt(m.group(1));

View file

@ -49,6 +49,7 @@ import com.raytheon.viz.core.mode.CAVEMode;
* Date Ticket# Engineer Description
* ---------- ---------- ----------- --------------------------
* 12/20/07 561 Dan Fitch Initial Creation.
* 03/24/14 DR 17186 D. Friedman Do not change colors of most buttons.
* </pre>
*
* @author Dan Fitch
@ -87,7 +88,7 @@ public class ModeListener implements PaintListener {
.getStyle() & SWT.READ_ONLY) == 0))
&& !(control instanceof Table)
&& !((control instanceof Button) && ((((Button) control)
.getStyle() & SWT.PUSH) != 0))) {
.getStyle() & (SWT.PUSH|SWT.TOGGLE|SWT.CHECK|SWT.RADIO)) != 0))) {
Color back = control.getBackground();
Color fore = control.getForeground();