From e9f78d8f52dd80aa2e0c1cd9f2dde005a006b8a1 Mon Sep 17 00:00:00 2001 From: Zihou Wang Date: Wed, 9 Jul 2014 19:13:06 +0000 Subject: [PATCH] VLab Issue #3990 - DR_17356 Enhancement to Radar Display of SAILS 0.5 degree products; closes #3990 Change-Id: I2af5cb375294163d9c20ac7342ef72ebaa6c51ce Former-commit-id: f61e935c0372ee19768f2080da1f8fa21fb9aeb1 --- .../SailsTextContributor.java | 33 ++++++++++++++ .../viz/radar/textcontributors/UpperText.java | 2 + .../base/styleRules/RadarUpperText.xml | 43 ++++++++++++++++--- 3 files changed, 73 insertions(+), 5 deletions(-) create mode 100755 cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/textcontributors/SailsTextContributor.java diff --git a/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/textcontributors/SailsTextContributor.java b/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/textcontributors/SailsTextContributor.java new file mode 100755 index 0000000000..6472c728c4 --- /dev/null +++ b/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/textcontributors/SailsTextContributor.java @@ -0,0 +1,33 @@ +package com.raytheon.viz.radar.textcontributors; + +import com.raytheon.uf.common.dataplugin.radar.RadarRecord; + +/** + * + * Display "SAILS" at upper text for SAILS products + * + *
+ *
+ * SOFTWARE HISTORY
+ * Date         Ticket#    Engineer    Description
+ * ------------ ---------- ----------- --------------------------
+ * 07/08/2014   DR17356    zwang       Initial creation
+ *
+ * 
+ * + * @author zwang + * @version 1.0 + */ + +public class SailsTextContributor implements IRadarTextContributor { + + @Override + public String contributeText(RadarRecord record) { + String sailsStr = ""; + + if (record.getPrimaryElevationAngle() <= 0.5 && record.getElevationNumber() > 2) + sailsStr = "SAILS"; + + return sailsStr; + } +} diff --git a/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/textcontributors/UpperText.java b/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/textcontributors/UpperText.java index b35f749628..2f75d1d716 100644 --- a/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/textcontributors/UpperText.java +++ b/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/textcontributors/UpperText.java @@ -39,6 +39,7 @@ import javax.xml.bind.annotation.XmlElements; * ------------ ---------- ----------- -------------------------- * Sep 7, 2010 bsteffen Initial creation * 03/05/2013 DCS51 zwang Handle GFM product + * 07/08/2013 DR17356 zwang Tag SAILS product * * * @@ -60,6 +61,7 @@ public class UpperText { @XmlElement(name = "productDependentDate", type = ProdDepDateTextContributor.class), @XmlElement(name = "productDependentUSPMax", type = USPMaxTextContributor.class), @XmlElement(name = "productDependentDVLMax", type = DigitalVilMaxTextContributor.class), + @XmlElement(name = "sails", type = SailsTextContributor.class), @XmlElement(name = "gfmCount", type = GfmTextContributor.class), @XmlElement(name = "srmMovement", type = SrmMovementTextContributor.class), @XmlElement(name = "srmSource", type = SrmSourceTextContributor.class) }) diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.radar/utility/common_static/base/styleRules/RadarUpperText.xml b/edexOsgi/com.raytheon.uf.common.dataplugin.radar/utility/common_static/base/styleRules/RadarUpperText.xml index 2c0833dbc7..d48a1bad0b 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.radar/utility/common_static/base/styleRules/RadarUpperText.xml +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.radar/utility/common_static/base/styleRules/RadarUpperText.xml @@ -26,11 +26,17 @@ - + + + + + + + @@ -46,7 +52,7 @@ - + @@ -55,13 +61,29 @@ + + + + + + + + + + - + + + + + + + @@ -286,6 +308,7 @@ + @@ -294,6 +317,7 @@ + @@ -302,16 +326,25 @@ + - + + + + + + + + + @@ -398,4 +431,4 @@ - \ No newline at end of file +