Merge "Issue #449. Fixed problem with simulated time for trend plots in FSS monitors." into 9-Wes2Bridge
Former-commit-id:5bb20ff4a3
[formerly709be7733b
] [formerly5bb20ff4a3
[formerly709be7733b
] [formerlybe060f1b1c
[formerly 2a3492987c4cd9751aad2c6e20230f983e68f4b5]]] Former-commit-id:be060f1b1c
Former-commit-id:9c49c39669
[formerly4a93a365bd
] Former-commit-id:797ee329df
This commit is contained in:
commit
58e6f4140d
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