@Test public void testSetupPlotBufferMinAndMaxTimesJump() { GregorianCalendar minTime = new GregorianCalendar(); GregorianCalendar maxTime = new GregorianCalendar(); minTime.setTimeInMillis(0); maxTime.setTimeInMillis(minTime.getTimeInMillis()); maxTime.add(Calendar.HOUR, 1); PlotSettings settings = new PlotSettings(); settings.setMinTime(minTime.getTimeInMillis()); settings.setMaxTime(maxTime.getTimeInMillis()); settings.setTimeAxisSubsequentSetting(TimeAxisSubsequentBoundsSetting.JUMP); PlotAbstraction testPlot = new PlotView.Builder(PlotterPlot.class) .plotSettings(settings) .isCompressionEnabled(true) .build(); PlotterPlot plotPackage = (PlotterPlot) testPlot.returnPlottingPackage(); plotPackage.setPlotAbstraction(plotView); ((PlotDataManager)plotPackage.getPlotDataManager()).setupPlotBufferMinAndMaxTimes(); }
void setupPlotBufferMinAndMaxTimes() { plotDataBufferStartTime = plot.getCurrentTimeAxisMin(); plotDataBufferEndTime = plot.getCurrentTimeAxisMax(); assert plotDataBufferStartTime != null : "buffer start time not intialized when it should have been"; assert plotDataBufferEndTime != null : "buffer end time not intialized when it should have been"; }
PlotDataManager implements AbstractPlotDataManager { void setupPlotBufferMinAndMaxTimes() { plotDataBufferStartTime = plot.getCurrentTimeAxisMin(); plotDataBufferEndTime = plot.getCurrentTimeAxisMax(); assert plotDataBufferStartTime != null : "buffer start time not intialized when it should have been"; assert plotDataBufferEndTime != null : "buffer end time not intialized when it should have been"; } }
PlotDataManager implements AbstractPlotDataManager { void setupPlotBufferMinAndMaxTimes() { plotDataBufferStartTime = plot.getCurrentTimeAxisMin(); plotDataBufferEndTime = plot.getCurrentTimeAxisMax(); assert plotDataBufferStartTime != null : "buffer start time not intialized when it should have been"; assert plotDataBufferEndTime != null : "buffer end time not intialized when it should have been"; } PlotDataManager(PlotterPlot thePlot); }
PlotDataManager implements AbstractPlotDataManager { void setupPlotBufferMinAndMaxTimes() { plotDataBufferStartTime = plot.getCurrentTimeAxisMin(); plotDataBufferEndTime = plot.getCurrentTimeAxisMax(); assert plotDataBufferStartTime != null : "buffer start time not intialized when it should have been"; assert plotDataBufferEndTime != null : "buffer end time not intialized when it should have been"; } PlotDataManager(PlotterPlot thePlot); @Override void addDataSet(String dataSetName, Color plottingColor); @Override void addData(String feed, SortedMap<Long, Double> points); void resizeAndReloadPlotBuffer(); @Override void informUpdateCacheDataStreamStarted(); void informResizeEvent(); @Override PlotDataSeries getNamedDataSeries(String name); void setDataSeries(Map<String, PlotDataSeries> dataSeries); Map<String, PlotDataSeries> getDataSeries(); void setPlot(PlotterPlot plot); AbstractPlottingPackage getPlot(); }
PlotDataManager implements AbstractPlotDataManager { void setupPlotBufferMinAndMaxTimes() { plotDataBufferStartTime = plot.getCurrentTimeAxisMin(); plotDataBufferEndTime = plot.getCurrentTimeAxisMax(); assert plotDataBufferStartTime != null : "buffer start time not intialized when it should have been"; assert plotDataBufferEndTime != null : "buffer end time not intialized when it should have been"; } PlotDataManager(PlotterPlot thePlot); @Override void addDataSet(String dataSetName, Color plottingColor); @Override void addData(String feed, SortedMap<Long, Double> points); void resizeAndReloadPlotBuffer(); @Override void informUpdateCacheDataStreamStarted(); void informResizeEvent(); @Override PlotDataSeries getNamedDataSeries(String name); void setDataSeries(Map<String, PlotDataSeries> dataSeries); Map<String, PlotDataSeries> getDataSeries(); void setPlot(PlotterPlot plot); AbstractPlottingPackage getPlot();  }