getZonesSelected() throws VizException {
- return getZonesSelected(false);
+ return getZonesSelected(true);
}
/**
diff --git a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/textreport/B44AReport.java b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/textreport/B44AReport.java
index 614d4b395d..e0a988140f 100644
--- a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/textreport/B44AReport.java
+++ b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/textreport/B44AReport.java
@@ -34,6 +34,7 @@ import com.raytheon.viz.hydrocommon.whfslib.GeoUtil;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Sep 18, 2009 2260 mpduff Initial creation
+ * Sep 11, 2012 13781 wkwock add print menu
*
*
*
@@ -53,7 +54,7 @@ public class B44AReport extends TextReport {
private int b44aLastPage = B44A_COOPERATIVE;
- private String lid = null;
+ protected String lid = null;
TextReportData locB44AData;
@@ -166,7 +167,7 @@ public class B44AReport extends TextReport {
if ((data.getObserver().getLastname() != null)
&& (data.getObserver().getLastname().length() > 0)) {
- name.concat(data.getObserver().getLastname());
+ name = name.concat(data.getObserver().getLastname());
}
String dos;
diff --git a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/textreport/E19AReport.java b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/textreport/E19AReport.java
index 7e5b0569ff..4bc32ad21f 100644
--- a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/textreport/E19AReport.java
+++ b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/textreport/E19AReport.java
@@ -38,6 +38,7 @@ import com.raytheon.viz.hydrocommon.whfslib.GeoUtil;
* ------------ ---------- ----------- --------------------------
* Sep 18, 2009 2260 mpduff Initial creation
* Apr 25, 2012 14499 wkwock Refine format, query, etc
+ * Sep 11, 2012 13781 wkwock add print menu
*
*
*
@@ -47,7 +48,7 @@ import com.raytheon.viz.hydrocommon.whfslib.GeoUtil;
public class E19AReport extends E19Report {
private static final int E19A_SUMMARY = 0;
- private static final int E19A_ALLPAGES = 1;
+ protected static final int E19A_ALLPAGES = 1;
private int e19aFirstPage = E19A_SUMMARY;
private int e19aLastPage = E19A_SUMMARY;
diff --git a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/textreport/PrintB44ATextReportDlg.java b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/textreport/PrintB44ATextReportDlg.java
new file mode 100644
index 0000000000..b00d462905
--- /dev/null
+++ b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/textreport/PrintB44ATextReportDlg.java
@@ -0,0 +1,88 @@
+/**
+ * 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.viz.hydrocommon.textreport;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+
+/**
+ * print menu for report B-44A.
+ *
+ *
+ *
+ * SOFTWARE HISTORY
+ * Date Ticket# Engineer Description
+ * ------------ ---------- ----------- --------------------------
+ * Sep 11, 2012 13781 wkwock Initial creation
+ *
+ *
+ *
+ * @author wkwock
+ * @version 1.0
+ */
+public class PrintB44ATextReportDlg extends PrintTextReportDlg {
+ private B44AReport report=null;
+
+ protected PrintB44ATextReportDlg(Shell parentShell, B44AReport rpt) {
+ super(parentShell, rpt);
+ this.report=rpt;
+ this.setText("B-44A (Cooperative) - Print - " + report.lid);
+ }
+
+ @Override
+ protected void initializeComponents(Shell shell) {
+ createTableOfContents();
+ createBottomButtons();
+ }
+
+ private void createTableOfContents(){
+ GridData gd = new GridData(GridData.FILL_BOTH);
+ Composite comp = new Composite(shell, SWT.NONE);
+ GridLayout gridLayout = new GridLayout(1, false);
+ comp.setLayout(gridLayout);
+ comp.setLayoutData(gd);
+ Label header = new Label(comp, SWT.RIGHT);
+ header.setText(" B-44A (SCooperative) Report:");
+
+ Label seperator1=new Label(comp, SWT.SEPARATOR | SWT.HORIZONTAL);
+ seperator1.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+ Label singlePageLbl = new Label(comp, SWT.None);
+ singlePageLbl.setText("An Unofficial Cooperative Report\nfor station "+report.lid);
+ Label seperator2=new Label(comp,SWT.NONE);
+ seperator2.setText("===========================");
+
+ Label seperator3=new Label(comp, SWT.SEPARATOR | SWT.HORIZONTAL | SWT.BOLD);
+ seperator3.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+ }
+
+ /**
+ * Get print data for selected contents from the report
+ */
+ protected String getPrintData () {
+ return report.getText(B44AReport.STNCLASS_ALLPAGES).replace("null", "");
+ }
+}
diff --git a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/textreport/PrintE19ATextReportDlg.java b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/textreport/PrintE19ATextReportDlg.java
new file mode 100644
index 0000000000..20cc532417
--- /dev/null
+++ b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/textreport/PrintE19ATextReportDlg.java
@@ -0,0 +1,88 @@
+/**
+ * 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.viz.hydrocommon.textreport;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+
+/**
+ * print menu for report E-19A.
+ *
+ *
+ *
+ * SOFTWARE HISTORY
+ * Date Ticket# Engineer Description
+ * ------------ ---------- ----------- --------------------------
+ * Sep 11, 2012 13781 wkwock Initial creation
+ *
+ *
+ *
+ * @author wkwock
+ * @version 1.0
+ */
+
+public class PrintE19ATextReportDlg extends PrintTextReportDlg {
+ private E19AReport report=null;
+
+ protected PrintE19ATextReportDlg(Shell parentShell, E19AReport rpt) {
+ super(parentShell, rpt);
+ this.report=rpt;
+ this.setText("E-19A (Summary) - Print - " + report.lid);
+ }
+
+ @Override
+ protected void initializeComponents(Shell shell) {
+ createTableOfContents();
+ createBottomButtons();
+ }
+
+ private void createTableOfContents(){
+ GridData gd = new GridData(GridData.FILL_BOTH);
+ Composite comp = new Composite(shell, SWT.NONE);
+ GridLayout gridLayout = new GridLayout(1, false);
+ comp.setLayout(gridLayout);
+ comp.setLayoutData(gd);
+ Label header = new Label(comp, SWT.RIGHT);
+ header.setText(" E-19A (Summary) Report:");
+
+ Label seperator1=new Label(comp, SWT.SEPARATOR | SWT.HORIZONTAL);
+ seperator1.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+ Label singlePageLbl = new Label(comp, SWT.None);
+ singlePageLbl.setText("A Single-page Summary Report\nfor station "+report.lid);
+ Label seperator2=new Label(comp,SWT.NONE);
+ seperator2.setText("===========================");
+
+ Label seperator3=new Label(comp, SWT.SEPARATOR | SWT.HORIZONTAL | SWT.BOLD);
+ seperator3.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+ }
+
+ /**
+ * Get print data for selected contents from the report
+ */
+ protected String getPrintData () {
+ return report.getText(E19AReport.E19A_ALLPAGES).replace("null", "");
+ }
+}
diff --git a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/textreport/PrintE19TextReportDlg.java b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/textreport/PrintE19TextReportDlg.java
new file mode 100644
index 0000000000..9e04e242cf
--- /dev/null
+++ b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/textreport/PrintE19TextReportDlg.java
@@ -0,0 +1,257 @@
+/**
+ * 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.viz.hydrocommon.textreport;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.graphics.Color;
+
+
+import com.raytheon.viz.hydrocommon.textreport.TextReportConstants.E19Pages;
+/**
+ * print menu for report E-19.
+ *
+ *
+ *
+ * SOFTWARE HISTORY
+ * Date Ticket# Engineer Description
+ * ------------ ---------- ----------- --------------------------
+ * Sep 11, 2012 13781 wkwock Initial creation
+ *
+ *
+ *
+ * @author wkwock
+ * @version 1.0
+ */
+
+public class PrintE19TextReportDlg extends PrintTextReportDlg {
+ private E19Report report=null;
+ Button converBtn = null;
+ Button mapBtn = null;
+ Button benchmarkBtn = null;
+ Button gagesBtn = null;
+ Button historyBtn = null;
+ Button crestsBtn = null;
+ Button lowWaterBtn = null;
+ Button conditionsBtn = null;
+ Button damageBtn = null;
+ Button riverStageBtn = null;
+ Button contactsBtn = null;
+ Button allPageBtn = null;
+
+ protected PrintE19TextReportDlg(Shell parentShell, E19Report rpt) {
+ super(parentShell, rpt);
+ this.report=rpt;
+ this.setText("E-19 - Print - " + report.lid);
+ }
+
+ @Override
+ protected void initializeComponents(Shell shell) {
+ createTableOfContents();
+ createBottomButtons();
+ }
+
+ private void createTableOfContents(){
+ GridData gd = new GridData(GridData.FILL_BOTH);
+ Composite comp = new Composite(shell, SWT.NONE);
+ GridLayout gridLayout = new GridLayout(1, false);
+ comp.setLayout(gridLayout);
+ comp.setLayoutData(gd);
+ Label header = new Label(comp, SWT.RIGHT);
+ header.setText(" E-19 Report Contents:");
+
+ Label seperator1=new Label(comp, SWT.SEPARATOR | SWT.HORIZONTAL);
+ seperator1.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+ converBtn = new Button(comp, SWT.CHECK);
+ converBtn.setText(E19Pages.COVER.getPageName().toUpperCase());
+ converBtn.addSelectionListener(new E19Selection());
+ mapBtn = new Button(comp, SWT.CHECK);
+ mapBtn.setText(E19Pages.MAP_GAGE_LOCATION.getPageName().toUpperCase());
+ mapBtn.addSelectionListener(new E19Selection());
+ benchmarkBtn = new Button(comp, SWT.CHECK);
+ benchmarkBtn.setText(E19Pages.BENCHMARKS.getPageName().toUpperCase());
+ benchmarkBtn.addSelectionListener(new E19Selection());
+ gagesBtn = new Button(comp, SWT.CHECK);
+ gagesBtn.setText(E19Pages.GAGES.getPageName().toUpperCase());
+ gagesBtn.addSelectionListener(new E19Selection());
+ historyBtn = new Button(comp, SWT.CHECK);
+ historyBtn.setText(E19Pages.HISTORY.getPageName().toUpperCase());
+ historyBtn.addSelectionListener(new E19Selection());
+ crestsBtn = new Button(comp, SWT.CHECK);
+ crestsBtn.setText(E19Pages.CRESTS.getPageName().toUpperCase());
+ crestsBtn.addSelectionListener(new E19Selection());
+ lowWaterBtn = new Button(comp, SWT.CHECK);
+ lowWaterBtn.setText(E19Pages.LOW_WATER_RECORDS.getPageName().toUpperCase());
+ lowWaterBtn.addSelectionListener(new E19Selection());
+ conditionsBtn = new Button(comp, SWT.CHECK);
+ conditionsBtn.setText(E19Pages.CONDITIONS_AFFECTING_FLOW.getPageName().toUpperCase());
+ conditionsBtn.addSelectionListener(new E19Selection());
+ damageBtn = new Button(comp, SWT.CHECK);
+ damageBtn.setText(E19Pages.DAMAGE.getPageName().toUpperCase());
+ damageBtn.addSelectionListener(new E19Selection());
+ riverStageBtn = new Button(comp, SWT.CHECK);
+ riverStageBtn.setText(E19Pages.RIVER_STAGE_DATA.getPageName().toUpperCase());
+ riverStageBtn.addSelectionListener(new E19Selection());
+ contactsBtn = new Button(comp, SWT.CHECK);
+ contactsBtn.setText(E19Pages.CONTACTS.getPageName().toUpperCase());
+ contactsBtn.addSelectionListener(new E19Selection());
+
+ Label seperator2=new Label(comp,SWT.NONE);
+ seperator2.setText("===========================");
+
+ allPageBtn = new Button(comp, SWT.CHECK);
+ allPageBtn.setText("ALL PAGES");
+ shell.getDisplay();
+ allPageBtn.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_YELLOW));
+ allPageBtn.addSelectionListener(new E19Selection());
+ allPageBtn.setSelection(true);
+
+ Label seperator3=new Label(comp, SWT.SEPARATOR | SWT.HORIZONTAL | SWT.BOLD);
+ seperator3.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+ }
+
+ /**
+ * Get print data for selected contents from the report
+ */
+ protected String getPrintData () {
+ String text="";
+ if (allPageBtn.getSelection()) {
+ text = report.getText(E19Report.E19_ALLPAGES);
+ }else {
+ if (converBtn.getSelection()) {
+ text += report.getText(E19Report.E19_COVER);
+ }
+ if (mapBtn.getSelection()){
+ text += report.getText(E19Report.E19_MAPPAGE);
+ }
+ if (benchmarkBtn.getSelection()){
+ text += report.getText(E19Report.E19_BENCHMARKS);
+ }
+ if (gagesBtn.getSelection()){
+ text += report.getText(E19Report.E19_GAGES);
+ }
+ if (historyBtn.getSelection()){
+ text += report.getText(E19Report.E19_HISTORY);
+ }
+ if (crestsBtn.getSelection()){
+ text += report.getText(E19Report.E19_CRESTS);
+ }
+ if (lowWaterBtn.getSelection()){
+ text += report.getText(E19Report.E19_LOWWATER);
+ }
+ if (conditionsBtn.getSelection()){
+ text += report.getText(E19Report.E19_CONDITIONS);
+ }
+ if (damageBtn.getSelection()){
+ text += report.getText(E19Report.E19_DAMAGE);
+ }
+ if (riverStageBtn.getSelection()){
+ text += report.getText(E19Report.E19_STAFFGAGE);
+ }
+ if (contactsBtn.getSelection()){
+ text += report.getText(E19Report.E19_CONTACTS);
+ }
+ }
+ return text.replace("null", "");
+ }
+
+ /**
+ * Class for the table of contents clicks
+ * @author wkwock
+ *
+ */
+ private class E19Selection extends SelectionAdapter{
+ public void widgetSelected(SelectionEvent e) {
+ Color yellow=Display.getCurrent().getSystemColor(SWT.COLOR_YELLOW);
+ Color black=Display.getCurrent().getSystemColor(SWT.COLOR_BLACK);
+ Color red=Display.getCurrent().getSystemColor(SWT.COLOR_RED);
+
+ Button button = (Button) e.getSource();
+ if (button.equals(allPageBtn)) {//selected button is not allpage
+ mapBtn.setSelection(false);
+ benchmarkBtn.setSelection(false);
+ benchmarkBtn.setForeground(black);
+ gagesBtn.setSelection(false);
+ gagesBtn.setForeground(black);
+ historyBtn.setSelection(false);
+ historyBtn.setForeground(black);
+ crestsBtn.setSelection(false);
+ crestsBtn.setForeground(black);
+ lowWaterBtn.setSelection(false);
+ lowWaterBtn.setForeground(black);
+ conditionsBtn.setSelection(false);
+ conditionsBtn.setForeground(black);
+ damageBtn.setSelection(false);
+ damageBtn.setForeground(black);
+ riverStageBtn.setSelection(false);
+ contactsBtn.setSelection(false);
+
+ if (allPageBtn.getSelection()) { //all page select to on
+ allPageBtn.setForeground(yellow);
+ converBtn.setSelection(false);
+ } else { //all page select to off
+ converBtn.setSelection(true);
+ allPageBtn.setForeground(black);
+ }
+ }else {//selected button is not allpage
+ allPageBtn.setSelection(false);
+ allPageBtn.setForeground(black);
+
+ if (button.getSelection()) {//seleted button is on
+ if (button.equals(benchmarkBtn) ||
+ button.equals(gagesBtn) ||
+ button.equals(historyBtn) ||
+ button.equals(crestsBtn) ||
+ button.equals(lowWaterBtn) ||
+ button.equals(conditionsBtn) ||
+ button.equals(damageBtn) ) {
+ button.setForeground(red);
+ }
+ } else {//seleted button is off
+ button.setForeground(black);
+ if (!converBtn.getSelection() &&
+ !mapBtn.getSelection() &&
+ !benchmarkBtn.getSelection() &&
+ !gagesBtn.getSelection() &&
+ !historyBtn.getSelection() &&
+ !crestsBtn.getSelection() &&
+ !lowWaterBtn.getSelection() &&
+ !conditionsBtn.getSelection() &&
+ !damageBtn.getSelection() &&
+ !riverStageBtn.getSelection() &&
+ !contactsBtn.getSelection() ) { //every thing is off then allpage must be on
+ allPageBtn.setSelection(true);
+ allPageBtn.setForeground(yellow);
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/textreport/PrintSortedStnTextReportDlg.java b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/textreport/PrintSortedStnTextReportDlg.java
new file mode 100644
index 0000000000..9befa9b13e
--- /dev/null
+++ b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/textreport/PrintSortedStnTextReportDlg.java
@@ -0,0 +1,215 @@
+/**
+ * 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.viz.hydrocommon.textreport;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.graphics.Color;
+
+import com.raytheon.viz.hydrocommon.textreport.TextReportConstants.StationListSort;
+/**
+ * print menu for Sorted Station text report.
+ *
+ *
+ *
+ * SOFTWARE HISTORY
+ * Date Ticket# Engineer Description
+ * ------------ ---------- ----------- --------------------------
+ * Sep 11, 2012 13781 wkwock Initial creation
+ *
+ *
+ *
+ * @author wkwock
+ * @version 1.0
+ */
+
+public class PrintSortedStnTextReportDlg extends PrintTextReportDlg {
+ private StationListReport report=null;
+ TextReportDlg textReportDlg;
+
+ Button nameBtn = null;
+ Button locationID = null;
+ Button countyBtn = null;
+ Button basinBtn = null;
+ Button observerBtn = null;
+ Button allPageBtn = null;
+
+ protected PrintSortedStnTextReportDlg(Shell parentShell, StationListReport rpt) {
+ super(parentShell, rpt);
+ this.report=rpt;
+ this.setText("Sorted Station List - Print");
+ }
+
+ public void setTextReportDlg(TextReportDlg txtRptDlg) {
+ textReportDlg = txtRptDlg;
+ }
+
+ @Override
+ protected void initializeComponents(Shell shell) {
+ createTableOfContents();
+ createBottomButtons();
+ }
+
+ private void createTableOfContents(){
+ GridData gd = new GridData(GridData.FILL_BOTH);
+ Composite comp = new Composite(shell, SWT.NONE);
+ GridLayout gridLayout = new GridLayout(1, false);
+ comp.setLayout(gridLayout);
+ comp.setLayoutData(gd);
+ Label header = new Label(comp, SWT.RIGHT);
+ header.setText(" Sorted Station List Report, sort by:");
+
+ Label seperator1=new Label(comp, SWT.SEPARATOR | SWT.HORIZONTAL);
+ seperator1.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+ locationID = new Button(comp, SWT.CHECK);
+ locationID.setText(StationListSort.LOCATION_ID.getStationSortType().toUpperCase());
+ locationID.addSelectionListener(new PrintSelection());
+ nameBtn = new Button(comp, SWT.CHECK);
+ nameBtn.setText(StationListSort.NAME.getStationSortType().toUpperCase());
+ nameBtn.addSelectionListener(new PrintSelection());
+ countyBtn = new Button(comp, SWT.CHECK);
+ countyBtn.setText(StationListSort.COUNTY.getStationSortType().toUpperCase());
+ countyBtn.addSelectionListener(new PrintSelection());
+ basinBtn = new Button(comp, SWT.CHECK);
+ basinBtn.setText(StationListSort.BASIN.getStationSortType().toUpperCase());
+ basinBtn.addSelectionListener(new PrintSelection());
+ observerBtn = new Button(comp, SWT.CHECK);
+ observerBtn.setText(StationListSort.OBSERVER.getStationSortType().toUpperCase());
+ observerBtn.addSelectionListener(new PrintSelection());
+
+ Label seperator2=new Label(comp,SWT.NONE);
+ seperator2.setText("===========================");
+
+ allPageBtn = new Button(comp, SWT.CHECK);
+ allPageBtn.setText("(ALL TYPES)");
+ shell.getDisplay();
+ allPageBtn.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_YELLOW));
+ allPageBtn.addSelectionListener(new PrintSelection());
+ allPageBtn.setSelection(true);
+
+ Label seperator3=new Label(comp, SWT.SEPARATOR | SWT.HORIZONTAL | SWT.BOLD);
+ seperator3.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+ }
+
+ /**
+ * Get print data for selected contents from the report
+ */
+ protected String getPrintData () {
+ int sortIndex=textReportDlg.getPageSelectionIndex();
+ int[] sortArray=report.getSortArray(sortIndex);
+
+ if (!allPageBtn.getSelection()) {
+ for (int i=0; i
+ *
+ * SOFTWARE HISTORY
+ * Date Ticket# Engineer Description
+ * ------------ ---------- ----------- --------------------------
+ * Sep 11, 2012 13781 wkwock Initial creation
+ *
+ *
+ *
+ * @author wkwock
+ * @version 1.0
+ */
+
+public class PrintStnClassTextReportDlg extends PrintTextReportDlg {
+private StationClassReport report=null;
+
+ protected PrintStnClassTextReportDlg(Shell parentShell, StationClassReport rpt) {
+ super(parentShell, rpt);
+ this.report=rpt;
+ this.setText("Station Class - Print");
+ }
+
+ @Override
+ protected void initializeComponents(Shell shell) {
+ createTableOfContents();
+ createBottomButtons();
+ }
+
+ private void createTableOfContents(){
+ GridData gd = new GridData(GridData.FILL_BOTH);
+ Composite comp = new Composite(shell, SWT.NONE);
+ GridLayout gridLayout = new GridLayout(1, false);
+ comp.setLayout(gridLayout);
+ comp.setLayoutData(gd);
+ Label header = new Label(comp, SWT.RIGHT);
+ header.setText(" Station Class Report:");
+
+ Label seperator1=new Label(comp, SWT.SEPARATOR | SWT.HORIZONTAL);
+ seperator1.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+ Label singlePageLbl = new Label(comp, SWT.None);
+ singlePageLbl.setText("Station Class Information\nfor All stations");
+ Label seperator2=new Label(comp,SWT.NONE);
+ seperator2.setText("===========================");
+
+ Label seperator3=new Label(comp, SWT.SEPARATOR | SWT.HORIZONTAL | SWT.BOLD);
+ seperator3.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+ }
+
+ /**
+ * Get print data for selected contents from the report
+ */
+ protected String getPrintData () {
+ return report.getText(StationClassReport.STNCLASS_ALLPAGES).replace("null", "");
+ }
+}
diff --git a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/textreport/PrintSvcBkTextReportDlg.java b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/textreport/PrintSvcBkTextReportDlg.java
new file mode 100644
index 0000000000..1a550d2784
--- /dev/null
+++ b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/textreport/PrintSvcBkTextReportDlg.java
@@ -0,0 +1,92 @@
+/**
+ * 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.viz.hydrocommon.textreport;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+/**
+ * print menu for report Service backup.
+ *
+ *
+ *
+ * SOFTWARE HISTORY
+ * Date Ticket# Engineer Description
+ * ------------ ---------- ----------- --------------------------
+ * Sep 11, 2012 13781 wkwock Initial creation
+ *
+ *
+ *
+ * @author wkwock
+ * @version 1.0
+ */
+
+public class PrintSvcBkTextReportDlg extends PrintTextReportDlg {
+private ServiceBackupReport report=null;
+private TextReportDlg textReportDlg=null;
+
+ protected PrintSvcBkTextReportDlg(Shell parentShell, ServiceBackupReport rpt) {
+ super(parentShell, rpt);
+ this.report=rpt;
+ this.setText("Service Backup - Print"); //dialog title
+ }
+
+ @Override
+ protected void initializeComponents(Shell shell) {
+ createTableOfContents();
+ createBottomButtons();
+ }
+
+ private void createTableOfContents(){
+ GridData gd = new GridData(GridData.FILL_BOTH);
+ Composite comp = new Composite(shell, SWT.NONE);
+ GridLayout gridLayout = new GridLayout(1, false);
+ comp.setLayout(gridLayout);
+ comp.setLayoutData(gd);
+ Label header = new Label(comp, SWT.RIGHT);
+ header.setText(" Service Backup Report, sort by:");
+
+ Label seperator1=new Label(comp, SWT.SEPARATOR | SWT.HORIZONTAL);
+ seperator1.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+ Label singlePageLbl = new Label(comp, SWT.None);
+ singlePageLbl.setText("Service Backup Information\nfor All stations");
+ Label seperator2=new Label(comp,SWT.NONE);
+ seperator2.setText("===========================");
+
+ Label seperator3=new Label(comp, SWT.SEPARATOR | SWT.HORIZONTAL | SWT.BOLD);
+ seperator3.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+ }
+
+ /**
+ * Get print data for selected contents from the report
+ */
+ protected String getPrintData () {
+ return report.getText(textReportDlg.getPageSelectionIndex());
+ }
+
+ public void setTextReportDlg(TextReportDlg txtRptDlg) {
+ this.textReportDlg=txtRptDlg;
+ }
+}
diff --git a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/textreport/PrintTextReportDlg.java b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/textreport/PrintTextReportDlg.java
new file mode 100644
index 0000000000..b21feb2229
--- /dev/null
+++ b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/textreport/PrintTextReportDlg.java
@@ -0,0 +1,298 @@
+/**
+ * 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.viz.hydrocommon.textreport;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.printing.PrintDialog;
+import org.eclipse.swt.printing.Printer;
+import org.eclipse.swt.printing.PrinterData;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Shell;
+
+import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
+/**
+ * generic print menu for reports.
+ *
+ *
+ *
+ * SOFTWARE HISTORY
+ * Date Ticket# Engineer Description
+ * ------------ ---------- ----------- --------------------------
+ * Sep 11, 2012 13781 wkwock Initial creation
+ *
+ *
+ *
+ * @author wkwock
+ * @version 1.0
+ */
+
+public class PrintTextReportDlg extends CaveSWTDialog {
+ /**
+ * Text viewer.
+ */
+
+ protected TextReport report;
+
+ /* Vars used in the printing methods */
+ private Printer printer;
+
+ private int lineHeight = 0;
+
+ private int tabWidth = 0;
+
+ private int leftMargin;
+
+ private int rightMargin;
+
+ private int topMargin;
+
+ private int bottomMargin;
+
+ private int x, y;
+
+ private int index, end;
+
+ private StringBuffer wordBuffer;
+
+ private GC gc;
+
+
+ protected PrintTextReportDlg(Shell parentShell,TextReport report) {
+ super(parentShell);
+ this.report=report;
+ }
+
+ @Override
+ protected void initializeComponents(Shell shell) {
+ // TODO Auto-generated method stub
+ createBottomButtons();
+ }
+
+ /**
+ * Send the text to the printer
+ *
+ * @param printer
+ * The printer
+ * @param text
+ * The text to print
+ */
+ private void print(Printer printer, String text) {
+ if (printer.startJob("Text")) {
+ Rectangle clientArea = printer.getClientArea();
+ Rectangle trim = printer.computeTrim(0, 0, 0, 0);
+ Point dpi = printer.getDPI();
+ leftMargin = dpi.x + trim.x; // one inch from left side of paper
+ // one inch from right side of paper
+ rightMargin = clientArea.width - dpi.x + trim.x + trim.width;
+ topMargin = dpi.y + trim.y; // one inch from top edge of paper
+ // one inch from bottom edge of paper
+ bottomMargin = clientArea.height - dpi.y + trim.y + trim.height;
+
+ /* Create a buffer for computing tab width. */
+ int tabSize = 4; // is tab width a user setting in your UI?
+ StringBuffer tabBuffer = new StringBuffer(tabSize);
+ for (int i = 0; i < tabSize; i++) {
+ tabBuffer.append(' ');
+ }
+ String tabs = tabBuffer.toString();
+
+ /*
+ * Create printer GC, and create and set the printer font &
+ * foreground color.
+ */
+ gc = new GC(printer);
+
+ Font printerFont = new Font(printer, "Monospace", 8, SWT.NORMAL);
+
+ Color printerForegroundColor = new Color(printer, new RGB(0, 0, 0));
+ Color printerBackgroundColor = new Color(printer, new RGB(255, 255,
+ 255));
+
+ gc.setFont(printerFont);
+ gc.setForeground(printerForegroundColor);
+ gc.setBackground(printerBackgroundColor);
+ tabWidth = gc.stringExtent(tabs).x;
+ lineHeight = gc.getFontMetrics().getHeight();
+
+ /* Print text to current gc using word wrap */
+ printText(text);
+
+ printer.endJob();
+
+ /* Cleanup graphics resources used in printing */
+ printerFont.dispose();
+ printerForegroundColor.dispose();
+ printerBackgroundColor.dispose();
+ gc.dispose();
+ }
+ }
+
+ /**
+ * Print the text
+ *
+ * @param text
+ * The text to be printed
+ */
+ private void printText(String text) {
+ printer.startPage();
+ wordBuffer = new StringBuffer();
+ x = leftMargin;
+ y = topMargin;
+ index = 0;
+ end = text.length();
+ while (index < end) {
+ char c = text.charAt(index);
+ index++;
+ if (c != 0) {
+ if ((c == 0x0a) || (c == 0x0d)) {
+ if ((c == 0x0d) && (index < end)
+ && (text.charAt(index) == 0x0a)) {
+ index++; // if this is cr-lf, skip the lf
+ }
+ printWordBuffer();
+ newline();
+ } else {
+ if (c != '\t') {
+ wordBuffer.append(c);
+ }
+ if (Character.isWhitespace(c)) {
+ printWordBuffer();
+ if (c == '\t') {
+ x += tabWidth;
+ }
+ }
+ }
+ }
+ }
+ if (y + lineHeight <= bottomMargin) {
+ printer.endPage();
+ }
+ }
+ /**
+ * Word buffer for formating lines on the printed page
+ */
+ private void printWordBuffer() {
+ if (wordBuffer.length() > 0) {
+ String word = wordBuffer.toString();
+ int wordWidth = gc.stringExtent(word).x;
+ if (x + wordWidth > rightMargin) {
+ /* word doesn't fit on current line, so wrap */
+ newline();
+ }
+ gc.drawString(word, x, y, false);
+ x += wordWidth;
+ wordBuffer = new StringBuffer();
+ }
+ }
+
+ /**
+ * New line on the printed page
+ */
+ private void newline() {
+ x = leftMargin;
+ y += lineHeight;
+ if (y + lineHeight > bottomMargin) {
+ printer.endPage();
+ if (index + 1 < end) {
+ y = topMargin;
+ printer.startPage();
+ }
+ }
+ }
+
+ /**
+ * Get data for selected contents for printing
+ * @return
+ */
+ protected String getPrintData () {
+ return "";
+ }
+
+ /**
+ * Create the buttons at the bottom of the display.
+ */
+ protected void createBottomButtons() {
+ GridData mainBtnData = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
+ Composite btnComp = new Composite(shell, SWT.NONE);
+ GridLayout btnGl = new GridLayout(3, false);
+ btnComp.setLayout(btnGl);
+ btnComp.setLayoutData(mainBtnData);
+
+ GridData gd = new GridData(SWT.BEGINNING, SWT.DEFAULT, true, false);
+ gd.widthHint = 110;
+ Button closeBtn = new Button(btnComp, SWT.PUSH);
+ closeBtn.setText("Close");
+ closeBtn.setLayoutData(gd);
+ closeBtn.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent event) {
+ shell.dispose();
+ }
+ });
+
+ gd = new GridData(SWT.END, SWT.DEFAULT, true, false);
+ gd.widthHint = 110;
+ Button printBtn = new Button(btnComp, SWT.PUSH);
+ printBtn.setText("Print");
+ printBtn.setLayoutData(gd);
+ printBtn.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ final String text = getPrintData();
+
+ if (text != null) {
+ PrintDialog dialog = new PrintDialog(shell, SWT.NONE);
+ PrinterData data = dialog.open();
+
+ if (data == null) {
+ return;
+ }
+
+ printer = new Printer(data);
+
+ /*
+ * Do the printing in a background thread so that spooling
+ * does not freeze the UI.
+ */
+ Thread printingThread = new Thread("PrintTable") {
+ @Override
+ public void run() {
+ print(printer, text);
+ printer.dispose();
+ }
+ };
+ printingThread.start();
+
+ }
+ }
+ });
+ }
+}
diff --git a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/textreport/StationListReport.java b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/textreport/StationListReport.java
index 93d2f4fe03..4e4e82469a 100644
--- a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/textreport/StationListReport.java
+++ b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/textreport/StationListReport.java
@@ -28,7 +28,8 @@ package com.raytheon.viz.hydrocommon.textreport;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Sep 18, 2009 2260 mpduff Initial creation
- *
+ * Sep 11, 2012 13781 wkwock add print menu
+ *
*
*
* @author mpduff
@@ -51,17 +52,17 @@ public class StationListReport extends TextReport {
private static final int STALIST_RECORD_LIMIT_PER_PAGE = 54;
/* Types used for ordering columns */
- private static final int STALIST_LID = 1;
+ protected static final int STALIST_LID = 1;
- private static final int STALIST_NAM = 2;
+ protected static final int STALIST_NAM = 2;
- private static final int STALIST_COU = 3;
+ protected static final int STALIST_COU = 3;
- private static final int STALIST_BAS = 4;
+ protected static final int STALIST_BAS = 4;
- private static final int STALIST_WFO = 5;
+ protected static final int STALIST_WFO = 5;
- private static final int STALIST_OBS = 6;
+ protected static final int STALIST_OBS = 6;
private static final int[] sortedby_lid = { STALIST_LID, STALIST_NAM,
STALIST_COU, STALIST_BAS, STALIST_WFO, STALIST_OBS, 0 };
@@ -100,7 +101,187 @@ public class StationListReport extends TextReport {
public String loadTextWidget() {
return getText(0);//, TEXTREPORTS_REASON_NORMAL);
}
+
+
+ public int[] getSortArray(int sort) {
+ int[] sortArray=null;
+ switch (sort) {
+ case TextReportConstants.STALIST_SORTBY_LID:
+ sortArray = sortedby_lid;
+ break;
+ case TextReportConstants.STALIST_SORTBY_NAME:
+ sortArray = sortedby_name;
+ break;
+ case TextReportConstants.STALIST_SORTBY_COUNTY:
+ sortArray = sortedby_county;
+ break;
+ case TextReportConstants.STALIST_SORTBY_BASIN:
+ sortArray = sortedby_basin;
+ break;
+ case TextReportConstants.STALIST_SORTBY_OBSERVER:
+ sortArray = sortedby_observer;
+ break;
+ }
+ return sortArray;
+ }
+ /**
+ * Generate the report.
+ *
+ * @param sort
+ * Which column to sort on
+ *
+ * @return
+ * The text
+ */
+ public String generateSpecialReport(int sort, int[] sortArray) {
+ StringBuilder buffer = new StringBuilder();
+ String hdrTitle = "LIST OF LOCATIONS";
+
+ // Get the data for the report
+ StationList[] slData = TextReportDataManager.getInstance()
+ .getStnListData(sort);
+
+ int recordLimit; /* max num records per "8 1/2 x 11" page */
+ int count = 0; /* for counting the num of records processed so far */
+ int pageNum = 1;
+
+ recordLimit = STALIST_RECORD_LIMIT_PER_PAGE;
+
+ /* Check sort type. */
+ switch (sort) {
+ case TextReportConstants.STALIST_SORTBY_LID:
+ hdrTitle = TITLE_LID;
+ break;
+ case TextReportConstants.STALIST_SORTBY_NAME:
+ hdrTitle = TITLE_NAME;
+ break;
+ case TextReportConstants.STALIST_SORTBY_COUNTY:
+ hdrTitle = TITLE_COUNTY;
+ break;
+ case TextReportConstants.STALIST_SORTBY_BASIN:
+ hdrTitle = TITLE_BASIN;
+ break;
+ case TextReportConstants.STALIST_SORTBY_OBSERVER:
+ hdrTitle = TITLE_OBSERVER;
+ break;
+ }
+
+ /* Build header line. */
+ buffer.append(getHeaderLine(hdrTitle, pageNum, sortArray));
+
+ /*
+ * Keep building the list of locations (& headers) for the given
+ * pageType until there are no more records or until the record_limit is
+ * reached.
+ */
+ for (int j = 0; j < slData.length; j++) {
+ /* Write out a single output line as specified by the order. */
+ buffer.append(" ");
+ for (int i = 0; i < sortArray.length; i++) {
+ switch (sortArray[i]) {
+ case STALIST_LID:
+ buffer.append(String.format("%-8s", slData[j].getLid()));
+ break;
+ case STALIST_NAM:
+ if (slData[j].getName() != null) {
+ if (slData[j].getName().length() > 20) {
+ buffer.append(String.format("%-20s", slData[j]
+ .getName().substring(0, 20)));
+ } else {
+ buffer.append(String.format("%-20s", slData[j]
+ .getName()));
+ }
+ } else {
+ buffer.append(String.format("%-8s", " "));
+ }
+ break;
+ case STALIST_COU:
+ buffer
+ .append(String.format("%-20s", slData[j]
+ .getCounty()));
+ break;
+ case STALIST_BAS:
+ if (slData[j].getRb() != null) {
+ if (slData[j].getRb().length() > 20) {
+ buffer.append(String.format("%-20s", slData[j]
+ .getRb().substring(0, 20)));
+ } else {
+ buffer.append(String.format("%-20s", slData[j]
+ .getRb()));
+ }
+ } else {
+ buffer.append(String.format("%-20s", " "));
+ }
+ break;
+ case STALIST_WFO:
+ buffer.append(String.format("%-3s", slData[j].getWfo()));
+ break;
+ case STALIST_OBS:
+ if (slData[j].getLastname() != null) {
+ if (slData[j].getLastname().length() > 24) {
+ buffer.append(String.format("%-24s", slData[j]
+ .getLastname().substring(0, 24)));
+ } else {
+ buffer.append(String.format("%-24s", slData[j]
+ .getLastname()));
+ }
+ } else {
+ buffer.append(String.format("%-24s", " "));
+ }
+ break;
+ }
+
+ buffer.append(" ");
+ }
+
+ if (slData[j].getHPhone() != null) {
+ if (slData[j].getHPhone().length() > 12) {
+ buffer.append(String.format("%-12s", slData[j].getHPhone()
+ .substring(0, 12)));
+ } else {
+ buffer
+ .append(String.format("%-12s", slData[j]
+ .getHPhone()));
+ }
+ } else {
+ buffer.append(String.format("%-12s", " "));
+ }
+ buffer.append(" ");
+
+ if (slData[j].getOPhone() != null) {
+ if (slData[j].getOPhone().length() > 14) {
+ buffer.append(String.format("%-14s\n", slData[j]
+ .getOPhone().substring(0, 14)));
+ } else {
+ buffer.append(String.format("%-14s\n", slData[j]
+ .getOPhone()));
+ }
+ } else {
+ buffer.append(String.format("%-14s\n", " "));
+ }
+ count++;
+
+ /*
+ * End of page reached, print header and reset count, increment
+ * pageNum
+ */
+ if (count == recordLimit) {
+ pageNum++;
+ buffer.append("\n");
+ buffer.append(getHeaderLine(hdrTitle, pageNum, sortArray));
+ count = 0;
+ }
+ }
+
+ /* Paginate */
+ for (int i = count; i < 60; i++) {
+ buffer.append("\n");
+ }
+
+ return buffer.toString();
+ }
+
/**
* Generate the report.
*
diff --git a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/textreport/TextReportDlg.java b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/textreport/TextReportDlg.java
index 3db31eabdb..f20afe9a70 100644
--- a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/textreport/TextReportDlg.java
+++ b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/textreport/TextReportDlg.java
@@ -27,17 +27,9 @@ import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.printing.PrintDialog;
-import org.eclipse.swt.printing.Printer;
-import org.eclipse.swt.printing.PrinterData;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
@@ -66,6 +58,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
* Sep 9, 2008 lvenable Initial creation
* Dec 16, 2008 1787 askripsk Started report generation.
* Sep 23, 2009 2260 mpduff Finished the dialog,
+ * Aug 20, 2012 13781 wkwock Added print menu for 6 text reports
*
*
*
@@ -108,29 +101,6 @@ public class TextReportDlg extends CaveSWTDialog {
private TextReport report;
- /* Vars used in the printing methods */
- private Printer printer;
-
- private int lineHeight = 0;
-
- private int tabWidth = 0;
-
- private int leftMargin;
-
- private int rightMargin;
-
- private int topMargin;
-
- private int bottomMargin;
-
- private int x, y;
-
- private int index, end;
-
- private StringBuffer wordBuffer;
-
- private GC gc;
-
/**
* Constructor.
*
@@ -400,35 +370,31 @@ public class TextReportDlg extends CaveSWTDialog {
Button printBtn = new Button(btnComp, SWT.PUSH);
printBtn.setText("Print");
printBtn.setLayoutData(gd);
+ final TextReportDlg txtRptDlg=this;
printBtn.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
- final String text = textViewer.getText();
-
- if (text != null) {
- PrintDialog dialog = new PrintDialog(shell, SWT.NONE);
- PrinterData data = dialog.open();
-
- if (data == null) {
- return;
- }
-
- printer = new Printer(data);
-
- /*
- * Do the printing in a background thread so that spooling
- * does not freeze the UI.
- */
- Thread printingThread = new Thread("PrintTable") {
- @Override
- public void run() {
- print(printer, text);
- printer.dispose();
- }
- };
- printingThread.start();
-
- }
+ if (report.getClass().getName().equals(E19Report.class.getName())){
+ PrintE19TextReportDlg ptr = new PrintE19TextReportDlg(shell,(E19Report)report);
+ ptr.open();
+ } else if (report.getClass().getName().equals(E19AReport.class.getName())) {
+ PrintE19ATextReportDlg ptr = new PrintE19ATextReportDlg(shell,(E19AReport)report);
+ ptr.open();
+ } else if (report.getClass().getName().equals(B44AReport.class.getName())) {
+ PrintB44ATextReportDlg ptr = new PrintB44ATextReportDlg(shell,(B44AReport)report);
+ ptr.open();
+ }else if (report.getClass().getName().equals(ServiceBackupReport.class.getName())) {
+ PrintSvcBkTextReportDlg ptr = new PrintSvcBkTextReportDlg(shell,(ServiceBackupReport)report);
+ ptr.setTextReportDlg(txtRptDlg);
+ ptr.open();
+ }else if (report.getClass().getName().equals(StationClassReport.class.getName())) {
+ PrintStnClassTextReportDlg ptr = new PrintStnClassTextReportDlg(shell,(StationClassReport)report);
+ ptr.open();
+ }else if (report.getClass().getName().equals(StationListReport.class.getName())) {
+ PrintSortedStnTextReportDlg ptr = new PrintSortedStnTextReportDlg(shell,(StationListReport)report);
+ ptr.setTextReportDlg(txtRptDlg);
+ ptr.open();
+ }
}
});
}
@@ -444,6 +410,13 @@ public class TextReportDlg extends CaveSWTDialog {
}
}
+ /**
+ *
+ */
+ public int getPageSelectionIndex () {
+ return this.pageCbo.getSelectionIndex();
+ }
+
/**
* Event handler for Report combobox. This populates the page combobox and
* displays the report
@@ -600,147 +573,4 @@ public class TextReportDlg extends CaveSWTDialog {
// text at the top of the page
textViewer.setSelection(offset);
}
-
- /**
- * Send the text to the printer
- *
- * @param printer
- * The printer
- * @param text
- * The text to print
- */
- private void print(Printer printer, String text) {
- if (printer.startJob("Text")) {
- Rectangle clientArea = printer.getClientArea();
- Rectangle trim = printer.computeTrim(0, 0, 0, 0);
- Point dpi = printer.getDPI();
- leftMargin = dpi.x + trim.x; // one inch from left side of paper
- rightMargin = clientArea.width - dpi.x + trim.x + trim.width; // one
- // inch
- // from
- // right
- // side
- // of
- // paper
- topMargin = dpi.y + trim.y; // one inch from top edge of paper
- bottomMargin = clientArea.height - dpi.y + trim.y + trim.height; // one
- // inch
- // from
- // bottom
- // edge
- // of
- // paper
-
- /* Create a buffer for computing tab width. */
- int tabSize = 4; // is tab width a user setting in your UI?
- StringBuffer tabBuffer = new StringBuffer(tabSize);
- for (int i = 0; i < tabSize; i++) {
- tabBuffer.append(' ');
- }
- String tabs = tabBuffer.toString();
-
- /*
- * Create printer GC, and create and set the printer font &
- * foreground color.
- */
- gc = new GC(printer);
-
- Font printerFont = new Font(printer, "Monospace", 8, SWT.NORMAL);
-
- Color printerForegroundColor = new Color(printer, new RGB(0, 0, 0));
- Color printerBackgroundColor = new Color(printer, new RGB(255, 255,
- 255));
-
- gc.setFont(printerFont);
- gc.setForeground(printerForegroundColor);
- gc.setBackground(printerBackgroundColor);
- tabWidth = gc.stringExtent(tabs).x;
- lineHeight = gc.getFontMetrics().getHeight();
-
- /* Print text to current gc using word wrap */
- printText(text);
-
- printer.endJob();
-
- /* Cleanup graphics resources used in printing */
- printerFont.dispose();
- printerForegroundColor.dispose();
- printerBackgroundColor.dispose();
- gc.dispose();
- }
- }
-
- /**
- * Print the text
- *
- * @param text
- * The text to be printed
- */
- private void printText(String text) {
- printer.startPage();
- wordBuffer = new StringBuffer();
- x = leftMargin;
- y = topMargin;
- index = 0;
- end = text.length();
- while (index < end) {
- char c = text.charAt(index);
- index++;
- if (c != 0) {
- if ((c == 0x0a) || (c == 0x0d)) {
- if ((c == 0x0d) && (index < end)
- && (text.charAt(index) == 0x0a)) {
- index++; // if this is cr-lf, skip the lf
- }
- printWordBuffer();
- newline();
- } else {
- if (c != '\t') {
- wordBuffer.append(c);
- }
- if (Character.isWhitespace(c)) {
- printWordBuffer();
- if (c == '\t') {
- x += tabWidth;
- }
- }
- }
- }
- }
- if (y + lineHeight <= bottomMargin) {
- printer.endPage();
- }
- }
-
- /**
- * Word buffer for formating lines on the printed page
- */
- private void printWordBuffer() {
- if (wordBuffer.length() > 0) {
- String word = wordBuffer.toString();
- int wordWidth = gc.stringExtent(word).x;
- if (x + wordWidth > rightMargin) {
- /* word doesn't fit on current line, so wrap */
- newline();
- }
- gc.drawString(word, x, y, false);
- x += wordWidth;
- wordBuffer = new StringBuffer();
- }
- }
-
- /**
- * New line on the printed page
- */
- private void newline() {
- x = leftMargin;
- y += lineHeight;
- if (y + lineHeight > bottomMargin) {
- printer.endPage();
- if (index + 1 < end) {
- y = topMargin;
- printer.startPage();
- }
- }
- }
}
diff --git a/cave/com.raytheon.viz.lightning/src/com/raytheon/viz/lightning/LightningResource.java b/cave/com.raytheon.viz.lightning/src/com/raytheon/viz/lightning/LightningResource.java
index b3215c3dac..54e4232210 100644
--- a/cave/com.raytheon.viz.lightning/src/com/raytheon/viz/lightning/LightningResource.java
+++ b/cave/com.raytheon.viz.lightning/src/com/raytheon/viz/lightning/LightningResource.java
@@ -90,6 +90,8 @@ import com.raytheon.uf.viz.core.rsc.capabilities.MagnificationCapability;
* "-" symbols as well as the font size of the
* text will be updated when the user changes
* the magnification level now.
+ * Sep 4, 2012 15335 kshresth Will now display lightning/wind
+ * fields when magnification set to 0
*
*
*
@@ -352,7 +354,9 @@ public class LightningResource extends
int posCount = 0;
int negCount = 0;
-
+
+ if (magnification == 0.0) magnification=(float) 0.01;
+
IExtent extent = paintProps.getView().getExtent();
CacheObject cacheObject = cacheObjectMap
diff --git a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/rsc/MPEGageResource.java b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/rsc/MPEGageResource.java
index d947558b40..7579c05884 100644
--- a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/rsc/MPEGageResource.java
+++ b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/rsc/MPEGageResource.java
@@ -34,10 +34,6 @@ import java.util.ListIterator;
import java.util.Set;
import java.util.TimeZone;
-import javax.measure.converter.UnitConverter;
-import javax.measure.unit.NonSI;
-import javax.measure.unit.SI;
-
import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.graphics.RGB;
@@ -96,6 +92,7 @@ import com.vividsolutions.jts.index.strtree.STRtree;
* Feb 8, 2011 mschenke Initial creation
* Aug 8, 2012 15271 snaples Updated hourly slot
* Aug 17, 2012 15271 snaples Added check to add only PP gages
+ * Sep 5, 2012 15079 snaples Added constant for Milli to inches conversion factor
*
*
*
@@ -349,18 +346,14 @@ public class MPEGageResource extends AbstractMPEInputResource {
// draw the value
if (!gageData.isManedit()) {
if (gageData.getId().contains("PSEUDO")) {
- UnitConverter conv = SI.MILLIMETER
- .getConverterTo(NonSI.INCH);
gageValue = String.format("%5.2f",
- conv.convert(gageData.getGval()));
+ gageData.getGval() / MILLICVT);
}
} else {
if (gageData.getId().contains("PSEUDO")
&& !isMissing) {
- UnitConverter conv = SI.MILLIMETER
- .getConverterTo(NonSI.INCH);
gageValue = String.format("%5.2f",
- conv.convert(gageData.getGval()));
+ gageData.getGval() / MILLICVT);
}
}
}
diff --git a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/rsc/XmrgResource.java b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/rsc/XmrgResource.java
index 9e610454ac..c54baac536 100644
--- a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/rsc/XmrgResource.java
+++ b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/rsc/XmrgResource.java
@@ -93,6 +93,7 @@ import com.vividsolutions.jts.geom.GeometryFactory;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Oct 23, 2008 randerso Initial creation
+ * Sep 5, 2012 15079 snaples Updated interrogate method to handle values without rounding errors.
*
*
* @author randerso
@@ -121,6 +122,8 @@ public class XmrgResource extends
private static final GeometryFactory gf = new GeometryFactory();
+ private static final double MILLICVT = 25.4;
+
private XmrgFile xmrg;
private HRAPSubGrid subGrid;
@@ -133,7 +136,7 @@ public class XmrgResource extends
private final float contrast = 1.0f;
- private boolean isInterpolated = true;
+ private final boolean isInterpolated = true;
private final MPEDisplayManager displayMgr;
@@ -579,11 +582,16 @@ public class XmrgResource extends
} else if (s > 0 && s <= 24) {
s = 0;
}
- f = (float) parameters.getDataToDisplayConverter()
+ if ((cv_use.equalsIgnoreCase("Locbias") || cv_use.equalsIgnoreCase("height") || cv_use.equalsIgnoreCase("locspan") ||
+ tempsval == -1))
+ {
+ f = (float) parameters.getDataToDisplayConverter()
.convert(s);
+ } else {
+ f = (float) (s / 100 / MILLICVT);
+ }
}
- float aa = (float) ((Math.floor((int) (f * 100))) / 100.0);
- String da = String.format("%2.2f", aa);
+ String da = String.format("%2.2f", f);
values.put("Value", da);
}
}
diff --git a/cave/com.raytheon.viz.satellite/localization/menus/satellite/baseOCONUSBlendedDerivedProductsImagery.xml b/cave/com.raytheon.viz.satellite/localization/menus/satellite/baseOCONUSBlendedDerivedProductsImagery.xml
new file mode 100644
index 0000000000..49c45e4bce
--- /dev/null
+++ b/cave/com.raytheon.viz.satellite/localization/menus/satellite/baseOCONUSBlendedDerivedProductsImagery.xml
@@ -0,0 +1,46 @@
+
+
+
+
+ /satellite/%/NESDIS/POES-NPOESS/Supernational/Rain_fall_rate
+
+
+
+
+
+
+
+ /satellite/%/NESDIS/Miscellaneous/Supernational/Sounder_Based_Derived_Precipitable_Water_(PW)
+
+
+
+
+
+ /satellite/%/NESDIS/Miscellaneous/Supernational/Percent_of_Normal_TPW
+
+
+
+
+
diff --git a/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/AfosBrowserModel.java b/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/AfosBrowserModel.java
old mode 100755
new mode 100644
diff --git a/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/alarmalert/dialogs/CurrentAlarmQueue.java b/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/alarmalert/dialogs/CurrentAlarmQueue.java
index c25183a79e..ea12b4095d 100644
--- a/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/alarmalert/dialogs/CurrentAlarmQueue.java
+++ b/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/alarmalert/dialogs/CurrentAlarmQueue.java
@@ -89,6 +89,9 @@ import com.raytheon.viz.ui.dialogs.ModeListener;
* current alarm queue window.
* May 23, 2012 14952 rferrel Now use refTime/createtime to display
* selected product
+ * Aug 28, 2012 14795 mgamazaychikov Fixed problem with "Unhadled event loop"
+ * exception associated with closing
+ * "Current Alarm Queue" GUI
*
*
* @author mnash
@@ -477,7 +480,16 @@ public class CurrentAlarmQueue extends CaveSWTDialog implements
alarmDisplayDlg.setDialogFocus();
}
}
- displayAll.setEnabled(false);
+ /*
+ * DR14795 - fix the "Unhandled event loop" exception
+ * by calling setEnabled on displayAll only
+ * for a valid list
+ */
+ if (list != null && !list.isDisposed()) {
+ if (list.getItemCount() == 0) {
+ displayAll.setEnabled(false);
+ }
+ }
}
/**
diff --git a/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/dialogs/AfosBrowserDlg.java b/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/dialogs/AfosBrowserDlg.java
old mode 100755
new mode 100644
diff --git a/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/dialogs/RemoteSiteRequestDlg.java b/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/dialogs/RemoteSiteRequestDlg.java
old mode 100755
new mode 100644
diff --git a/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/dialogs/TextEditorDialog.java b/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/dialogs/TextEditorDialog.java
index af0612a26c..df13ccbbb9 100644
--- a/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/dialogs/TextEditorDialog.java
+++ b/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/dialogs/TextEditorDialog.java
@@ -284,6 +284,9 @@ import com.raytheon.viz.ui.dialogs.SWTMessageBox;
* 25JUL2012 14459 rferrel Strip WMH headers when getting all METARs.
* 13AUG2012 14613 M.Gamazaychikov Ensured the WMO and MND header times are the same.
* 20AUG2012 15340 D.Friedman Use callbacks for stop sign dialog. Prevent NOR in header.
+ * 10Sep2012 15103 M.Gamazaychikov DR15103 -do not clear AFOS command from the text box
+ * when obs are updated and refactored executeCommand
+ * 10SEP2012 15401 D.Friedman Fix QC problem caused by DR 15340.
*
*
* @author lvenable
@@ -3904,7 +3907,8 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
setHeaderTextField(wmoId, siteId, currentDateId, "\n", nnnxxx);
} else {
setHeaderTextField(tdm.getWmoId(token), tdm.getSiteId(token),
- currentDateId + " " + bbbid, "\n", nnnxxx);
+ bbbid.length() > 0 ? currentDateId + " " + bbbid
+ : currentDateId, "\n", nnnxxx);
}
// Update the "now editing" title of the text editor window.
@@ -5228,9 +5232,12 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
public String getAddressee() {
return addressee;
}
-
- @Override
+
public void executeCommand(ICommand command) {
+ executeCommand(command, false);
+ }
+
+ public void executeCommand(ICommand command, boolean isObsUpdated) {
if (isDisposed()) {
return;
}
@@ -5334,7 +5341,13 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
TextDisplayModel.getInstance().createStdTextProduct(token,
w, siteNode);
}
- clearAfosCmdTF();
+ /*
+ * DR15103 - do not clear AFOS command from the text box
+ * when obs are updated
+ */
+ if ( !isObsUpdated ) {
+ clearAfosCmdTF();
+ }
clearWmoTF();
clearAwipsIdTF();
} else {
@@ -6443,7 +6456,12 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
@Override
public void run() {
- executeCommand(command);
+ /*
+ * DR15103 - set the flag to 'true' before executing
+ * AFOS command so the AFOS command box is not cleared
+ * when obs are updated
+ */
+ executeCommand(command, true);
}
}
diff --git a/cave/com.raytheon.viz.textworkstation/src/com/raytheon/viz/textworkstation/TextWorkstationDlg.java b/cave/com.raytheon.viz.textworkstation/src/com/raytheon/viz/textworkstation/TextWorkstationDlg.java
old mode 100755
new mode 100644
diff --git a/cave/com.raytheon.viz.volumebrowser/localization/menus/volume/ModelFamilies.xml b/cave/com.raytheon.viz.volumebrowser/localization/menus/volume/ModelFamilies.xml
new file mode 100644
index 0000000000..54556827c4
--- /dev/null
+++ b/cave/com.raytheon.viz.volumebrowser/localization/menus/volume/ModelFamilies.xml
@@ -0,0 +1,921 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/cave/com.raytheon.viz.volumebrowser/localization/menus/volume/index.xml b/cave/com.raytheon.viz.volumebrowser/localization/menus/volume/index.xml
index 3d1422e564..e832ad8001 100644
--- a/cave/com.raytheon.viz.volumebrowser/localization/menus/volume/index.xml
+++ b/cave/com.raytheon.viz.volumebrowser/localization/menus/volume/index.xml
@@ -30,6 +30,9 @@
+
+
@@ -42,4 +45,4 @@
-
\ No newline at end of file
+
diff --git a/cave/com.raytheon.viz.volumebrowser/localization/menus/xml/fieldsMenus.xml b/cave/com.raytheon.viz.volumebrowser/localization/menus/xml/fieldsMenus.xml
index b1021f011f..6df01ea438 100644
--- a/cave/com.raytheon.viz.volumebrowser/localization/menus/xml/fieldsMenus.xml
+++ b/cave/com.raytheon.viz.volumebrowser/localization/menus/xml/fieldsMenus.xml
@@ -722,6 +722,407 @@
-->
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
\ No newline at end of file
+
diff --git a/cave/com.raytheon.viz.volumebrowser/localization/menus/xml/planesMenusPlanView.xml b/cave/com.raytheon.viz.volumebrowser/localization/menus/xml/planesMenusPlanView.xml
index dc178f59ab..ec736b0584 100644
--- a/cave/com.raytheon.viz.volumebrowser/localization/menus/xml/planesMenusPlanView.xml
+++ b/cave/com.raytheon.viz.volumebrowser/localization/menus/xml/planesMenusPlanView.xml
@@ -297,7 +297,12 @@
Misc menu item
-->
-
+
+
+
+
+
+
@@ -389,4 +394,4 @@
-
\ No newline at end of file
+
diff --git a/cave/com.raytheon.viz.volumebrowser/localization/volumebrowser/LevelMappingFile.xml b/cave/com.raytheon.viz.volumebrowser/localization/volumebrowser/LevelMappingFile.xml
index 95e1a53c13..a025e86afa 100644
--- a/cave/com.raytheon.viz.volumebrowser/localization/volumebrowser/LevelMappingFile.xml
+++ b/cave/com.raytheon.viz.volumebrowser/localization/volumebrowser/LevelMappingFile.xml
@@ -19,6 +19,22 @@
further_licensing_information.
-->
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -1335,4 +1351,4 @@
-
\ No newline at end of file
+
diff --git a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/template/TemplateRunner.java b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/template/TemplateRunner.java
index e162b349d9..c39ec708da 100644
--- a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/template/TemplateRunner.java
+++ b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/template/TemplateRunner.java
@@ -71,8 +71,10 @@ import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.common.status.UFStatus.Priority;
import com.raytheon.uf.common.time.DataTime;
import com.raytheon.uf.common.time.SimulatedTime;
+import com.raytheon.uf.common.util.FileUtil;
import com.raytheon.uf.edex.core.EdexException;
import com.raytheon.uf.viz.core.exception.VizException;
+import com.raytheon.uf.viz.core.localization.LocalizationManager;
import com.raytheon.uf.viz.core.maps.rsc.DbMapQueryFactory;
import com.raytheon.uf.viz.core.requests.ThriftClient;
import com.raytheon.viz.awipstools.ToolsDataManager;
@@ -122,7 +124,8 @@ import com.vividsolutions.jts.io.WKTReader;
* Jun 15, 2012 15043 Qinglu Lin Added duration to context.
* Jul 16, 2012 15091 Qinglu Lin Compute intersection area, which is used for prevent 2nd timezone
* from appearing in 2nd and 3rd bullets when not necessary.
- * Aug 13, 2012 14493 Qinglu Lin Handled MND time, event time, and TML time specially for COR to NEW.
+ * Aug 13, 2012 14493 Qinglu Lin Handled MND time, event time, and TML time specially for COR to NEW.
+ * Sep 10, 2012 15295 snaples Added property setting for runtime log to createScript.
*
*
*
@@ -741,7 +744,8 @@ public class TemplateRunner {
long tz0 = System.currentTimeMillis();
String script = createScript(warngenLayer.getTemplateName() + ".vm",
- context, warngenLayer.getLocalizedSite());
+ context, warngenLayer.getLocalizedSite(),
+ FileUtil.join(LocalizationManager.getUserDir(), "logs"));
System.out.println("velocity time: "
+ (System.currentTimeMillis() - tz0));
@@ -754,7 +758,7 @@ public class TemplateRunner {
private static VelocityEngine ENGINE = new VelocityEngine();
private static synchronized String createScript(String vmFile,
- VelocityContext context, String site) throws EdexException {
+ VelocityContext context, String site, String logDir) throws EdexException {
StringWriter sw = new StringWriter();
try {
Properties p = new Properties();
@@ -765,6 +769,8 @@ public class TemplateRunner {
p.setProperty(
"velocimacro.permissions.allow.inline.to.replace.global",
"true");
+ p.setProperty("runtime.log",
+ FileUtil.join(logDir, "velocity.log"));
ENGINE.init(p);
context.put("scriptLibrary", "VM_global_library.vm");
Template template = ENGINE.getTemplate(vmFile,
diff --git a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/util/WarningTextHandler.java b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/util/WarningTextHandler.java
index 3754150537..c63e16caf6 100644
--- a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/util/WarningTextHandler.java
+++ b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/util/WarningTextHandler.java
@@ -64,6 +64,8 @@ import com.raytheon.viz.warngen.gis.AffectedAreasComparator;
* d)NullointException/locking does not work for special marine warning
* and locking beyond first paragragh.
* Jul 17, 2012 14989 Qinglu Lin Removed locks, and , for county names in pathcast line.
+ * Sep 11, 2012 15372 Qinglu Lin Adjusted code so that and in the line of "MAINLY RURAL AREAS"
+ * were removed as well.
*
*
*
@@ -349,7 +351,7 @@ public class WarningTextHandler {
}
}
- boolean ruralFound = false, ruralReplace = false;
+ boolean ruralFound = false, ruralReplaced = false;
ArrayList usedAreaNotations = new ArrayList();
for (int lineIndex = 0; lineIndex < seperatedLines.length; ++lineIndex) {
String line = seperatedLines[lineIndex];
@@ -359,7 +361,7 @@ public class WarningTextHandler {
before = false;
}
- if (!ruralFound && line.contains("MAINLY RURAL AREAS")) {
+ if (!ruralFound && !ruralReplaced && line.contains("MAINLY RURAL AREAS")) {
ruralFound = true;
}
@@ -436,18 +438,16 @@ public class WarningTextHandler {
}
if (ruralFound)
- if (!ruralReplace)
- ruralReplace = true;
- else if (ruralReplace) {
- if (line.trim().length() == 0)
- ruralFound = false;
- else {
- line = line.replace("", "");
- line = line.replace("", "");
- sb.append(line + "\n");
- continue;
- }
- }
+ if (line.trim().length() == 0)
+ ruralFound = false;
+ else {
+ line = line.replace("", "");
+ line = line.replace("", "");
+ sb.append(line + "\n");
+ if (!ruralReplaced)
+ ruralReplaced = true;
+ continue;
+ }
if (line.trim().length() == 0) {
insideTML = false;
diff --git a/deltaScripts/12.5.1/drop_gfe_tables.sh b/deltaScripts/12.5.1/drop_gfe_tables.sh
old mode 100755
new mode 100644
diff --git a/edexOsgi/build.edex/esb/bin/start.sh b/edexOsgi/build.edex/esb/bin/start.sh
old mode 100755
new mode 100644
diff --git a/edexOsgi/build.edex/esb/data/utility/edex_static/base/textproducts/Generator.py b/edexOsgi/build.edex/esb/data/utility/edex_static/base/textproducts/Generator.py
old mode 100755
new mode 100644
diff --git a/edexOsgi/com.raytheon.edex.plugin.bufrua/src/com/raytheon/edex/plugin/bufrua/decoder/AbstractBUFRUAAdapter.java b/edexOsgi/com.raytheon.edex.plugin.bufrua/src/com/raytheon/edex/plugin/bufrua/decoder/AbstractBUFRUAAdapter.java
index 9b016312d4..01f207556d 100644
--- a/edexOsgi/com.raytheon.edex.plugin.bufrua/src/com/raytheon/edex/plugin/bufrua/decoder/AbstractBUFRUAAdapter.java
+++ b/edexOsgi/com.raytheon.edex.plugin.bufrua/src/com/raytheon/edex/plugin/bufrua/decoder/AbstractBUFRUAAdapter.java
@@ -49,6 +49,8 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 20080303 969 jkorman Initial implementation.
+ * 2012-09-07 DR 15316 M. Porricelli Removed adjustment of
+ * valid time hour
*
*
*
@@ -60,10 +62,10 @@ public abstract class AbstractBUFRUAAdapter extends BUFRPointDataAdapter
// Allowable future time in milliseconds (2 hours).
private static final long ALLOWABLE_TIME = 2 * 3600 * 1000;
- private static final int[] HOUR_MAP = {
- // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
- 0, -1, -2, -3, 2, 1, 0, -1, -2, -3, 2, 1, 0, -1, -2, -3, 2, 1, 0,
- -1, -2, -3, 2, 1 };
+// private static final int[] HOUR_MAP = {
+// // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
+// 0, -1, -2, -3, 2, 1, 0, -1, -2, -3, 2, 1, 0, -1, -2, -3, 2, 1, 0,
+// -1, -2, -3, 2, 1 };
private static final int YEAR_POS = 4;
@@ -115,9 +117,9 @@ public abstract class AbstractBUFRUAAdapter extends BUFRPointDataAdapter
Calendar relTime = TimeTools.copy(validTime);
- // Now offset the "record" validTime using the hour mapping.
- int hour = validTime.get(Calendar.HOUR_OF_DAY);
- validTime.add(Calendar.HOUR_OF_DAY, HOUR_MAP[hour]);
+// // Now offset the "record" validTime using the hour mapping.
+// int hour = validTime.get(Calendar.HOUR_OF_DAY);
+// validTime.add(Calendar.HOUR_OF_DAY, HOUR_MAP[hour]);
// Set the new validTime back into the UAObs record.
obsData.setValidTime(validTime);
diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/db/dao/GFEDao.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/db/dao/GFEDao.java
index 5bb4adb48b..a1cdba2702 100644
--- a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/db/dao/GFEDao.java
+++ b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/db/dao/GFEDao.java
@@ -103,6 +103,8 @@ import com.raytheon.uf.edex.database.query.DatabaseQuery;
* 06/17/09 #2380 randerso Removed purging of grid history.
* Should cascade when record deleted.
* 08/07/09 #2763 njensen Refactored queryByD2DParmId
+ * 09/10/12 DR15137 ryu Changed for MOSGuide D2D mxt/mnt grids for consistency
+ * with A1.
*
*
* @author bphillip
@@ -625,11 +627,17 @@ public class GFEDao extends DefaultPluginDao {
for (int i = 0; i < records.size(); i++) {
TimeRange gribTime = records.get(i).getDataTime().getValidPeriod();
- TimeRange time = info.getTimeConstraints().constraintTime(
- gribTime.getStart());
try {
- if (D2DGridDatabase.isNonAccumDuration(id, gribTimes)
- && !isMos(id)) {
+ if (isMos(id)) {
+ TimeRange time = info.getTimeConstraints().constraintTime(
+ gribTime.getEnd());
+ if (timeRange.getEnd().equals(time.getEnd())
+ || !info.getTimeConstraints().anyConstraints()) {
+ GribRecord retVal = records.get(i);
+ retVal.setPluginName("grib");
+ return retVal;
+ }
+ } else if (D2DGridDatabase.isNonAccumDuration(id, gribTimes)) {
if (timeRange.getStart().equals(gribTime.getEnd())
|| timeRange.equals(gribTime)) {
GribRecord retVal = records.get(i);
@@ -638,6 +646,8 @@ public class GFEDao extends DefaultPluginDao {
}
} else {
+ TimeRange time = info.getTimeConstraints().constraintTime(
+ gribTime.getStart());
if ((timeRange.getStart().equals(time.getStart()) || !info
.getTimeConstraints().anyConstraints())) {
GribRecord retVal = records.get(i);
@@ -651,7 +661,6 @@ public class GFEDao extends DefaultPluginDao {
+ id.getDbId().getSiteId(), e);
}
}
- // }
return null;
}
@@ -843,8 +852,8 @@ public class GFEDao extends DefaultPluginDao {
List results = executeD2DParmQuery(id);
for (DataTime o : results) {
if (isMos(id)) {
- timeList.add(new TimeRange(o.getValidPeriod().getStart(),
- 3600 * 1000));
+ timeList.add(new TimeRange(o.getValidPeriod().getEnd(),
+ o.getValidPeriod().getDuration()));
} else {
timeList.add(o.getValidPeriod());
}
diff --git a/edexOsgi/com.raytheon.edex.plugin.radar/src/com/raytheon/edex/plugin/radar/util/Import88DLocationsUtil.java b/edexOsgi/com.raytheon.edex.plugin.radar/src/com/raytheon/edex/plugin/radar/util/Import88DLocationsUtil.java
index a291d56405..d5a300643e 100644
--- a/edexOsgi/com.raytheon.edex.plugin.radar/src/com/raytheon/edex/plugin/radar/util/Import88DLocationsUtil.java
+++ b/edexOsgi/com.raytheon.edex.plugin.radar/src/com/raytheon/edex/plugin/radar/util/Import88DLocationsUtil.java
@@ -27,7 +27,10 @@ import com.raytheon.uf.common.site.ingest.INationalDatasetSubscriber;
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.database.DataAccessLayerException;
+import com.vividsolutions.jts.geom.GeometryFactory;
import com.vividsolutions.jts.geom.Point;
+import com.vividsolutions.jts.geom.PrecisionModel;
import com.vividsolutions.jts.io.ParseException;
import com.vividsolutions.jts.io.WKTReader;
@@ -39,6 +42,7 @@ import com.vividsolutions.jts.io.WKTReader;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 10Oct2011 10520 JWork Initial check-in.
+ * 09/11/2012 DR 15366 D. Friedman Set SRID on radar stations.
*
*
*/
@@ -52,6 +56,8 @@ public class Import88DLocationsUtil implements INationalDatasetSubscriber {
private static final String CONFIG_FILE_NAME = "ndm"
+ IPathManager.SEPARATOR;
+ private static final int WGS84_SRID = 4326;
+
// The list of the required file comprising a Shapefile set
private ArrayList theRadarShapeFileList = new ArrayList() {
private static final long serialVersionUID = 1L;
@@ -265,6 +271,21 @@ public class Import88DLocationsUtil implements INationalDatasetSubscriber {
for (RadarStation station : aStationList) {
radarStationDAO.saveOrUpdate(station);
}
+
+ /*
+ * Kludge for DR 15366: The GeoTools WKBWriter does not store SRIDs so
+ * we must update them manually.
+ *
+ * Once GetTools is updated/fixed, this should be removed.
+ */
+ try {
+ radarStationDAO
+ .executeNativeSql("update radar_spatial set the_geom=st_setsrid(the_geom, 4326)");
+ } catch (DataAccessLayerException e) {
+ statusHandler.handle(Priority.ERROR,
+ "Failed to update the SRIDs in the radar_spatial_table", e);
+ }
+
if (statusHandler.isPriorityEnabled(Priority.INFO)) {
statusHandler
.handle(Priority.INFO,
@@ -301,7 +322,8 @@ public class Import88DLocationsUtil implements INationalDatasetSubscriber {
String rda_id = null;
RadarStation tempStation = null;
Set keySet = null;
- WKTReader wkt = new WKTReader();
+ GeometryFactory gf = new GeometryFactory(new PrecisionModel(), WGS84_SRID);
+ WKTReader wkt = new WKTReader(gf);
for (HashMap aHashMap : aDataList) {
keySet = aHashMap.keySet();
tempStation = new RadarStation();
diff --git a/edexOsgi/com.raytheon.edex.plugin.satellite/src/com/raytheon/edex/util/satellite/SatelliteMenuUtil.java b/edexOsgi/com.raytheon.edex.plugin.satellite/src/com/raytheon/edex/util/satellite/SatelliteMenuUtil.java
index e5200f91d8..cfa3ff0cea 100644
--- a/edexOsgi/com.raytheon.edex.plugin.satellite/src/com/raytheon/edex/util/satellite/SatelliteMenuUtil.java
+++ b/edexOsgi/com.raytheon.edex.plugin.satellite/src/com/raytheon/edex/util/satellite/SatelliteMenuUtil.java
@@ -49,7 +49,8 @@ import com.vividsolutions.jts.geom.Coordinate;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* May 18, 2011 mnash Initial creation
- *
+ * Sep 10, 2012 15337 kshresth Changed sector on OCONUS:Products under
+ * Derived Products Imagery Display
*
*
* @author mnash
@@ -110,6 +111,10 @@ public class SatelliteMenuUtil extends AbstractMenuUtil {
+ File.separator + "satellite" + File.separator
+ "baseCompositeTemplate.xml");
+ MenuTemplateFile fileOCONUS = (MenuTemplateFile) fromXml("menuTemplate"
+ + File.separator + "satellite" + File.separator
+ + "baseOCONUSDerivedProductsImageryTemplate.xml");
+
String state = "";
if (results != null && results.length > 0) {
state = results[0].toString();
@@ -124,18 +129,27 @@ public class SatelliteMenuUtil extends AbstractMenuUtil {
}
((CommonIncludeMenuContribution) file.contributions[0]).fileName = new File(
"menus/satellite/baseSatellite.xml");
- if ("Hawaii".equals(state) || "Alaska".equals(state)
+ ((CommonIncludeMenuContribution) fileOCONUS.contributions[0]).fileName = new File(
+ "menus/satellite/baseOCONUSBlendedDerivedProductsImagery.xml");
+ if ("Alaska".equals(state) ||"Hawaii".equals(state)
|| "Puerto Rico".equals(state)) {
+ ((CommonIncludeMenuContribution) fileOCONUS.contributions[0]).substitutions = new VariableSubstitution[1];
+ // sector
+ VariableSubstitution sub = new VariableSubstitution();
+ sub.key = "sector";
+ sub.value = state + " National";
+ ((CommonIncludeMenuContribution) fileOCONUS.contributions[0]).substitutions[0] = sub;
+ // ============================================
((CommonIncludeMenuContribution) file.contributions[0]).substitutions = new VariableSubstitution[5];
// sector0
- VariableSubstitution sub = new VariableSubstitution();
+ sub = new VariableSubstitution();
sub.key = "sector0";
- sub.value = state + " Regional";
- ((CommonIncludeMenuContribution) file.contributions[0]).substitutions[0] = sub;
+ sub.value = "Northern Hemisphere Composite";
+ ((CommonIncludeMenuContribution) file.contributions[0]).substitutions[0] = sub;
// sector1
sub = new VariableSubstitution();
sub.key = "sector1";
- sub.value = state + " National";
+ sub.value = "Northern Hemisphere Composite";
((CommonIncludeMenuContribution) file.contributions[0]).substitutions[1] = sub;
// sector2
sub = new VariableSubstitution();
@@ -219,6 +233,10 @@ public class SatelliteMenuUtil extends AbstractMenuUtil {
toXml(file, "menus" + File.separator + "satellite" + File.separator
+ "baseComposite.xml");
+
+ toXml(fileOCONUS, "menus" + File.separator + "satellite" + File.separator
+ + "baseDerivedProductsImagery.xml");
+
statusHandler.info("Finished creating satellite menus");
}
@@ -232,10 +250,20 @@ public class SatelliteMenuUtil extends AbstractMenuUtil {
MenuTemplateFile file = (MenuTemplateFile) fromXml("menus"
+ File.separator + "satellite" + File.separator
+ "baseComposite.xml", caveConfigured);
+ MenuTemplateFile fileO = (MenuTemplateFile) fromXml("menus"
+ + File.separator + "satellite" + File.separator
+ + "baseDerivedProductsImagery.xml", caveConfigured);
if (file == null || file.contributions == null
|| file.contributions.length == 0) {
- return false;
+ return false;
} else {
+ if (getSite().equals("AJK") || getSite().equals("AFC")
+ || getSite().equals("AFG") || getSite().equals("HFO")
+ || getSite().equals("GUM") || getSite().equals("SJU")) {
+ if( fileO == null || fileO.contributions == null
+ || fileO.contributions.length == 0)
+ return false;
+ }
statusHandler.info("Menus already created for site " + getSite()
+ " for satellite");
return true;
diff --git a/edexOsgi/com.raytheon.edex.plugin.satellite/utility/edex_static/base/menuTemplate/satellite/baseOCONUSDerivedProductsImageryTemplate.xml b/edexOsgi/com.raytheon.edex.plugin.satellite/utility/edex_static/base/menuTemplate/satellite/baseOCONUSDerivedProductsImageryTemplate.xml
new file mode 100644
index 0000000000..804daec219
--- /dev/null
+++ b/edexOsgi/com.raytheon.edex.plugin.satellite/utility/edex_static/base/menuTemplate/satellite/baseOCONUSDerivedProductsImageryTemplate.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/edexOsgi/com.raytheon.edex.plugin.shef/src/com/raytheon/edex/plugin/shef/alarms/AlertalarmStdTextProductUtil.java b/edexOsgi/com.raytheon.edex.plugin.shef/src/com/raytheon/edex/plugin/shef/alarms/AlertalarmStdTextProductUtil.java
index 3ea00bd760..bd86a944dd 100644
--- a/edexOsgi/com.raytheon.edex.plugin.shef/src/com/raytheon/edex/plugin/shef/alarms/AlertalarmStdTextProductUtil.java
+++ b/edexOsgi/com.raytheon.edex.plugin.shef/src/com/raytheon/edex/plugin/shef/alarms/AlertalarmStdTextProductUtil.java
@@ -293,7 +293,7 @@ public class AlertalarmStdTextProductUtil {
String suffix = reportOptions.getFileSuffix();
if (suffix.length() > 0)
- currReport = new File(reportDir + File.separator + pid + suffix);
+ currReport = new File(reportDir + File.separator + pid + "." + suffix);
else
currReport = new File(reportDir + File.separator + pid);
diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.grib/src/com/raytheon/uf/common/dataplugin/grib/spatial/projections/GridCoverage.java b/edexOsgi/com.raytheon.uf.common.dataplugin.grib/src/com/raytheon/uf/common/dataplugin/grib/spatial/projections/GridCoverage.java
index 0859b0585b..dc17fb6cd2 100644
--- a/edexOsgi/com.raytheon.uf.common.dataplugin.grib/src/com/raytheon/uf/common/dataplugin/grib/spatial/projections/GridCoverage.java
+++ b/edexOsgi/com.raytheon.uf.common.dataplugin.grib/src/com/raytheon/uf/common/dataplugin/grib/spatial/projections/GridCoverage.java
@@ -63,6 +63,7 @@ import com.vividsolutions.jts.geom.Geometry;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 4/7/09 1994 bphillip Initial Creation
+ * 09/10/2012 DR 15270 D. Friedman Fix subgrid model name handling.
*
*
*
@@ -77,6 +78,8 @@ public abstract class GridCoverage extends PersistableDataObject implements
ISpatialObject {
private static final long serialVersionUID = -1355232934065074837L;
+
+ protected static final String SUBGRID_TOKEN = "-SubGrid-";
/** The id for this grid. This value is generated in the initialize method **/
@Id
@@ -723,7 +726,7 @@ public abstract class GridCoverage extends PersistableDataObject implements
String subGridName = getName();
if (subGridName != null) {
- return getName().contains("SubGrid");
+ return getName().contains(SUBGRID_TOKEN);
}
return false;
@@ -739,9 +742,9 @@ public abstract class GridCoverage extends PersistableDataObject implements
String model = null;
if (isSubGridded()) {
String subGridName = getName();
- int index = subGridName.lastIndexOf("-");
- if (index > 0 && index + 1 < subGridName.length()) {
- model = subGridName.substring(index + 1);
+ int index = subGridName.lastIndexOf(SUBGRID_TOKEN);
+ if (index >= 0 && index + SUBGRID_TOKEN.length() < subGridName.length()) {
+ model = subGridName.substring(index + SUBGRID_TOKEN.length());
}
}
return model;
@@ -751,8 +754,8 @@ public abstract class GridCoverage extends PersistableDataObject implements
String parentName = null;
if (isSubGridded()) {
String subGridName = getName();
- int index = subGridName.indexOf("-");
- if (index > 0) {
+ int index = subGridName.indexOf(SUBGRID_TOKEN);
+ if (index >= 0) {
parentName = subGridName.substring(0, index);
}
}
diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.grib/src/com/raytheon/uf/common/dataplugin/grib/spatial/projections/LambertConformalGridCoverage.java b/edexOsgi/com.raytheon.uf.common.dataplugin.grib/src/com/raytheon/uf/common/dataplugin/grib/spatial/projections/LambertConformalGridCoverage.java
index 46fc640917..9a6d4cc21a 100644
--- a/edexOsgi/com.raytheon.uf.common.dataplugin.grib/src/com/raytheon/uf/common/dataplugin/grib/spatial/projections/LambertConformalGridCoverage.java
+++ b/edexOsgi/com.raytheon.uf.common.dataplugin.grib/src/com/raytheon/uf/common/dataplugin/grib/spatial/projections/LambertConformalGridCoverage.java
@@ -56,6 +56,7 @@ import com.raytheon.uf.common.status.UFStatus.Priority;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 4/7/09 1994 bphillip Initial Creation
+ * 09/10/2012 DR 15270 D. Friedman Fix subgrid model name handling.
*
*
*
@@ -149,7 +150,7 @@ public class LambertConformalGridCoverage extends GridCoverage {
rval.majorAxis = this.majorAxis;
rval.minorAxis = this.minorAxis;
- rval.setName(this.name + "-SubGrid-" + subGrid.getModelName());
+ rval.setName(this.name + SUBGRID_TOKEN + subGrid.getModelName());
try {
Unit> spacingUnitObj = Unit.valueOf(spacingUnit);
diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.grib/src/com/raytheon/uf/common/dataplugin/grib/spatial/projections/LatLonGridCoverage.java b/edexOsgi/com.raytheon.uf.common.dataplugin.grib/src/com/raytheon/uf/common/dataplugin/grib/spatial/projections/LatLonGridCoverage.java
index e9c3df891a..f384ad2476 100644
--- a/edexOsgi/com.raytheon.uf.common.dataplugin.grib/src/com/raytheon/uf/common/dataplugin/grib/spatial/projections/LatLonGridCoverage.java
+++ b/edexOsgi/com.raytheon.uf.common.dataplugin.grib/src/com/raytheon/uf/common/dataplugin/grib/spatial/projections/LatLonGridCoverage.java
@@ -49,6 +49,7 @@ import com.raytheon.uf.common.status.UFStatus.Priority;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 4/7/09 1994 bphillip Initial Creation
+ * 09/10/2012 DR 15270 D. Friedman Fix subgrid model name handling.
*
*
*
@@ -139,7 +140,7 @@ public class LatLonGridCoverage extends GridCoverage {
rval.dy = this.dy;
rval.spacingUnit = this.spacingUnit;
- rval.setName(this.name + "-SubGrid-" + subGrid.getModelName());
+ rval.setName(this.name + SUBGRID_TOKEN + subGrid.getModelName());
try {
if (spacingUnit.equals("degree")) {
diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.grib/src/com/raytheon/uf/common/dataplugin/grib/spatial/projections/MercatorGridCoverage.java b/edexOsgi/com.raytheon.uf.common.dataplugin.grib/src/com/raytheon/uf/common/dataplugin/grib/spatial/projections/MercatorGridCoverage.java
index afca85c139..aaed40b631 100644
--- a/edexOsgi/com.raytheon.uf.common.dataplugin.grib/src/com/raytheon/uf/common/dataplugin/grib/spatial/projections/MercatorGridCoverage.java
+++ b/edexOsgi/com.raytheon.uf.common.dataplugin.grib/src/com/raytheon/uf/common/dataplugin/grib/spatial/projections/MercatorGridCoverage.java
@@ -58,6 +58,7 @@ import com.raytheon.uf.common.status.UFStatus.Priority;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 4/7/09 1994 bphillip Initial Creation
+ * 09/10/2012 DR 15270 D. Friedman Fix subgrid model name handling.
*
*
*
@@ -236,7 +237,7 @@ public class MercatorGridCoverage extends GridCoverage {
rval.latin = this.latin;
rval.majorAxis = this.majorAxis;
rval.minorAxis = this.minorAxis;
- rval.setName(this.name + "-SubGrid-" + subGrid.getModelName());
+ rval.setName(this.name + SUBGRID_TOKEN + subGrid.getModelName());
try {
Unit> spacingUnitObj = Unit.valueOf(spacingUnit);
diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.grib/src/com/raytheon/uf/common/dataplugin/grib/spatial/projections/PolarStereoGridCoverage.java b/edexOsgi/com.raytheon.uf.common.dataplugin.grib/src/com/raytheon/uf/common/dataplugin/grib/spatial/projections/PolarStereoGridCoverage.java
index cc36150f80..4c9aecf2a5 100644
--- a/edexOsgi/com.raytheon.uf.common.dataplugin.grib/src/com/raytheon/uf/common/dataplugin/grib/spatial/projections/PolarStereoGridCoverage.java
+++ b/edexOsgi/com.raytheon.uf.common.dataplugin.grib/src/com/raytheon/uf/common/dataplugin/grib/spatial/projections/PolarStereoGridCoverage.java
@@ -56,6 +56,7 @@ import com.raytheon.uf.common.status.UFStatus.Priority;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 4/7/09 1994 bphillip Initial Creation
+ * 09/10/2012 DR 15270 D. Friedman Fix subgrid model name handling.
*
*
*
@@ -134,7 +135,7 @@ public class PolarStereoGridCoverage extends GridCoverage {
rval.lov = this.lov;
rval.majorAxis = this.majorAxis;
rval.minorAxis = this.minorAxis;
- rval.setName(this.name + "-SubGrid-" + subGrid.getModelName());
+ rval.setName(this.name + SUBGRID_TOKEN + subGrid.getModelName());
try {
Unit> spacingUnitObj = Unit.valueOf(spacingUnit);
diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.level/utility/common_static/base/level/masterLevels.xml b/edexOsgi/com.raytheon.uf.common.dataplugin.level/utility/common_static/base/level/masterLevels.xml
index 1b2584d9d9..c84552322f 100644
--- a/edexOsgi/com.raytheon.uf.common.dataplugin.level/utility/common_static/base/level/masterLevels.xml
+++ b/edexOsgi/com.raytheon.uf.common.dataplugin.level/utility/common_static/base/level/masterLevels.xml
@@ -19,6 +19,10 @@
further_licensing_information.
-->
+
+
+
+
diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.scan/src/com/raytheon/uf/edex/plugin/scan/process/CompositeReflectivityProduct.java b/edexOsgi/com.raytheon.uf.edex.plugin.scan/src/com/raytheon/uf/edex/plugin/scan/process/CompositeReflectivityProduct.java
index 2bf44454a4..64264f0506 100644
--- a/edexOsgi/com.raytheon.uf.edex.plugin.scan/src/com/raytheon/uf/edex/plugin/scan/process/CompositeReflectivityProduct.java
+++ b/edexOsgi/com.raytheon.uf.edex.plugin.scan/src/com/raytheon/uf/edex/plugin/scan/process/CompositeReflectivityProduct.java
@@ -69,6 +69,8 @@ import com.raytheon.uf.edex.core.EDEXUtil;
* 05/07/2009 2037 dhladky Initial Creation.
* 02/22/2012 DR14414 mgamazay Added initializing the ScanTableData table
* to an empty map if no features are present.
+ * 09/06/2012 14727 Xiaochuan setIsNew(false) for the storm id should based
+ * on FCSTRAN, FCSTDIR values.
*
*
*
@@ -168,8 +170,6 @@ public class CompositeReflectivityProduct extends RadarProduct {
// by storm ID, update
for (String id : getUpdates(catKeys, table)) {
if (table.getRow(id) != null) {
- // no longer a new row
- table.getRow(id).setIsNew(false);
// previous position stuff
if ((table.getRow(id).getLat() != null)
&& (table.getRow(id).getLon() != null)) {
@@ -203,7 +203,7 @@ public class CompositeReflectivityProduct extends RadarProduct {
.purgeCoordinates(rec.getDataTime()
.getRefTime());
table.updateRow(id, write(table.getRow(id), rec, id));
- // System.out.println("CELL: Updated Row: "+id);
+
}
}
}
@@ -232,10 +232,10 @@ public class CompositeReflectivityProduct extends RadarProduct {
}
// add new rows last
for (String id : newIds) {
- table.addRow(id,
+ table.addRow(id,
write(new CellTableDataRow(rec.getDataTime()), rec, id));
}
-
+
// send out an alertViz message
if (processAlarms) {
EDEXUtil.sendMessageAlertViz(Priority.CRITICAL,
@@ -477,6 +477,8 @@ public class CompositeReflectivityProduct extends RadarProduct {
&& !cellValMap.get(GraphicBlockValues.FCSTDIR).equals(NEW)) {
((CellTableDataRow) row).setDir(new Double(cellValMap
.get(GraphicBlockValues.FCSTDIR)));
+
+ ((CellTableDataRow) row).setIsNew(false);
}
// set the speed
@@ -487,6 +489,7 @@ public class CompositeReflectivityProduct extends RadarProduct {
&& !cellValMap.get(GraphicBlockValues.FCSTRAN).equals(NEW)) {
((CellTableDataRow) row).setSpd(new Double(cellValMap
.get(GraphicBlockValues.FCSTRAN)));
+ ((CellTableDataRow) row).setIsNew(false);
}
// Try setting it here
diff --git a/edexOsgi/com.raytheon.uf.tools.cli/impl/src/msg/fxaAnnounce.py b/edexOsgi/com.raytheon.uf.tools.cli/impl/src/msg/fxaAnnounce.py
old mode 100755
new mode 100644
diff --git a/nativeLib/dist.native/i386-pc-linux-gnu.tar.REMOVED.git-id b/nativeLib/dist.native/i386-pc-linux-gnu.tar.REMOVED.git-id
index 52f1f6e6b2..faa0930c95 100644
--- a/nativeLib/dist.native/i386-pc-linux-gnu.tar.REMOVED.git-id
+++ b/nativeLib/dist.native/i386-pc-linux-gnu.tar.REMOVED.git-id
@@ -1 +1 @@
-b288540d9df12e4f12524428bcfe5d37ae56cd76
\ No newline at end of file
+e0807c547d1d9fe1c96688bb0955467ab6fdb8e1
\ No newline at end of file
diff --git a/nativeLib/ncep_grib2module/dependencies/src/g2clib-1.1.8/makefile b/nativeLib/ncep_grib2module/dependencies/src/g2clib-1.1.8/makefile
old mode 100755
new mode 100644
diff --git a/nativeLib/rary.cots.jepp/jepp-2.3/src/jep/Jep.java b/nativeLib/rary.cots.jepp/jepp-2.3/src/jep/Jep.java
old mode 100755
new mode 100644
diff --git a/nativeLib/rary.cots.jepp/jepp-2.3/src/jep/jep.c b/nativeLib/rary.cots.jepp/jepp-2.3/src/jep/jep.c
old mode 100755
new mode 100644
diff --git a/nativeLib/rary.cots.jepp/jepp-2.3/src/jep/pyembed.h b/nativeLib/rary.cots.jepp/jepp-2.3/src/jep/pyembed.h
old mode 100755
new mode 100644
diff --git a/nativeLib/rary.cots.jepp/jepp-2.3/src/jep/pyjarray.c b/nativeLib/rary.cots.jepp/jepp-2.3/src/jep/pyjarray.c
old mode 100755
new mode 100644
diff --git a/nativeLib/rary.cots.jepp/jepp-2.3/src/jep/pyjarray.h b/nativeLib/rary.cots.jepp/jepp-2.3/src/jep/pyjarray.h
old mode 100755
new mode 100644
diff --git a/nativeLib/rary.cots.jepp/jepp-2.3/src/jep/pyjclass.h b/nativeLib/rary.cots.jepp/jepp-2.3/src/jep/pyjclass.h
old mode 100755
new mode 100644
diff --git a/nativeLib/rary.cots.jepp/jepp-2.3/src/jep/pyjmethod.h b/nativeLib/rary.cots.jepp/jepp-2.3/src/jep/pyjmethod.h
old mode 100755
new mode 100644
diff --git a/nativeLib/rary.cots.jepp/jepp-2.3/src/jep/pyjmethodwrapper.h b/nativeLib/rary.cots.jepp/jepp-2.3/src/jep/pyjmethodwrapper.h
old mode 100755
new mode 100644
diff --git a/nativeLib/rary.cots.jepp/jepp-2.3/src/jep/pyjobject.h b/nativeLib/rary.cots.jepp/jepp-2.3/src/jep/pyjobject.h
old mode 100755
new mode 100644
diff --git a/nativeLib/rary.ohd.filesystem/awips/hydroapps/whfs/bin/run_damcrest b/nativeLib/rary.ohd.filesystem/awips/hydroapps/whfs/bin/run_damcrest
old mode 100755
new mode 100644
diff --git a/nativeLib/rary.ohd.filesystem/awips/hydroapps/whfs/bin/run_report_alarm b/nativeLib/rary.ohd.filesystem/awips/hydroapps/whfs/bin/run_report_alarm
old mode 100755
new mode 100644
index 49a84038b7..065f4230e4
--- a/nativeLib/rary.ohd.filesystem/awips/hydroapps/whfs/bin/run_report_alarm
+++ b/nativeLib/rary.ohd.filesystem/awips/hydroapps/whfs/bin/run_report_alarm
@@ -5,7 +5,7 @@
# a product and send them to the text database
#
-# Revised:July 22, 2011
+# Revised:Sep 11, 2012
######################################################################
@@ -133,7 +133,28 @@ export CLASSPATH=$HIBERNATE:$SPRING:$DB_DRIVER_PATH:$CAMEL:$GEOTOOLS:$JAVAX_MEAS
# run the application
#
$SYS_JAVA_DIR/bin/java -Xms64m -Xmx512m com.raytheon.edex.plugin.shef.alarms.AlertalarmStdTextProductUtil -d$DB_NAME -p$PRODUCT_ID -s$SUFFIX -rNEAREST >> $LOGFILE 2>&1
+NUM_ALARMS=$?
+if [ $NUM_ALARMS -eq 0 ]
+then
+ print No alarms reported, info sent to $FILENAME >> $LOGFILE
+ print File NOT sent to text database >> $LOGFILE
+
+else
+ print $NUM_ALARMS alarms reported, report written to $FILENAME >> $LOGFILE
+
+ echo Writing $FILENAME to textdb as id $PRODUCT_ID >> $LOGFILE
+ /awips2/fxa/bin/textdb -w $PRODUCT_ID < $FILENAME >> $LOGFILE 2>&1
+ RETURN_STATUS=$?
+
+ if [ $RETURN_STATUS -eq 0 ]
+ then
+ print Product successfully sent >> $LOGFILE
+ else
+ print Product send error detected, status= $RETURN_STATUS >> $LOGFILE
+ fi
+fi
+
Dte=`date -u `
echo Completed report_alarm at $Dte >> $LOGFILE
diff --git a/nativeLib/rary.ohd.filesystem/awips/hydroapps/whfs/bin/start_fcstservice b/nativeLib/rary.ohd.filesystem/awips/hydroapps/whfs/bin/start_fcstservice
old mode 100755
new mode 100644
diff --git a/nativeLib/rary.ohd.filesystem/awips/hydroapps/whfs/bin/start_rivermonitor b/nativeLib/rary.ohd.filesystem/awips/hydroapps/whfs/bin/start_rivermonitor
old mode 100755
new mode 100644
diff --git a/rpms/awips2.cave/deploy.builder/build.sh b/rpms/awips2.cave/deploy.builder/build.sh
old mode 100755
new mode 100644
diff --git a/rpms/awips2.core/Installer.edex-environment/wes2bridge.files/deliverables/scripts/edex-environment b/rpms/awips2.core/Installer.edex-environment/wes2bridge.files/deliverables/scripts/edex-environment
old mode 100644
new mode 100755
diff --git a/rpms/awips2.core/Installer.ldm/patch/etc/pqact.conf.template b/rpms/awips2.core/Installer.ldm/patch/etc/pqact.conf.template
old mode 100755
new mode 100644
diff --git a/rpms/awips2.qpid/SOURCES/qpidd b/rpms/awips2.qpid/SOURCES/qpidd
old mode 100755
new mode 100644
diff --git a/rpms/python.site-packages/Installer.cherrypy/component.spec b/rpms/python.site-packages/Installer.cherrypy/component.spec
old mode 100755
new mode 100644