mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-28 00:16:46 +00:00
Moved Timer in the SimpleChartPanel
This commit is contained in:
+8
@@ -10,8 +10,16 @@ import org.moxieapps.gwt.highcharts.client.plotOptions.PlotOptions;
|
||||
import org.moxieapps.gwt.highcharts.client.plotOptions.SeriesPlotOptions;
|
||||
|
||||
import com.google.gwt.user.client.ui.SimplePanel;
|
||||
import com.sap.sailing.gwt.ui.client.Timer;
|
||||
|
||||
public abstract class SimpleChartPanel extends SimplePanel {
|
||||
|
||||
protected final Timer timer;
|
||||
|
||||
public SimpleChartPanel(Timer timer) {
|
||||
this.timer = timer;
|
||||
}
|
||||
|
||||
/**
|
||||
* When using this method to enable the use of checkboxes only for hiding / showing a series, callers need to ensure
|
||||
* that all series have {@link PlotOptions#setSelected(boolean)} set to <code>true</code> for all series that are
|
||||
|
||||
+1
-3
@@ -77,7 +77,6 @@ public class WindChart extends SimpleChartPanel implements Component<WindChartSe
|
||||
private Series timeLineSeries;
|
||||
private final boolean allowTimeAdjust;
|
||||
private boolean ignoreClickOnce;
|
||||
private final Timer timer;
|
||||
private final DateTimeFormat dateFormat = DateTimeFormat.getFormat("HH:mm:ss");
|
||||
|
||||
private Long timeOfEarliestRequestInMillis;
|
||||
@@ -95,7 +94,7 @@ public class WindChart extends SimpleChartPanel implements Component<WindChartSe
|
||||
public WindChart(SailingServiceAsync sailingService, RaceSelectionProvider raceSelectionProvider, Timer timer,
|
||||
WindChartSettings settings, final StringMessages stringMessages, AsyncActionsExecutor asyncActionsExecutor,
|
||||
ErrorReporter errorReporter, boolean compactChart, boolean allowTimeAdjust) {
|
||||
super();
|
||||
super(timer);
|
||||
this.sailingService = sailingService;
|
||||
this.asyncActionsExecutor = asyncActionsExecutor;
|
||||
this.stringMessages = stringMessages;
|
||||
@@ -105,7 +104,6 @@ public class WindChart extends SimpleChartPanel implements Component<WindChartSe
|
||||
this.windSourceSpeedSeries = new HashMap<WindSource, Series>();
|
||||
this.colorMap = new ColorMap<WindSource>();
|
||||
this.windSourceTypesToDisplay = new HashSet<WindSourceType>();
|
||||
this.timer = timer;
|
||||
chart = new Chart()
|
||||
.setZoomType(Chart.ZoomType.X)
|
||||
.setSpacingRight(20)
|
||||
|
||||
+1
-2
@@ -91,7 +91,6 @@ implements CompetitorSelectionChangeListener, RaceSelectionChangeListener, TimeL
|
||||
protected final RaceSelectionProvider raceSelectionProvider;
|
||||
protected long stepSize = 5000;
|
||||
protected final StringMessages stringMessages;
|
||||
protected final Timer timer;
|
||||
protected final DateTimeFormat dateFormat = DateTimeFormat.getFormat("HH:mm:ss");
|
||||
protected DetailType dataToShow;
|
||||
protected final CompetitorSelectionProvider competitorSelectionProvider;
|
||||
@@ -100,10 +99,10 @@ implements CompetitorSelectionChangeListener, RaceSelectionChangeListener, TimeL
|
||||
CompetitorSelectionProvider competitorSelectionProvider, RaceSelectionProvider raceSelectionProvider,
|
||||
Timer timer, final StringMessages stringMessages, ErrorReporter errorReporter, DetailType dataToShow,
|
||||
boolean compactChart, boolean allowTimeAdjust) {
|
||||
super(timer);
|
||||
this.stringMessages = stringMessages;
|
||||
dataSeriesByCompetitor = new HashMap<CompetitorDTO, Series>();
|
||||
markPassingSeriesByCompetitor = new HashMap<CompetitorDTO, Series>();
|
||||
this.timer = timer;
|
||||
this.timer.addTimeListener(this);
|
||||
this.competitorSelectionProvider = competitorSelectionProvider;
|
||||
competitorSelectionProvider.addCompetitorSelectionChangeListener(this);
|
||||
|
||||
Reference in New Issue
Block a user