Merge "Issue #449. Fixed problem with simulated time for trend plots in FSS monitors." into 9-Wes2Bridge
Former-commit-id:c2d2b22326
[formerly2f351f13f7
] [formerly5bb20ff4a3
] [formerly5bb20ff4a3
[formerly709be7733b
]] [formerlyc2d2b22326
[formerly2f351f13f7
] [formerly5bb20ff4a3
] [formerly5bb20ff4a3
[formerly709be7733b
]] [formerlybe060f1b1c
[formerly5bb20ff4a3
[formerly709be7733b
] [formerlybe060f1b1c
[formerly 2a3492987c4cd9751aad2c6e20230f983e68f4b5]]]]] Former-commit-id:be060f1b1c
Former-commit-id:bdbfb68438
[formerlya8ab19c6f2
] [formerly9c49c39669
] [formerly d03497af0e25256d8eab2e580f7cf8609279c5ff [formerly 17dcac1fcd432101a572e81e1a87d3a53a7d0082] [formerly9c49c39669
[formerly4a93a365bd
]]] Former-commit-id: 249ab53464e876c735b523ac36dc1ef7d5285b97 [formerly bd06abc51621344835c54065591dda85b12a90ec] [formerly58e6f4140d
[formerly797ee329df
]] Former-commit-id:58e6f4140d
Former-commit-id:daa9ee3dff
This commit is contained in:
commit
db11d13aba
3 changed files with 19 additions and 3 deletions
|
@ -46,6 +46,7 @@ import com.raytheon.uf.common.monitor.data.CommonConfig.AppName;
|
|||
import com.raytheon.uf.common.monitor.data.ObConst;
|
||||
import com.raytheon.uf.viz.monitor.data.ObMultiHrsReports;
|
||||
import com.raytheon.uf.viz.monitor.data.ObTrendDataSet;
|
||||
import com.raytheon.uf.viz.monitor.util.ObUtil;
|
||||
|
||||
/**
|
||||
* The Trend Canvas
|
||||
|
@ -75,7 +76,7 @@ public class TrendPlotCanvas {
|
|||
|
||||
private Canvas canvas;
|
||||
|
||||
Calendar curdate;
|
||||
private Calendar curdate;
|
||||
|
||||
private SortedMap<Date, Float> trendData;
|
||||
|
||||
|
@ -200,7 +201,8 @@ public class TrendPlotCanvas {
|
|||
if (!Float.isNaN(thresholds[1])) {
|
||||
yellowThreshold = thresholds[1];
|
||||
}
|
||||
curdate = Calendar.getInstance();
|
||||
curdate = ObUtil.getTimeNow(); // Calendar.getInstance();
|
||||
|
||||
if (trendDataSet.getYAxisMinMaxIncrement() != null) {
|
||||
float[] minMaxIncr = trendDataSet.getYAxisMinMaxIncrement();
|
||||
if (!Float.isNaN(minMaxIncr[0])) {
|
||||
|
|
|
@ -68,6 +68,7 @@ import com.raytheon.uf.viz.monitor.listeners.IMonitorListener;
|
|||
import com.raytheon.uf.viz.monitor.trendplot.TrendPlotDlg;
|
||||
import com.raytheon.uf.viz.monitor.util.MonitorConfigConstants;
|
||||
import com.raytheon.viz.ui.EditorUtil;
|
||||
import com.raytheon.uf.viz.monitor.util.ObUtil;
|
||||
|
||||
/**
|
||||
* Abstrct Zone table dialog that is the foundation for all Zone dialogs.
|
||||
|
@ -760,7 +761,7 @@ public abstract class ZoneTableDlg extends Dialog implements IMonitorListener,
|
|||
HodographDlg hodographDlg = new HodographDlg(shell,
|
||||
varName.name(), station, "METAR");
|
||||
|
||||
hodographDlg.setCurrentTime(Calendar.getInstance());
|
||||
hodographDlg.setCurrentTime(ObUtil.getTimeNow()); //Calendar.getInstance());
|
||||
if (thresholds[0] == Float.NaN || thresholds[1] == Float.NaN
|
||||
|| thresholds[2] == Float.NaN
|
||||
|| thresholds[3] == Float.NaN) {
|
||||
|
|
|
@ -82,6 +82,19 @@ public final class ObUtil {
|
|||
dropTime.add(Calendar.HOUR, -(ObConst.THREAT_INTERVAL_HOURS));
|
||||
return dropTime.getTime();
|
||||
}
|
||||
|
||||
/**
|
||||
* Method that gets the current time.
|
||||
*
|
||||
* @return current time.
|
||||
*/
|
||||
public static Calendar getTimeNow() {
|
||||
Date now = SimulatedTime.getSystemTime().getTime();
|
||||
Calendar nowTime = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
|
||||
nowTime.setTime(now);
|
||||
|
||||
return nowTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks for the existence of a localization-created flag file which
|
||||
|
|
Loading…
Add table
Reference in a new issue