diff --git a/cave/build/static/common/cave/etc/aviation/python/CCFPMonitor.py b/cave/build/static/common/cave/etc/aviation/python/CCFPMonitor.py
index 84231494ed..dcdc42b0cb 100644
--- a/cave/build/static/common/cave/etc/aviation/python/CCFPMonitor.py
+++ b/cave/build/static/common/cave/etc/aviation/python/CCFPMonitor.py
@@ -60,9 +60,6 @@
# Status: TEST
# Title: AvnFPS: tpo indicator not monitoring properly
#
-# Date Ticket# Engineer Description
-# ------------- ---------- ----------- --------------------------
-# Feb. 21, 2013 15834 zhao Modified for CCFP 8hr data
#
import logging, time
import Avn, AvnLib, Globals, MonitorP
@@ -71,10 +68,10 @@ import CCFPData
_Logger = logging.getLogger(__name__)
_Code = { \
- 'tops': {1: '400+ ', 2: '350-390', 3: '300-340', 4: '250-290'}, \
- 'gwth': {1: '+ ', 2: 'NC', 3: '- '}, \
+ 'tops': {1: '370+ ', 2: '310-370', 3: '250-310'}, \
+ 'gwth': {1: '++', 2: '+ ', 3: 'NC', 4: '- '}, \
'conf': {1: 'HIGH', 3: 'LOW'}, \
- 'cvrg': {1: '75-100%', 2: ' 40-74%', 3: ' 25-39%'}, \
+ 'cvrg': {1: '75-100%', 2: ' 50-74%', 3: ' 25-49%'}, \
}
##############################################################################
@@ -85,7 +82,7 @@ class Monitor(MonitorP.Monitor):
def __makeData(self, data):
# 6 hour forecast
tstart = (time.time()//3600.0 + 1) * 3600.0
- tend = tstart + 9*3600.0 - 10.0
+ tend = tstart + 7*3600.0 - 10.0
seq = [{'time': t} for t in Avn.frange(tstart, tend, 3600.0)]
fcst, text = {}, []
try:
diff --git a/cave/build/static/common/cave/etc/menus/upperair/baseAviation.xml b/cave/build/static/common/cave/etc/menus/upperair/baseAviation.xml
index a6ac6b05ab..b99b8e6866 100644
--- a/cave/build/static/common/cave/etc/menus/upperair/baseAviation.xml
+++ b/cave/build/static/common/cave/etc/menus/upperair/baseAviation.xml
@@ -25,9 +25,7 @@
menuText="Convective SIGMET" id="ConvSigmet">
/convsigmet/%
-
- /bufrncwf/%
-
+
diff --git a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/data/IColorMapDataRetrievalCallback.java b/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/data/IColorMapDataRetrievalCallback.java
index 627e10044c..2442d4a9cb 100644
--- a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/data/IColorMapDataRetrievalCallback.java
+++ b/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/data/IColorMapDataRetrievalCallback.java
@@ -36,6 +36,8 @@ import com.raytheon.uf.viz.core.exception.VizException;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Nov 17, 2011 mschenke Initial creation
+ * Mar 21, 2013 1806 bsteffen Add ColorMapData constructor that
+ * creates buffer from the dataType.
*
*
*
@@ -45,6 +47,40 @@ import com.raytheon.uf.viz.core.exception.VizException;
public interface IColorMapDataRetrievalCallback {
+ /**
+ * @param dataType
+ * @param dataBounds
+ */
+ public ColorMapData(ColorMapDataType dataType, int[] dimensions) {
+ this.buffer = getBuffer(dataType, dimensions);
+ this.dimensions = dimensions;
+ this.dataType = dataType;
+ }
+
+ }
+
+ private static Buffer getBuffer(ColorMapDataType dataType,
+ int[] dimensions) {
+ int size = 1;
+ for (int i : dimensions) {
+ size *= i;
+ }
+ switch (dataType) {
+ case BYTE:
+ case SIGNED_BYTE:
+ return ByteBuffer.allocate(size);
+ case SHORT:
+ case UNSIGNED_SHORT:
+ return ShortBuffer.allocate(size);
+ case FLOAT:
+ return FloatBuffer.allocate(size);
+ case INT:
+ return IntBuffer.allocate(size);
+ default:
+ throw new RuntimeException("Could not find Buffer for "
+ + dataType);
+ }
+
/**
* Get the ColorMapData. IMPORTANT NOTE: This method should retrieve the
* ColorMapData from wherever it lives. ColorMapData objects should not be
diff --git a/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/dialogs/FfmpBasinTableDlg.java b/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/dialogs/FfmpBasinTableDlg.java
index 7f6fe5963f..8e44c4333d 100644
--- a/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/dialogs/FfmpBasinTableDlg.java
+++ b/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/dialogs/FfmpBasinTableDlg.java
@@ -116,7 +116,9 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
* Feb 10, 2013 1584 mpduff Add performance logging.
* Feb 28, 2013 1729 dhladky Adjusted the way in which the dialog load thread rejoins the main GUI thread.
* Mar 01, 2013 13228 gzhang Adding field rowName for VGB in County
+ * Mar 24, 2013 1818 mpduff Fixed Attributes dialog on multiple opens, needed an isDisposed check.
*
+ *
* @author lvenable
* @version 1.0
*/
@@ -255,8 +257,9 @@ public class FfmpBasinTableDlg extends CaveSWTDialog implements
private FFMPTableDataLoader dataRetrieveThread = null;
private boolean groupLabelFlag = true;
-
- private String rowName="";// DR 13228
+
+ private String rowName = "";// DR 13228
+
/**
* Statistics load event.
*/
@@ -1084,7 +1087,8 @@ public class FfmpBasinTableDlg extends CaveSWTDialog implements
// Loop over enum from config singleton to create menu items
for (ThreshColNames colName : ThreshColNames.values()) {
- if (ffmpConfig.isColorCell(colName) && (colName != ThreshColNames.GUID)) {// DR 14907
+ if (ffmpConfig.isColorCell(colName)
+ && (colName != ThreshColNames.GUID)) {// DR 14907
// only add a menu item if colorCell is true
MenuItem mi = new MenuItem(popupMenu, SWT.NONE);
mi.setText(colName.name());
@@ -1304,7 +1308,7 @@ public class FfmpBasinTableDlg extends CaveSWTDialog implements
}
private void displayAttributesDlg() {
- if (attributeDlg == null) {
+ if (attributeDlg == null || attributeDlg.isDisposed()) {
attrData = ffmpTable.getVisibleColumns();
attributeDlg = new AttributesDlg(shell, resource, attrData, this);
}
@@ -1770,7 +1774,7 @@ public class FfmpBasinTableDlg extends CaveSWTDialog implements
|| allOnlySmallBasinsMI.getSelection()) {
groupLbl.setText(name);
}
- rowName=name;// DR 13228
+ rowName = name;// DR 13228
shell.setCursor(getDisplay().getSystemCursor(SWT.CURSOR_WAIT));
fireScreenRecenterEvent(pfaf, 1);
}
@@ -2089,7 +2093,6 @@ public class FfmpBasinTableDlg extends CaveSWTDialog implements
public void updateLoadingLabel(FFMPLoaderStatus status) {
this.loadStatus = status;
-
if (dataLoadComp == null) {
return;
}
@@ -2192,7 +2195,7 @@ public class FfmpBasinTableDlg extends CaveSWTDialog implements
if (!this.isDisposed()) {
- VizApp.runAsync(new Runnable() {
+ VizApp.runAsync(new Runnable() {
@Override
public void run() {
processUpdate(fupdateData);
@@ -2243,9 +2246,9 @@ public class FfmpBasinTableDlg extends CaveSWTDialog implements
groupLbl.setText("");
}
}
-
+
// DR 13228
- public String getRowName(){
- return this.rowName;
+ public String getRowName() {
+ return this.rowName;
}
}
diff --git a/cave/com.raytheon.uf.viz.monitor.scan/src/com/raytheon/uf/viz/monitor/scan/commondialogs/TrendGraphDlg.java b/cave/com.raytheon.uf.viz.monitor.scan/src/com/raytheon/uf/viz/monitor/scan/commondialogs/TrendGraphDlg.java
index 52757b080c..e7b378f013 100644
--- a/cave/com.raytheon.uf.viz.monitor.scan/src/com/raytheon/uf/viz/monitor/scan/commondialogs/TrendGraphDlg.java
+++ b/cave/com.raytheon.uf.viz.monitor.scan/src/com/raytheon/uf/viz/monitor/scan/commondialogs/TrendGraphDlg.java
@@ -35,10 +35,25 @@ import com.raytheon.uf.common.monitor.scan.config.SCANConfigEnums.ScanTables;
import com.raytheon.uf.viz.monitor.scan.TrendGraphData;
import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
-public class TrendGraphDlg extends CaveSWTDialog //implements ICommonDialogAction
-{
+/**
+ * Scan/DMD Trend Graph Dialog.
+ *
+ *
+ *
+ * SOFTWARE HISTORY
+ *
+ * Date Ticket# Engineer Description
+ * ------------ ---------- ----------- --------------------------
+ * Mar 21, 2013 1812 mpduff Redraw now updates with new data.
+ *
+ *
+ *
+ * @author lvenable
+ * @version 1.0
+ */
+public class TrendGraphDlg extends CaveSWTDialog {
- private ScanTables scanTable;
+ private final ScanTables scanTable;
private Combo identCbo;
@@ -50,24 +65,34 @@ public class TrendGraphDlg extends CaveSWTDialog //implements ICommonDialogActio
private TrendGraphCanvas trendGraphCanvas;
- private ITrendGraphUpdate updateCallback;
+ private final ITrendGraphUpdate updateCallback;
- private IRequestTrendGraphData requestDataCallback;
+ private final IRequestTrendGraphData requestDataCallback;
-// private LinkedHashMap dataMap;
-
private TrendGraphData trendGraphData;
- private String[] identArray;
+ private final String[] identArray;
- private Integer vcp;
+ private final Integer vcp;
+ /**
+ * Constructor.
+ *
+ * @param parentShell
+ * @param scanTable
+ * @param ident
+ * @param attrName
+ * @param updateCallback
+ * @param requestDataCallback
+ * @param identArray
+ * @param vcp
+ */
public TrendGraphDlg(Shell parentShell, ScanTables scanTable, String ident,
String attrName, ITrendGraphUpdate updateCallback,
IRequestTrendGraphData requestDataCallback, String[] identArray,
- Integer vcp)
- {
- super(parentShell, SWT.DIALOG_TRIM, CAVE.DO_NOT_BLOCK | CAVE.INDEPENDENT_SHELL);
+ Integer vcp) {
+ super(parentShell, SWT.DIALOG_TRIM, CAVE.DO_NOT_BLOCK
+ | CAVE.INDEPENDENT_SHELL);
setText(scanTable.name() + " Trend Graph");
this.scanTable = scanTable;
@@ -76,7 +101,7 @@ public class TrendGraphDlg extends CaveSWTDialog //implements ICommonDialogActio
this.updateCallback = updateCallback;
this.requestDataCallback = requestDataCallback;
this.identArray = identArray;
- this.vcp=vcp;
+ this.vcp = vcp;
}
@Override
@@ -92,7 +117,7 @@ public class TrendGraphDlg extends CaveSWTDialog //implements ICommonDialogActio
protected void initializeComponents(Shell shell) {
trendGraphData = requestDataCallback.requestTrendGraphData(scanTable,
attrName, ident);
-
+
createTopControls();
createGraphCanvas();
}
@@ -135,8 +160,8 @@ public class TrendGraphDlg extends CaveSWTDialog //implements ICommonDialogActio
private void createGraphCanvas() {
trendGraphCanvas = new TrendGraphCanvas(shell, trendGraphData,
- requestDataCallback.getCurrentDate(), scanTable,
- attrName,vcp,requestDataCallback,ident);
+ requestDataCallback.getCurrentDate(), scanTable, attrName, vcp,
+ requestDataCallback, ident);
}
private void populateIdentCombo() {
@@ -165,8 +190,8 @@ public class TrendGraphDlg extends CaveSWTDialog //implements ICommonDialogActio
trendGraphData = requestDataCallback.requestTrendGraphData(scanTable,
attrName, ident);
- trendGraphCanvas.updateAttribute(attrName, trendGraphData, requestDataCallback
- .getCurrentDate());
+ trendGraphCanvas.updateAttribute(attrName, trendGraphData,
+ requestDataCallback.getCurrentDate());
trendGraphCanvas.setIndent(ident);
}
@@ -177,31 +202,33 @@ public class TrendGraphDlg extends CaveSWTDialog //implements ICommonDialogActio
trendGraphData = requestDataCallback.requestTrendGraphData(scanTable,
attrName, ident);
- trendGraphCanvas.updateAttribute(attrName, trendGraphData, requestDataCallback
- .getCurrentDate());
+ trendGraphCanvas.updateAttribute(attrName, trendGraphData,
+ requestDataCallback.getCurrentDate());
}
-
+
/**
- * Update the trend graph data so the latest data can be displayed.
+ * Update the trend graph data so the latest data can be displayed.
+ *
* @return true if item is to be disposed
*/
- public boolean updateTrendGraph()
- {
+ public boolean updateTrendGraph() {
trendGraphData = requestDataCallback.requestTrendGraphData(scanTable,
attrName, ident);
- trendGraphCanvas.updateAttribute(attrName, trendGraphData, requestDataCallback
- .getCurrentDate());
-
+ trendGraphCanvas.updateAttribute(attrName, trendGraphData,
+ requestDataCallback.getCurrentDate());
+
if (requestDataCallback.cellValid(this.ident) == false) {
return true;
}
-
+
return false;
}
-
- public void redrawTrendGraph()
- {
- trendGraphCanvas.redrawCanvas();
+
+ /**
+ * Redraw the graphs with updated data.
+ */
+ public void redrawTrendGraph() {
+ updateTrendGraph();
}
public void displayDialog() {
@@ -211,24 +238,12 @@ public class TrendGraphDlg extends CaveSWTDialog //implements ICommonDialogActio
public boolean dialogIsDisposed() {
return shell.isDisposed();
}
-
+
/**
* Overriding the dispose method to notify that the trend graph is closing.
*/
@Override
- protected void disposed()
- {
+ protected void disposed() {
this.updateCallback.trendGraphClosing(this);
}
-
-// @Override
-// public void closeDialog() {
-// this.updateCallback.trendGraphClosing(this);
-// shell.dispose();
-// }
-//
-// @Override
-// public boolean isDisposed() {
-// return shell.isDisposed();
-// }
}
diff --git a/cave/com.raytheon.uf.viz.monitor.scan/src/com/raytheon/uf/viz/monitor/scan/commondialogs/TrendSetsGraphDlg.java b/cave/com.raytheon.uf.viz.monitor.scan/src/com/raytheon/uf/viz/monitor/scan/commondialogs/TrendSetsGraphDlg.java
index 804cfa6781..756a727a95 100644
--- a/cave/com.raytheon.uf.viz.monitor.scan/src/com/raytheon/uf/viz/monitor/scan/commondialogs/TrendSetsGraphDlg.java
+++ b/cave/com.raytheon.uf.viz.monitor.scan/src/com/raytheon/uf/viz/monitor/scan/commondialogs/TrendSetsGraphDlg.java
@@ -40,11 +40,25 @@ import com.raytheon.uf.common.monitor.scan.config.TrendSetConfigMgr;
import com.raytheon.uf.viz.monitor.scan.TrendGraphData;
import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
-public class TrendSetsGraphDlg extends CaveSWTDialog // implements
- // ICommonDialogAction
-{
+/**
+ * Scan/DMD Trend Sets Graph Dialog.
+ *
+ *
+ *
+ * SOFTWARE HISTORY
+ *
+ * Date Ticket# Engineer Description
+ * ------------ ---------- ----------- --------------------------
+ * Mar 21, 2013 1812 mpduff Redraw now updates with new data.
+ *
+ *
+ *
+ * @author lvenable
+ * @version 1.0
+ */
+public class TrendSetsGraphDlg extends CaveSWTDialog {
- private ScanTables scanTable;
+ private final ScanTables scanTable;
private Combo identCbo;
@@ -56,15 +70,15 @@ public class TrendSetsGraphDlg extends CaveSWTDialog // implements
private TrendSetConfigMgr trendCfgMgr;
- private ITrendSetsGraphUpdate updateCallback;
+ private final ITrendSetsGraphUpdate updateCallback;
- private IRequestTrendGraphData requestDataCallback;
+ private final IRequestTrendGraphData requestDataCallback;
// private LinkedHashMap dataMap;
private LinkedHashMap trendSetData;
- private String[] identArray;
+ private final String[] identArray;
private String[] attrArray;
@@ -72,14 +86,27 @@ public class TrendSetsGraphDlg extends CaveSWTDialog // implements
private HashMap canvasMap;
- private Integer vcp;
+ private final Integer vcp;
+ /**
+ * Constructor.
+ *
+ * @param parentShell
+ * @param scanTable
+ * @param ident
+ * @param trendSetName
+ * @param updateCallback
+ * @param requestDataCallback
+ * @param identArray
+ * @param vcp
+ */
public TrendSetsGraphDlg(Shell parentShell, ScanTables scanTable,
String ident, String trendSetName,
ITrendSetsGraphUpdate updateCallback,
IRequestTrendGraphData requestDataCallback, String[] identArray,
Integer vcp) {
- super(parentShell, SWT.DIALOG_TRIM, CAVE.DO_NOT_BLOCK | CAVE.INDEPENDENT_SHELL);
+ super(parentShell, SWT.DIALOG_TRIM, CAVE.DO_NOT_BLOCK
+ | CAVE.INDEPENDENT_SHELL);
setText(scanTable.name() + " Trend Graph");
this.scanTable = scanTable;
@@ -153,7 +180,6 @@ public class TrendSetsGraphDlg extends CaveSWTDialog // implements
@Override
public void widgetSelected(SelectionEvent e) {
shell.dispose();
- // closeDialog();
}
});
}
@@ -223,11 +249,10 @@ public class TrendSetsGraphDlg extends CaveSWTDialog // implements
trendSetData.clear();
// Loop through all of the attributes and call update and store the data
- // map for
- // each attribute
+ // map for each attribute
for (String attr : attrArray) {
- TrendGraphData tgd = requestDataCallback
- .requestTrendGraphData(scanTable, attr, ident);
+ TrendGraphData tgd = requestDataCallback.requestTrendGraphData(
+ scanTable, attr, ident);
trendSetData.put(attr, tgd);
// Call the update call back so the table can manage this dialog.
@@ -252,8 +277,8 @@ public class TrendSetsGraphDlg extends CaveSWTDialog // implements
for (String attr : attrArray) {
System.out.println("Change trend set - attr = " + attr);
- TrendGraphData tgd = requestDataCallback
- .requestTrendGraphData(scanTable, attr, ident);
+ TrendGraphData tgd = requestDataCallback.requestTrendGraphData(
+ scanTable, attr, ident);
trendSetData.put(attr, tgd);
}
@@ -272,36 +297,35 @@ public class TrendSetsGraphDlg extends CaveSWTDialog // implements
* @return true if item is to be disposed
*/
public boolean updateTrendSetsGraph() {
- trendSetData.clear();
- // Loop through all of the attributes and call update and store the data
- // map for
- // each attribute
- for (String attr : attrArray) {
- TrendGraphData tgd = requestDataCallback
- .requestTrendGraphData(scanTable, attr, ident);
- trendSetData.put(attr, tgd);
-
- // Call the update call back so the table can manage this dialog.
- this.updateCallback.trendSetGraphChanged(ident, trendSetName, this);
-
- // Update the canvas with the new data
- canvasMap.get(attr).updateAttribute(attr, tgd,
- requestDataCallback.getCurrentDate());
- }
-
- if (requestDataCallback.cellValid(this.ident) == false) {
- return true;
- }
-
- return false;
+ trendSetData.clear();
+ // Loop through all of the attributes and call update and store the data
+ // map for
+ // each attribute
+ for (String attr : attrArray) {
+ TrendGraphData tgd = requestDataCallback.requestTrendGraphData(
+ scanTable, attr, ident);
+ trendSetData.put(attr, tgd);
+
+ // Call the update call back so the table can manage this dialog.
+ this.updateCallback.trendSetGraphChanged(ident, trendSetName, this);
+
+ // Update the canvas with the new data
+ canvasMap.get(attr).updateAttribute(attr, tgd,
+ requestDataCallback.getCurrentDate());
+ }
+
+ if (requestDataCallback.cellValid(this.ident) == false) {
+ return true;
+ }
+
+ return false;
}
+ /**
+ * Redraw the graphs with updated data.
+ */
public void redrawTrendGraph() {
- for (String key : canvasMap.keySet()) {
- if (canvasMap.get(key) != null) {
- canvasMap.get(key).redrawCanvas();
- }
- }
+ updateTrendSetsGraph();
}
public void displayDialog() {
@@ -319,15 +343,4 @@ public class TrendSetsGraphDlg extends CaveSWTDialog // implements
protected void disposed() {
this.updateCallback.trendSetGraphClosing(this);
}
-
- // @Override
- // public void closeDialog() {
- // this.updateCallback.trendSetGraphClosing(this);
- // shell.dispose();
- // }
- //
- // @Override
- // public boolean isDisposed() {
- // return shell.isDisposed();
- // }
}
diff --git a/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/dataformat/GLColorMapDataFormatFactory.java b/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/dataformat/GLColorMapDataFormatFactory.java
index 730bbbbfdc..95338f75b5 100644
--- a/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/dataformat/GLColorMapDataFormatFactory.java
+++ b/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/dataformat/GLColorMapDataFormatFactory.java
@@ -20,6 +20,7 @@
package com.raytheon.viz.core.gl.dataformat;
import com.raytheon.uf.common.colormap.image.ColorMapData;
+import com.raytheon.uf.viz.core.data.IColorMapDataRetrievalCallback.ColorMapDataType;
/**
* Factory class for getting GLColorMapDataFormat objects given the ColorMapData
@@ -32,6 +33,8 @@ import com.raytheon.uf.common.colormap.image.ColorMapData;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Nov 21, 2011 mschenke Initial creation
+ * Mar 21, 2013 1806 bsteffen Update GL mosaicing to use dynamic data
+ * format for offscreen textures.
*
*
*
@@ -43,8 +46,13 @@ public class GLColorMapDataFormatFactory {
public static AbstractGLColorMapDataFormat getGLColorMapDataFormat(
ColorMapData colorMapData) {
+ return getGLColorMapDataFormat(colorMapData.getDataType());
+ }
+
+ public static AbstractGLColorMapDataFormat getGLColorMapDataFormat(
+ ColorMapDataType colorMapDataType) {
AbstractGLColorMapDataFormat dataFormat = null;
- switch (colorMapData.getDataType()) {
+ switch (colorMapDataType) {
case BYTE: {
dataFormat = new GLByteDataFormat();
break;
diff --git a/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/ext/GLOffscreenRenderingExtension.java b/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/ext/GLOffscreenRenderingExtension.java
index 8054bc862d..fcbf47f0af 100644
--- a/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/ext/GLOffscreenRenderingExtension.java
+++ b/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/ext/GLOffscreenRenderingExtension.java
@@ -33,6 +33,7 @@ import com.raytheon.uf.common.colormap.prefs.ColorMapParameters;
import com.raytheon.uf.viz.core.IExtent;
import com.raytheon.uf.viz.core.IView;
import com.raytheon.uf.viz.core.data.IColorMapDataRetrievalCallback;
+import com.raytheon.uf.viz.core.data.IColorMapDataRetrievalCallback.ColorMapDataType;
import com.raytheon.uf.viz.core.data.IRenderedImageCallback;
import com.raytheon.uf.viz.core.drawables.IImage;
import com.raytheon.uf.viz.core.drawables.ext.GraphicsExtension;
@@ -41,6 +42,7 @@ import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.viz.core.gl.IGLTarget;
import com.raytheon.viz.core.gl.dataformat.AbstractGLColorMapDataFormat;
import com.raytheon.viz.core.gl.dataformat.GLByteDataFormat;
+import com.raytheon.viz.core.gl.dataformat.GLColorMapDataFormatFactory;
import com.raytheon.viz.core.gl.dataformat.IGLColorMapDataFormatProvider;
import com.raytheon.viz.core.gl.images.AbstractGLImage;
import com.raytheon.viz.core.gl.images.GLColormappedImage;
@@ -61,6 +63,8 @@ import com.raytheon.viz.core.gl.internal.ext.GLColormappedImageExtension;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jul 10, 2012 bsteffen Initial creation
+ * Mar 21, 2013 1806 bsteffen Update GL mosaicing to use dynamic data
+ * format for offscreen textures.
*
*
*
@@ -175,51 +179,37 @@ public class GLOffscreenRenderingExtension extends GraphicsExtension
}
public GLColormappedImage constructOffscreenImage(
- Class extends Buffer> dataType, int[] dimensions)
- throws VizException {
+ ColorMapDataType dataType, int[] dimensions) throws VizException {
return constructOffscreenImage(dataType, dimensions, null);
}
public GLColormappedImage constructOffscreenImage(
- Class extends Buffer> dataType, final int[] dimensions,
+ final ColorMapDataType dataType, final int[] dimensions,
ColorMapParameters parameters) throws VizException {
- int width = dimensions[0];
- int height = dimensions[1];
- // Need to add support for multiple buffer types
- Buffer imageBuffer = null;
- if (dataType.isAssignableFrom(ByteBuffer.class)) {
- int pixels = 3;
- if (supportsLuminance) {
- pixels = 1;
- }
- byte[] buf = new byte[width * height * pixels];
- imageBuffer = ByteBuffer.wrap(buf);
- }
+ GLColormappedImageExtension cmapExt = target
+ .getExtension(GLColormappedImageExtension.class);
+ if (!supportsLuminance) {
+ return cmapExt.initializeRaster(new NoLuminanceDataCallback(
+ dimensions, dataType), parameters);
+ } else {
+ GLColormappedImage image = cmapExt.initializeRaster(
+ new IColorMapDataRetrievalCallback() {
- if (imageBuffer != null) {
- GLColormappedImage image = null;
- final Buffer buffer = imageBuffer;
- GLColormappedImageExtension cmapExt = target
- .getExtension(GLColormappedImageExtension.class);
- if (supportsLuminance) {
- image = cmapExt.initializeRaster(
- new IColorMapDataRetrievalCallback() {
-
- @Override
- public ColorMapData getColorMapData()
- throws VizException {
- return new ColorMapData(buffer, dimensions);
- }
- }, parameters);
- } else {
- image = cmapExt.initializeRaster(new GLOffscreenDataCallback(
- buffer, dimensions), parameters);
- }
+ @Override
+ public ColorMapData getColorMapData()
+ throws VizException {
+ return new ColorMapData(dataType, dimensions);
+ }
+ }, parameters);
if (!checkedLuminance) {
checkedLuminance = true;
try {
renderOffscreen(image);
} catch (VizException e) {
+ // Log this so it is easy to see in the console logs.
+ new VizException(
+ "Graphics card does not support luminance textures.",
+ e).printStackTrace(System.out);
// assume we don't support luminance
supportsLuminance = false;
// Reconstruct image
@@ -230,84 +220,76 @@ public class GLOffscreenRenderingExtension extends GraphicsExtension
}
}
return image;
- } else {
- return null;
}
}
- private static final class GLOffscreenDataCallback implements
- IColorMapDataRetrievalCallback, IGLColorMapDataFormatProvider {
+ private static final class NoLuminanceDataFormat extends GLByteDataFormat {
- private Buffer dataBuffer;
+ // Used to get the original min/max which makes signed bytes work and
+ // theoretically will give better looking results for other integer data
+ // types.
+ private final ColorMapDataType originalType;
+
+ private NoLuminanceDataFormat(ColorMapDataType originalType) {
+ this.originalType = originalType;
+ }
+
+ @Override
+ public int getTextureInternalFormat() {
+ return GL.GL_RGB8;
+ }
+
+ @Override
+ public int getTextureFormat() {
+ return GL.GL_RGB;
+ }
+
+ @Override
+ public int getValuesPerPixel() {
+ return 3;
+ }
+
+ @Override
+ public double getDataFormatMin() {
+ return getOriginalGLColorMapDataFormat().getDataFormatMin();
+ }
+
+ @Override
+ public double getDataFormatMax() {
+ return getOriginalGLColorMapDataFormat().getDataFormatMax();
+ }
+
+ private AbstractGLColorMapDataFormat getOriginalGLColorMapDataFormat() {
+ return GLColorMapDataFormatFactory
+ .getGLColorMapDataFormat(originalType);
+ }
+
+ }
+
+ private static final class NoLuminanceDataCallback implements
+ IColorMapDataRetrievalCallback, IGLColorMapDataFormatProvider {
private int[] dimensions;
- private GLOffscreenDataCallback(Buffer dataBuffer, int[] dimensions) {
- this.dataBuffer = dataBuffer;
+ private final ColorMapDataType originalType;
+
+ private NoLuminanceDataCallback(int[] dimensions,
+ ColorMapDataType type) {
this.dimensions = dimensions;
+ this.originalType = type;
}
- /*
- * (non-Javadoc)
- *
- * @see
- * com.raytheon.viz.core.gl.dataprep.IGLColorMapDataRetrievalCallback
- * #getGLColorMapData
- * (com.raytheon.uf.viz.core.data.IColorMapDataRetrievalCallback
- * .ColorMapData)
- */
@Override
public AbstractGLColorMapDataFormat getGLColorMapDataFormat(
ColorMapData colorMapData) {
- return new GLByteDataFormat() {
-
- /*
- * (non-Javadoc)
- *
- * @see com.raytheon.viz.core.gl.dataprep.GLByteDataFormat#
- * getTextureInternalFormat()
- */
- @Override
- public int getTextureInternalFormat() {
- return GL.GL_RGB8;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.raytheon.viz.core.gl.dataprep.AbstractGLColorMapDataFormat
- * #getTextureFormat()
- */
- @Override
- public int getTextureFormat() {
- return GL.GL_RGB;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.raytheon.viz.core.gl.dataprep.AbstractGLColorMapDataFormat
- * #getPointsPerPixel()
- */
- @Override
- public int getValuesPerPixel() {
- return 3;
- }
-
- };
+ return new NoLuminanceDataFormat(originalType);
}
- /*
- * (non-Javadoc)
- *
- * @see com.raytheon.uf.viz.core.data.IColorMapDataRetrievalCallback#
- * getColorMapData()
- */
@Override
public ColorMapData getColorMapData() throws VizException {
- return new ColorMapData(dataBuffer, dimensions);
+ Buffer buffer = ByteBuffer.allocate(dimensions[0] * dimensions[1]
+ * 3);
+ return new ColorMapData(buffer, dimensions, originalType);
}
}
diff --git a/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/images/GLCMTextureData.java b/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/images/GLCMTextureData.java
index 37a9ff8ff3..9d568a2b9e 100644
--- a/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/images/GLCMTextureData.java
+++ b/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/images/GLCMTextureData.java
@@ -28,6 +28,7 @@ import javax.media.opengl.glu.GLU;
import com.raytheon.uf.common.colormap.image.ColorMapData;
import com.raytheon.uf.viz.core.data.IColorMapDataRetrievalCallback;
+import com.raytheon.uf.viz.core.data.IColorMapDataRetrievalCallback.ColorMapDataType;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.viz.core.gl.GLContextBridge;
import com.raytheon.viz.core.gl.dataformat.GLColorMapData;
@@ -49,6 +50,8 @@ import com.raytheon.viz.core.gl.objects.GLTextureObject;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Aug 2, 2011 bsteffen Initial creation
+ * Mar 21, 2013 1806 bsteffen Update GL mosaicing to use dynamic data
+ * format for offscreen textures.
*
*
*
@@ -271,4 +274,8 @@ public class GLCMTextureData implements IImageCacheable {
return 0;
}
+ public ColorMapDataType getColorMapDataType() {
+ return data.getDataType();
+ }
+
}
diff --git a/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/images/GLColormappedImage.java b/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/images/GLColormappedImage.java
index 970c9191dc..0dcc8d9976 100644
--- a/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/images/GLColormappedImage.java
+++ b/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/images/GLColormappedImage.java
@@ -23,6 +23,7 @@ import javax.media.opengl.GL;
import com.raytheon.uf.common.colormap.prefs.ColorMapParameters;
import com.raytheon.uf.viz.core.data.IColorMapDataRetrievalCallback;
+import com.raytheon.uf.viz.core.data.IColorMapDataRetrievalCallback.ColorMapDataType;
import com.raytheon.uf.viz.core.drawables.IColormappedImage;
import com.raytheon.uf.viz.core.drawables.ext.IImagingExtension;
import com.raytheon.uf.viz.core.exception.VizException;
@@ -39,6 +40,8 @@ import com.sun.opengl.util.texture.TextureCoords;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jul 27, 2009 mschenke Initial creation
+ * Mar 21, 2013 1806 bsteffen Update GL mosaicing to use dynamic data
+ * format for offscreen textures.
*
*
*
@@ -109,6 +112,10 @@ public class GLColormappedImage extends AbstractGLImage implements
return data.getTextureType();
}
+ public ColorMapDataType getColorMapDataType() {
+ return data.getColorMapDataType();
+ }
+
/**
* Return the texture's format
*
diff --git a/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/internal/ext/mosaic/GLMosaicImage.java b/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/internal/ext/mosaic/GLMosaicImage.java
index 9651a9020b..45a3a0dd84 100644
--- a/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/internal/ext/mosaic/GLMosaicImage.java
+++ b/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/internal/ext/mosaic/GLMosaicImage.java
@@ -38,6 +38,8 @@ import com.raytheon.viz.core.gl.images.GLDelegateImage;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Dec 16, 2011 mschenke Initial creation
+ * Mar 21, 2013 1806 bsteffen Update GL mosaicing to use dynamic data
+ * format for offscreen textures.
*
*
*
@@ -165,4 +167,9 @@ public class GLMosaicImage extends GLDelegateImage
return image.getValue(x, y);
}
+ public void setWrappedImage(GLColormappedImage wrappedImage) {
+ this.image.dispose();
+ this.image = wrappedImage;
+ }
+
}
diff --git a/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/internal/ext/mosaic/GLMosaicImageExtension.java b/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/internal/ext/mosaic/GLMosaicImageExtension.java
index c5db747010..697365f8b3 100644
--- a/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/internal/ext/mosaic/GLMosaicImageExtension.java
+++ b/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/internal/ext/mosaic/GLMosaicImageExtension.java
@@ -19,15 +19,15 @@
**/
package com.raytheon.viz.core.gl.internal.ext.mosaic;
-import java.nio.ByteBuffer;
-
import javax.media.opengl.GL;
import com.raytheon.uf.common.colormap.prefs.ColorMapParameters;
import com.raytheon.uf.viz.core.DrawableImage;
import com.raytheon.uf.viz.core.IExtent;
import com.raytheon.uf.viz.core.PixelCoverage;
+import com.raytheon.uf.viz.core.data.IColorMapDataRetrievalCallback.ColorMapDataType;
import com.raytheon.uf.viz.core.drawables.IImage;
+import com.raytheon.uf.viz.core.drawables.IImage.Status;
import com.raytheon.uf.viz.core.drawables.ImagingSupport;
import com.raytheon.uf.viz.core.drawables.PaintProperties;
import com.raytheon.uf.viz.core.drawables.ext.IMosaicImageExtension;
@@ -36,6 +36,7 @@ import com.raytheon.viz.core.gl.ext.GLOffscreenRenderingExtension;
import com.raytheon.viz.core.gl.glsl.AbstractGLSLImagingExtension;
import com.raytheon.viz.core.gl.glsl.GLShaderProgram;
import com.raytheon.viz.core.gl.images.AbstractGLImage;
+import com.raytheon.viz.core.gl.images.GLColormappedImage;
/**
* Extension used for rendering radar mosaic images
@@ -47,6 +48,8 @@ import com.raytheon.viz.core.gl.images.AbstractGLImage;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Dec 16, 2011 mschenke Initial creation
+ * Mar 21, 2013 1806 bsteffen Update GL mosaicing to use dynamic data
+ * format for offscreen textures.
*
*
*
@@ -57,13 +60,14 @@ import com.raytheon.viz.core.gl.images.AbstractGLImage;
public class GLMosaicImageExtension extends AbstractGLSLImagingExtension
implements IMosaicImageExtension {
- private AbstractGLImage writeToImage;
+ private GLColormappedImage writeToImage;
public GLMosaicImage initializeRaster(int[] imageBounds,
IExtent imageExtent, ColorMapParameters params) throws VizException {
+ // Since byte is the most common type of mosaic start with a byte image. It might switch later if needed.
return new GLMosaicImage(target.getExtension(
GLOffscreenRenderingExtension.class).constructOffscreenImage(
- ByteBuffer.class, imageBounds, params), imageBounds,
+ ColorMapDataType.BYTE, imageBounds, params), imageBounds,
imageExtent, this.getClass());
}
@@ -93,7 +97,7 @@ public class GLMosaicImageExtension extends AbstractGLSLImagingExtension
if (image instanceof GLMosaicImage) {
GLMosaicImage mosaicImage = (GLMosaicImage) image;
if (mosaicImage.isRepaint()) {
- writeToImage = mosaicImage.getWrappedImage();
+ writeToImage = getWriteToImage(mosaicImage);
GLOffscreenRenderingExtension extension = target
.getExtension(GLOffscreenRenderingExtension.class);
try {
@@ -134,6 +138,38 @@ public class GLMosaicImageExtension extends AbstractGLSLImagingExtension
}
}
+ private GLColormappedImage getWriteToImage(GLMosaicImage mosaicImage)
+ throws VizException {
+ ColorMapDataType neededType = null;
+ for (DrawableImage di : mosaicImage.getImagesToMosaic()) {
+ IImage image = di.getImage();
+ if (image.getStatus() != Status.LOADED) {
+ continue;
+ }
+ if (image instanceof GLColormappedImage) {
+ GLColormappedImage colorMapImage = (GLColormappedImage) image;
+ ColorMapDataType type = colorMapImage.getColorMapDataType();
+ if (neededType == null) {
+ neededType = type;
+ } else if (neededType != type) {
+ // Mosaicing images of different types?
+ // No Idea how to handle this
+ return mosaicImage.getWrappedImage();
+ }
+ }
+ }
+ GLColormappedImage writeTo = mosaicImage.getWrappedImage();
+ if (neededType != null && neededType != writeTo.getColorMapDataType()) {
+ GLOffscreenRenderingExtension offscreenExt = target
+ .getExtension(GLOffscreenRenderingExtension.class);
+ int[] dimensions = { writeTo.getWidth(), writeTo.getHeight() };
+ writeTo = offscreenExt.constructOffscreenImage(neededType,
+ dimensions, writeTo.getColorMapParameters());
+ mosaicImage.setWrappedImage(writeTo);
+ }
+ return writeTo;
+ }
+
/*
* (non-Javadoc)
*
diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/ServiceBackupComponent.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/ServiceBackupComponent.java
index d81c2aeed3..efa8e7f9bf 100644
--- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/ServiceBackupComponent.java
+++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/ServiceBackupComponent.java
@@ -19,9 +19,6 @@
**/
package com.raytheon.viz.gfe;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-
import com.raytheon.viz.gfe.dialogs.sbu.ServiceBackupDlg;
import com.raytheon.viz.ui.personalities.awips.AbstractCAVEComponent;
@@ -36,6 +33,8 @@ import com.raytheon.viz.ui.personalities.awips.AbstractCAVEComponent;
* ------------ ---------- ----------- --------------------------
* Aug 12, 2011 bphillip Initial creation
* Oct 26, 2012 1287 rferrel Change to force blocking of ServiceBackupDlg.
+ * Mar 21, 2013 1447 dgilling Fix dialog construction so this dialog
+ * is created as a top-level shell.
*
*
*
@@ -54,8 +53,7 @@ public class ServiceBackupComponent extends AbstractCAVEComponent {
*/
@Override
protected void startInternal(String componentName) throws Exception {
- ServiceBackupDlg svcBuDlg = new ServiceBackupDlg(new Shell(
- Display.getCurrent()));
+ ServiceBackupDlg svcBuDlg = new ServiceBackupDlg(null);
svcBuDlg.setBlockOnOpen(true);
svcBuDlg.open();
}
diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/formatterlauncher/StoreTransmitDlg.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/formatterlauncher/StoreTransmitDlg.java
index 98174d46bc..d764d43ecd 100755
--- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/formatterlauncher/StoreTransmitDlg.java
+++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/formatterlauncher/StoreTransmitDlg.java
@@ -65,6 +65,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
* 28May2010 2187 cjeanbap Added StdTextProductFactory
* functionality.
* 09 NOV 2012 1298 rferrel Changes for non-blocking dialog.
+ * 08Mar2013 15564 mgamazaychikov Set the awipsWanPil based on productText data
*
*
* @author lvenable
@@ -387,7 +388,15 @@ public class StoreTransmitDlg extends CaveSWTDialog implements
} else {
req = new OUPRequest();
OfficialUserProduct oup = new OfficialUserProduct();
- String awipsWanPil = productIdTF.getText();
+ /*
+ * DR15564 - set the awipsWanPil based on productText data
+ */
+ String[] splitLines = productText.split("\n");
+ String[] firstLine = splitLines[0].split(" ");
+ String[] secondLine = splitLines[1].split(" ");
+ String cccc = firstLine[1];
+ String productNnnidXxxid = secondLine[0];
+ String awipsWanPil = cccc + productNnnidXxxid;
oup.setAwipsWanPil(awipsWanPil);
oup.setProductText(productText);
diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/sbu/QueryOptionsDlg.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/sbu/QueryOptionsDlg.java
index 23e8322a9a..c1eb5d1a88 100644
--- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/sbu/QueryOptionsDlg.java
+++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/sbu/QueryOptionsDlg.java
@@ -31,7 +31,7 @@ import org.eclipse.swt.widgets.Shell;
import com.raytheon.viz.ui.dialogs.CaveJFACEDialog;
/**
- * TODO Add Description
+ * Asks the user if they want to import digital data and/or start GFE.
*
*
*
@@ -39,7 +39,9 @@ import com.raytheon.viz.ui.dialogs.CaveJFACEDialog;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
- * Aug 4, 2011 randerso Initial creation
+ * Aug 04, 2011 randerso Initial creation
+ * Mar 20, 2013 1447 dgilling Implement changes from A1 DR 21404,
+ * make default selections match A1.
*
*
*
@@ -54,9 +56,11 @@ public class QueryOptionsDlg extends CaveJFACEDialog {
private boolean importGrids;
private boolean startGfe;
-
+
+ private boolean trMode;
+
private Button importGridsBtn;
-
+
private Button startGfeBtn;
/**
@@ -96,23 +100,37 @@ public class QueryOptionsDlg extends CaveJFACEDialog {
if (doImCon) {
importGridsBtn = new Button(top, SWT.CHECK);
importGridsBtn.setText("Import Digital Forecast");
+ importGridsBtn.setSelection(true);
importGridsBtn.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
importGrids = importGridsBtn.getSelection();
}
});
- importGridsBtn.getSelection();
+ importGrids = importGridsBtn.getSelection();
+
+ final Button trModeBtn = new Button(top, SWT.CHECK);
+ trModeBtn.setText("Troubleshooting Mode (no ISC/VTEC AT sharing)");
+ trModeBtn.setSelection(false);
+ trModeBtn.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ trMode = trModeBtn.getSelection();
+ }
+ });
+ trMode = trModeBtn.getSelection();
}
startGfeBtn = new Button(top, SWT.CHECK);
startGfeBtn.setText("Start GFE");
+ startGfeBtn.setSelection(true);
startGfeBtn.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
startGfe = startGfeBtn.getSelection();
}
});
+ startGfe = startGfeBtn.getSelection();
return top;
}
@@ -124,4 +142,8 @@ public class QueryOptionsDlg extends CaveJFACEDialog {
public boolean startGFE() {
return this.startGfe;
}
+
+ public boolean trMode() {
+ return this.trMode;
+ }
}
diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/sbu/ServiceBackupDlg.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/sbu/ServiceBackupDlg.java
index 4f03ab588e..6bad0dedca 100644
--- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/sbu/ServiceBackupDlg.java
+++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/sbu/ServiceBackupDlg.java
@@ -19,7 +19,6 @@
**/
package com.raytheon.viz.gfe.dialogs.sbu;
-import java.io.IOException;
import java.util.List;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -39,6 +38,7 @@ import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.FontData;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.program.Program;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
@@ -57,7 +57,6 @@ import com.raytheon.uf.common.site.requests.GetActiveSitesRequest;
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.common.util.RunProcess;
import com.raytheon.uf.viz.core.RGBColors;
import com.raytheon.uf.viz.core.VizApp;
import com.raytheon.uf.viz.core.auth.UserController;
@@ -87,10 +86,12 @@ import com.raytheon.viz.ui.dialogs.CaveJFACEDialog;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
- * Aug 4, 2011 randerso Initial creation
- * Sep 19,2011 10955 rferrel Use RunProcess
- * Oct 25, 2012 1287 rferrel Code clean up for non-blocking dialog.
- * Nov 15,2012 15614 jdynina Added check for national center
+ * Aug 04, 2011 randerso Initial creation
+ * Sep 19, 2011 10955 rferrel Use RunProcess
+ * Oct 25, 2012 1287 rferrel Code clean up for non-blocking dialog.
+ * Nov 15, 2012 15614 jdynina Added check for national center
+ * Mar 20, 2013 1447 dgilling Port troubleshooting mode changes
+ * from A1 DR 21404, some code cleanup.
*
*
*
@@ -156,7 +157,7 @@ public class ServiceBackupDlg extends CaveJFACEDialog {
private Job updateJob;
private boolean authorized;
-
+
private boolean nationalCenter;
private SVCBU_OP currentOperation = SVCBU_OP.no_backup;
@@ -342,15 +343,11 @@ public class ServiceBackupDlg extends CaveJFACEDialog {
helpItem.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
- try {
- // DR#10955
- RunProcess
- .getRunProcess()
- .exec("/usr/bin/firefox http://"
- + getServiceBackupServer()
- + ":8080/uEngineWeb/GfeServiceBackup/help/svcbu_help.html");
- } catch (IOException e1) {
- statusHandler.error("Unable to open Help page!", e1);
+ final String url = "http://"
+ + getServiceBackupServer()
+ + ":8080/uEngineWeb/GfeServiceBackup/help/svcbu_help.html";
+ if (!Program.launch(url)) {
+ statusHandler.error("Unable to open Help page: " + url);
}
}
});
@@ -360,15 +357,12 @@ public class ServiceBackupDlg extends CaveJFACEDialog {
instructionsItem.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
- try {
- // DR#10955
- RunProcess
- .getRunProcess()
- .exec("/usr/bin/firefox http://"
- + getServiceBackupServer()
- + ":8080/uEngineWeb/GfeServiceBackup/help/svcbu_instructions.html");
- } catch (IOException e1) {
- statusHandler.error("Unable to open Help page!", e1);
+ final String url = "http://"
+ + getServiceBackupServer()
+ + ":8080/uEngineWeb/GfeServiceBackup/help/svcbu_instructions.html";
+ if (!Program.launch(url)) {
+ statusHandler.error("Unable to open Instructions page: "
+ + url);
}
}
});
@@ -378,15 +372,11 @@ public class ServiceBackupDlg extends CaveJFACEDialog {
faqItem.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
- try {
- // DR#10955
- RunProcess
- .getRunProcess()
- .exec("/usr/bin/firefox http://"
- + getServiceBackupServer()
- + ":8080/uEngineWeb/GfeServiceBackup/help/svcbu_faq.html");
- } catch (IOException e1) {
- statusHandler.error("Unable to open Help page!", e1);
+ final String url = "http://"
+ + getServiceBackupServer()
+ + ":8080/uEngineWeb/GfeServiceBackup/help/svcbu_faq.html";
+ if (!Program.launch(url)) {
+ statusHandler.error("Unable to open FAQ page: " + url);
}
}
});
@@ -493,7 +483,7 @@ public class ServiceBackupDlg extends CaveJFACEDialog {
jobManager.addJob(new SvcbuDeactivateSiteJob(failedSite,
this.site));
jobManager.addJob(new SvcbuImportConfJob(site, failedSite,
- progress));
+ false, progress));
jobManager.addJob(new SvcbuActivateSiteJob(failedSite,
this.site));
jobManager.addJob(new SvcbuStartGfeJob(failedSite, this.site));
@@ -544,11 +534,12 @@ public class ServiceBackupDlg extends CaveJFACEDialog {
if (dlg.open() == Window.OK) {
boolean importGrids = dlg.importGrids();
boolean startGFE = dlg.startGFE();
+ boolean trMode = dlg.trMode();
String failedSite = getFailedSite();
jobManager.addJob(new SvcbuDeactivateSiteJob(failedSite,
this.site));
jobManager.addJob(new SvcbuImportConfJob(site, failedSite,
- progress));
+ trMode, progress));
jobManager.addJob(new SvcbuActivateSiteJob(failedSite,
this.site));
if (importGrids) {
@@ -1191,8 +1182,8 @@ public class ServiceBackupDlg extends CaveJFACEDialog {
doExGrids.setEnabled(true);
doExGrids.setText("Export " + this.site
+ "'s Digital Forecast to the Central Server");
- updateBanner("YOU ARE NOT IN BACKUP MODE", getShell().getParent()
- .getFont(), black, gray);
+ updateBanner("YOU ARE NOT IN BACKUP MODE", getShell().getFont(),
+ black, gray);
currentOperation = SVCBU_OP.no_backup;
}
diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/sbu/jobs/SvcbuImportConfJob.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/sbu/jobs/SvcbuImportConfJob.java
index 46adf650ee..895a576fdd 100644
--- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/sbu/jobs/SvcbuImportConfJob.java
+++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/sbu/jobs/SvcbuImportConfJob.java
@@ -49,7 +49,9 @@ import com.raytheon.viz.gfe.dialogs.sbu.ServiceBackupDlg;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
- * Aug 5, 2011 bphillip Initial creation
+ * Aug 05, 2011 bphillip Initial creation
+ * Mar 20, 2013 1447 dgilling Add support for service backup
+ * troubleshooting mode from A1.
*
*
*
@@ -62,6 +64,8 @@ public class SvcbuImportConfJob extends ServiceBackupJob implements
private String failedSite;
+ private boolean trMode;
+
private ProgressDlg progress;
private boolean complete;
@@ -70,21 +74,19 @@ public class SvcbuImportConfJob extends ServiceBackupJob implements
private String errorMsg;
- /**
- * @param name
- */
public SvcbuImportConfJob(String primarySite, String failedSite,
- ProgressDlg progress) {
+ boolean trMode, ProgressDlg progress) {
super("Import Configuration: " + failedSite, primarySite);
this.failedSite = failedSite;
this.progress = progress;
+ this.trMode = trMode;
NotificationManagerJob.addObserver(ServiceBackupDlg.NOTIFY_TOPIC, this);
}
@Override
public void run() {
ImportConfRequest request = new ImportConfRequest(primarySite,
- failedSite);
+ failedSite, trMode);
try {
VizApp.runAsync(new Runnable() {
@@ -158,7 +160,7 @@ public class SvcbuImportConfJob extends ServiceBackupJob implements
+ failedSite, e);
} catch (Exception e) {
statusHandler.handle(Priority.PROBLEM,
- "SERVICE BACKUP: "+e.getLocalizedMessage());
+ "SERVICE BACKUP: " + e.getLocalizedMessage());
} finally {
NotificationManagerJob.removeObserver(
ServiceBackupDlg.NOTIFY_TOPIC, this);
diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/procedures/ProcedureController.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/procedures/ProcedureController.java
index 595911f39e..8a85e02f96 100644
--- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/procedures/ProcedureController.java
+++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/procedures/ProcedureController.java
@@ -52,6 +52,7 @@ import com.raytheon.viz.gfe.core.DataManager;
* Nov 5, 2008 njensen Initial creation
* Jan 8, 2013 1486 dgilling Support changes to BaseGfePyController.
* 02/12/2013 #1597 randerso Added logging to support GFE Performance metrics
+ * Mar 7, 2013 15717 jzeng Change CAVE_STATIC to COMMON_STATIC
*
*
*
@@ -76,7 +77,7 @@ public class ProcedureController extends BaseGfePyController {
super(filePath, anIncludePath, classLoader, dataManager, "Procedure");
LocalizationContext baseCtx = PathManagerFactory.getPathManager()
- .getContext(LocalizationType.CAVE_STATIC,
+ .getContext(LocalizationType.COMMON_STATIC,
LocalizationLevel.BASE);
proceduresDir = GfePyIncludeUtil.getProceduresLF(baseCtx);
diff --git a/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/TimeSeriesDataManager.java b/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/TimeSeriesDataManager.java
index 1095891aed..30e2a0b8bc 100644
--- a/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/TimeSeriesDataManager.java
+++ b/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/TimeSeriesDataManager.java
@@ -53,7 +53,7 @@ import com.raytheon.viz.hydrocommon.util.DbUtils;
/**
* Class for managing database query calls. TimeSeriesDataManager.java
- *
+ *
*
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
@@ -70,1332 +70,1344 @@ import com.raytheon.viz.hydrocommon.util.DbUtils;
* July 25 2011 10082 djingtao modify edit()
* May 30 2012 14967 wkwock overload insertRejectedData method
* Feb 22 2013 14676 lbousaidi check when producttime is null
+ * Mar 25, 2013 1781 mpduff Constrain time series table query with a start time.
*
- *
+ *
* @author dhladky
* @version 1.0
*/
public class TimeSeriesDataManager extends HydroDataManager {
- private static final String TIME_SERIES_DATA_QUERY = "select lid,obstime,lid,product_id from latestobsvalue";
-
- private final String INGEST_FILTER_QUERY = "select lid,pe,ts,extremum,dur from ingestfilter where lid=':lid' and ingest = 'T' order by pe asc,ts_rank asc,ts asc,dur asc,extremum asc";
-
- private final String SHEF_PE_QUERY = "select name||' '|| eng_unit from shefpe where pe=':pe'";
-
- private static final String SHEF_PE_GENERIC_UNITS = "Generic Units";
-
- private static TimeSeriesDataManager manager = null;
-
- private Map stationData;
-
- private boolean sortChanged = false;
-
- private static SimpleDateFormat dateFormat;
-
- /**
- * Map holding the location id and display class.
- */
- private Map stnDisplayMap = null;
-
- static {
- dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
- dateFormat.setTimeZone(TimeZone.getTimeZone("GMT"));
- }
-
- /**
- * private constructor
- */
- private TimeSeriesDataManager() {
- }
-
- /**
- * Get an instance of this singleton object
- *
- * @return instance of this class
- */
- public static synchronized TimeSeriesDataManager getInstance() {
- if (manager == null) {
- manager = new TimeSeriesDataManager();
- }
- return manager;
- }
-
- /**
- * Get TimeSeriesData from the DB
- *
- * @return Object[]
- */
- public Object[] getTimeSeriesData() {
- List