mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-30 17:36:40 +00:00
Deleted the DataLoadedEvent
This commit is contained in:
1 parent
f43b50153b
commit
e479e33063
2 files changed
-39
No files matched your search
-29
@@ -23,7 +23,6 @@ import org.moxieapps.gwt.highcharts.client.plotOptions.ScatterPlotOptions;
|
||||
|
||||
import com.google.gwt.core.client.Scheduler;
|
||||
import com.google.gwt.core.client.Scheduler.ScheduledCommand;
|
||||
import com.google.gwt.event.shared.GwtEvent;
|
||||
import com.google.gwt.i18n.client.DateTimeFormat;
|
||||
import com.google.gwt.i18n.client.NumberFormat;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
@@ -215,7 +214,6 @@ implements CompetitorSelectionChangeListener, RaceSelectionChangeListener, TimeL
|
||||
|
||||
@Override
|
||||
public void onSuccess(MultiCompetitorRaceDataDTO result) {
|
||||
fireEvent(new DataLoadedEvent());
|
||||
if (result != null) {
|
||||
for (CompetitorRaceDataDTO competitorData : result.getAllRaceData()) {
|
||||
if (chartData.contains(competitorData.getCompetitor())) {
|
||||
@@ -321,33 +319,6 @@ implements CompetitorSelectionChangeListener, RaceSelectionChangeListener, TimeL
|
||||
}
|
||||
}
|
||||
|
||||
// DataLoaded event handling.
|
||||
public void addDataLoadedHandler(DataLoadedHandler handler) {
|
||||
this.addHandler(handler, DataLoadedEvent.TYPE);
|
||||
}
|
||||
|
||||
public interface DataLoadedHandler extends com.google.gwt.event.shared.EventHandler {
|
||||
public void onDataLoaded(DataLoadedEvent event);
|
||||
}
|
||||
|
||||
public static class DataLoadedEvent extends GwtEvent<DataLoadedHandler> {
|
||||
public static Type<DataLoadedHandler> TYPE = new Type<DataLoadedHandler>();
|
||||
|
||||
public DataLoadedEvent() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dispatch(DataLoadedHandler handler) {
|
||||
handler.onDataLoaded(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public com.google.gwt.event.shared.GwtEvent.Type<DataLoadedHandler> getAssociatedType() {
|
||||
return TYPE;
|
||||
}
|
||||
}
|
||||
|
||||
private Iterable<CompetitorDTO> getVisibleCompetitors() {
|
||||
return competitorSelectionProvider.getSelectedCompetitors();
|
||||
}
|
||||
|
||||
-10
@@ -28,8 +28,6 @@ import com.sap.sailing.gwt.ui.client.RaceSelectionProvider;
|
||||
import com.sap.sailing.gwt.ui.client.SailingServiceAsync;
|
||||
import com.sap.sailing.gwt.ui.client.StringMessages;
|
||||
import com.sap.sailing.gwt.ui.client.Timer;
|
||||
import com.sap.sailing.gwt.ui.leaderboard.AbstractChartPanel.DataLoadedEvent;
|
||||
import com.sap.sailing.gwt.ui.leaderboard.AbstractChartPanel.DataLoadedHandler;
|
||||
import com.sap.sailing.gwt.ui.shared.components.CollapsablePanel;
|
||||
import com.sap.sailing.gwt.ui.shared.components.ComponentToolbar;
|
||||
|
||||
@@ -58,14 +56,6 @@ public class CompareCompetitorsChartDialog extends DialogBox {
|
||||
multiChartPanel = new MultiChartPanel(sailingService, competitorSelectionProvider, raceSelectionProvider,
|
||||
timer, stringConstants, errorReporter);
|
||||
multiChartPanel.setSize("100%", "100%");
|
||||
//TODO Delete DataLoadedHandler
|
||||
multiChartPanel.addDataLoadedHandler(new DataLoadedHandler() {
|
||||
@Override
|
||||
public void onDataLoaded(DataLoadedEvent event) {
|
||||
CompareCompetitorsChartDialog.this.setPopupPosition(5, 5);
|
||||
CompareCompetitorsChartDialog.this.show();
|
||||
}
|
||||
});
|
||||
|
||||
FlowPanel contentPanel = new FlowPanel();
|
||||
|
||||
|
||||
Reference in new issue
Block a user