mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-22 12:03:58 +00:00
renamed LeaderBoardPanel & UnstyledLeaderBoardPanel in a way to reduce
the diff to master
This commit is contained in:
1 parent
82fe3330aa
commit
042902aef1
43 files changed
+3797
-3797
No files matched your search
+2
-2
@@ -8,12 +8,12 @@ import com.sap.sailing.gwt.ui.client.CompetitorSelectionModel;
|
|||||||
import com.sap.sailing.gwt.ui.client.SailingServiceAsync;
|
import com.sap.sailing.gwt.ui.client.SailingServiceAsync;
|
||||||
import com.sap.sailing.gwt.ui.client.StringMessages;
|
import com.sap.sailing.gwt.ui.client.StringMessages;
|
||||||
import com.sap.sailing.gwt.ui.client.shared.controls.AbstractSortableColumnWithMinMax;
|
import com.sap.sailing.gwt.ui.client.shared.controls.AbstractSortableColumnWithMinMax;
|
||||||
import com.sap.sailing.gwt.ui.leaderboard.LeaderboardPanel;
|
import com.sap.sailing.gwt.ui.leaderboard.ClassicLeaderboardPanel;
|
||||||
import com.sap.sailing.gwt.ui.leaderboard.SortedCellTable;
|
import com.sap.sailing.gwt.ui.leaderboard.SortedCellTable;
|
||||||
import com.sap.sse.gwt.client.ErrorReporter;
|
import com.sap.sse.gwt.client.ErrorReporter;
|
||||||
import com.sap.sse.gwt.client.async.AsyncActionsExecutor;
|
import com.sap.sse.gwt.client.async.AsyncActionsExecutor;
|
||||||
|
|
||||||
public class LeaderboardPanelMock extends LeaderboardPanel {
|
public class LeaderboardPanelMock extends ClassicLeaderboardPanel {
|
||||||
|
|
||||||
public LeaderboardPanelMock(SailingServiceAsync sailingService,
|
public LeaderboardPanelMock(SailingServiceAsync sailingService,
|
||||||
String leaderboardName, ErrorReporter errorReporter,
|
String leaderboardName, ErrorReporter errorReporter,
|
||||||
|
|||||||
+2
-2
@@ -14,14 +14,14 @@ import com.sap.sailing.gwt.ui.client.SailingServiceAsync;
|
|||||||
import com.sap.sailing.gwt.ui.client.StringMessages;
|
import com.sap.sailing.gwt.ui.client.StringMessages;
|
||||||
import com.sap.sailing.gwt.ui.leaderboard.CompetitorFilterPanel;
|
import com.sap.sailing.gwt.ui.leaderboard.CompetitorFilterPanel;
|
||||||
import com.sap.sailing.gwt.ui.leaderboard.LeaderboardResources;
|
import com.sap.sailing.gwt.ui.leaderboard.LeaderboardResources;
|
||||||
import com.sap.sailing.gwt.ui.leaderboard.UnStyledLeaderboardPanel;
|
import com.sap.sailing.gwt.ui.leaderboard.LeaderboardPanel;
|
||||||
import com.sap.sse.gwt.client.ErrorReporter;
|
import com.sap.sse.gwt.client.ErrorReporter;
|
||||||
import com.sap.sse.gwt.client.async.AsyncActionsExecutor;
|
import com.sap.sse.gwt.client.async.AsyncActionsExecutor;
|
||||||
import com.sap.sse.gwt.client.player.Timer;
|
import com.sap.sse.gwt.client.player.Timer;
|
||||||
import com.sap.sse.gwt.client.shared.components.ComponentResources;
|
import com.sap.sse.gwt.client.shared.components.ComponentResources;
|
||||||
import com.sap.sse.gwt.client.useragent.UserAgentDetails;
|
import com.sap.sse.gwt.client.useragent.UserAgentDetails;
|
||||||
|
|
||||||
public class SixtyInchLeaderBoard extends UnStyledLeaderboardPanel {
|
public class SixtyInchLeaderBoard extends LeaderboardPanel {
|
||||||
private static final LeaderboardResources resources = GWT.create(LeaderboardResources.class);
|
private static final LeaderboardResources resources = GWT.create(LeaderboardResources.class);
|
||||||
private static final ComponentResources componentResources = GWT.create(ComponentResources.class);
|
private static final ComponentResources componentResources = GWT.create(ComponentResources.class);
|
||||||
private static final LeaderboardTableResourcesSixty tableResources = GWT
|
private static final LeaderboardTableResourcesSixty tableResources = GWT
|
||||||
|
|||||||
+4
-4
@@ -19,7 +19,7 @@ import com.sap.sailing.gwt.ui.client.LeaderboardUpdateListener;
|
|||||||
import com.sap.sailing.gwt.ui.client.LeaderboardUpdateProvider;
|
import com.sap.sailing.gwt.ui.client.LeaderboardUpdateProvider;
|
||||||
import com.sap.sailing.gwt.ui.client.SailingServiceAsync;
|
import com.sap.sailing.gwt.ui.client.SailingServiceAsync;
|
||||||
import com.sap.sailing.gwt.ui.client.StringMessages;
|
import com.sap.sailing.gwt.ui.client.StringMessages;
|
||||||
import com.sap.sailing.gwt.ui.leaderboard.LeaderboardPanel;
|
import com.sap.sailing.gwt.ui.leaderboard.ClassicLeaderboardPanel;
|
||||||
import com.sap.sse.gwt.client.ErrorReporter;
|
import com.sap.sse.gwt.client.ErrorReporter;
|
||||||
import com.sap.sse.gwt.client.async.AsyncActionsExecutor;
|
import com.sap.sse.gwt.client.async.AsyncActionsExecutor;
|
||||||
import com.sap.sse.gwt.client.player.Timer;
|
import com.sap.sse.gwt.client.player.Timer;
|
||||||
@@ -41,7 +41,7 @@ public class LeaderboardWithHeaderPerspective extends AbstractPerspectiveComposi
|
|||||||
private final DockLayoutPanel dockPanel;
|
private final DockLayoutPanel dockPanel;
|
||||||
private final static int SAP_HEADER_HEIGHT = 75;
|
private final static int SAP_HEADER_HEIGHT = 75;
|
||||||
private final Widget currentContentWidget;
|
private final Widget currentContentWidget;
|
||||||
private final LeaderboardPanel leaderboardPanel;
|
private final ClassicLeaderboardPanel leaderboardPanel;
|
||||||
private final StringMessages stringMessages;
|
private final StringMessages stringMessages;
|
||||||
|
|
||||||
public LeaderboardWithHeaderPerspective(Component<?> parent,
|
public LeaderboardWithHeaderPerspective(Component<?> parent,
|
||||||
@@ -178,7 +178,7 @@ public class LeaderboardWithHeaderPerspective extends AbstractPerspectiveComposi
|
|||||||
leaderboardPanel.removeLeaderboardUpdateListener(listener);
|
leaderboardPanel.removeLeaderboardUpdateListener(listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
private LeaderboardPanel createLeaderboardPanel(LeaderboardWithHeaderPerspectiveLifecycle lifecycle,
|
private ClassicLeaderboardPanel createLeaderboardPanel(LeaderboardWithHeaderPerspectiveLifecycle lifecycle,
|
||||||
PerspectiveCompositeSettings<LeaderboardWithHeaderPerspectiveSettings> settings,
|
PerspectiveCompositeSettings<LeaderboardWithHeaderPerspectiveSettings> settings,
|
||||||
SailingServiceAsync sailingService, AsyncActionsExecutor asyncActionsExecutor,
|
SailingServiceAsync sailingService, AsyncActionsExecutor asyncActionsExecutor,
|
||||||
CompetitorSelectionProvider competitorSelectionProvider, Timer timer,
|
CompetitorSelectionProvider competitorSelectionProvider, Timer timer,
|
||||||
@@ -187,7 +187,7 @@ public class LeaderboardWithHeaderPerspective extends AbstractPerspectiveComposi
|
|||||||
LeaderboardSettings leaderboardSettings = settings
|
LeaderboardSettings leaderboardSettings = settings
|
||||||
.findSettingsByComponentId(leaderboardPanelLifecycle.getComponentId());
|
.findSettingsByComponentId(leaderboardPanelLifecycle.getComponentId());
|
||||||
|
|
||||||
LeaderboardPanel leaderboardPanel = new LeaderboardPanel(this, getComponentContext(), sailingService,
|
ClassicLeaderboardPanel leaderboardPanel = new ClassicLeaderboardPanel(this, getComponentContext(), sailingService,
|
||||||
asyncActionsExecutor,
|
asyncActionsExecutor,
|
||||||
leaderboardSettings, /*isEmbedded*/true, /* preSelectedRace */null,
|
leaderboardSettings, /*isEmbedded*/true, /* preSelectedRace */null,
|
||||||
competitorSelectionProvider, timer, /* leaderboardGroupName */"",
|
competitorSelectionProvider, timer, /* leaderboardGroupName */"",
|
||||||
|
|||||||
+3
-3
@@ -15,7 +15,7 @@ import com.sap.sailing.domain.common.dto.RaceColumnDTO;
|
|||||||
import com.sap.sailing.gwt.ui.client.LeaderboardUpdateListener;
|
import com.sap.sailing.gwt.ui.client.LeaderboardUpdateListener;
|
||||||
import com.sap.sailing.gwt.ui.client.StringMessages;
|
import com.sap.sailing.gwt.ui.client.StringMessages;
|
||||||
import com.sap.sailing.gwt.ui.common.client.DateAndTimeFormatterUtil;
|
import com.sap.sailing.gwt.ui.common.client.DateAndTimeFormatterUtil;
|
||||||
import com.sap.sailing.gwt.ui.leaderboard.LeaderboardPanel;
|
import com.sap.sailing.gwt.ui.leaderboard.ClassicLeaderboardPanel;
|
||||||
import com.sap.sailing.gwt.ui.leaderboard.ScoringSchemeTypeFormatter;
|
import com.sap.sailing.gwt.ui.leaderboard.ScoringSchemeTypeFormatter;
|
||||||
|
|
||||||
public class OldLeaderboard extends Composite implements LeaderboardUpdateListener {
|
public class OldLeaderboard extends Composite implements LeaderboardUpdateListener {
|
||||||
@@ -32,10 +32,10 @@ public class OldLeaderboard extends Composite implements LeaderboardUpdateListen
|
|||||||
@UiField DivElement lastScoringCommentDiv;
|
@UiField DivElement lastScoringCommentDiv;
|
||||||
@UiField DivElement scoringSchemeDiv;
|
@UiField DivElement scoringSchemeDiv;
|
||||||
|
|
||||||
private LeaderboardPanel leaderboardPanel;
|
private ClassicLeaderboardPanel leaderboardPanel;
|
||||||
private final StringMessages stringmessages;
|
private final StringMessages stringmessages;
|
||||||
|
|
||||||
public OldLeaderboard(LeaderboardPanel leaderboardPanel, StringMessages stringmessages) {
|
public OldLeaderboard(ClassicLeaderboardPanel leaderboardPanel, StringMessages stringmessages) {
|
||||||
this.stringmessages = stringmessages;
|
this.stringmessages = stringmessages;
|
||||||
this.leaderboardPanel = leaderboardPanel;
|
this.leaderboardPanel = leaderboardPanel;
|
||||||
|
|
||||||
|
|||||||
+4
-4
@@ -33,7 +33,7 @@ import com.sap.sailing.gwt.ui.client.DebugIdHelper;
|
|||||||
import com.sap.sailing.gwt.ui.client.LeaderboardUpdateListener;
|
import com.sap.sailing.gwt.ui.client.LeaderboardUpdateListener;
|
||||||
import com.sap.sailing.gwt.ui.client.StringMessages;
|
import com.sap.sailing.gwt.ui.client.StringMessages;
|
||||||
import com.sap.sailing.gwt.ui.common.client.DateAndTimeFormatterUtil;
|
import com.sap.sailing.gwt.ui.common.client.DateAndTimeFormatterUtil;
|
||||||
import com.sap.sailing.gwt.ui.leaderboard.LeaderboardPanel;
|
import com.sap.sailing.gwt.ui.leaderboard.ClassicLeaderboardPanel;
|
||||||
import com.sap.sailing.gwt.ui.leaderboard.ScoringSchemeTypeFormatter;
|
import com.sap.sailing.gwt.ui.leaderboard.ScoringSchemeTypeFormatter;
|
||||||
import com.sap.sse.gwt.client.controls.busyindicator.BusyIndicator;
|
import com.sap.sse.gwt.client.controls.busyindicator.BusyIndicator;
|
||||||
import com.sap.sse.gwt.client.controls.busyindicator.BusyStateChangeListener;
|
import com.sap.sse.gwt.client.controls.busyindicator.BusyStateChangeListener;
|
||||||
@@ -61,7 +61,7 @@ public class OldLeaderboard extends Composite implements BusyStateChangeListener
|
|||||||
@UiField BusyIndicator busyIndicator;
|
@UiField BusyIndicator busyIndicator;
|
||||||
@UiField EventRegattaLeaderboardResources local_res;
|
@UiField EventRegattaLeaderboardResources local_res;
|
||||||
|
|
||||||
private LeaderboardPanel leaderboardPanel;
|
private ClassicLeaderboardPanel leaderboardPanel;
|
||||||
private Timer autoRefreshTimer;
|
private Timer autoRefreshTimer;
|
||||||
private final OldLeaderboardDelegate delegate;
|
private final OldLeaderboardDelegate delegate;
|
||||||
|
|
||||||
@@ -206,7 +206,7 @@ public class OldLeaderboard extends Composite implements BusyStateChangeListener
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLeaderboard(LeaderboardPanel leaderboardPanel, final Timer timer) {
|
public void setLeaderboard(ClassicLeaderboardPanel leaderboardPanel, final Timer timer) {
|
||||||
this.autoRefreshTimer = timer;
|
this.autoRefreshTimer = timer;
|
||||||
this.leaderboardPanel = leaderboardPanel;
|
this.leaderboardPanel = leaderboardPanel;
|
||||||
if (leaderboardPanel.getComponentContext() == null) {
|
if (leaderboardPanel.getComponentContext() == null) {
|
||||||
@@ -274,7 +274,7 @@ public class OldLeaderboard extends Composite implements BusyStateChangeListener
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface OldLeaderboardDelegate extends LeaderboardDelegate<LeaderboardPanel> {
|
public interface OldLeaderboardDelegate extends LeaderboardDelegate<ClassicLeaderboardPanel> {
|
||||||
Element getHasLiveRaceElement();
|
Element getHasLiveRaceElement();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -4,9 +4,9 @@ import com.google.gwt.dom.client.Element;
|
|||||||
import com.google.gwt.user.client.ui.Label;
|
import com.google.gwt.user.client.ui.Label;
|
||||||
import com.sap.sailing.gwt.home.desktop.partials.old.AbstractLeaderboardFullscreenViewer;
|
import com.sap.sailing.gwt.home.desktop.partials.old.AbstractLeaderboardFullscreenViewer;
|
||||||
import com.sap.sailing.gwt.home.desktop.partials.old.leaderboard.OldLeaderboard.OldLeaderboardDelegate;
|
import com.sap.sailing.gwt.home.desktop.partials.old.leaderboard.OldLeaderboard.OldLeaderboardDelegate;
|
||||||
import com.sap.sailing.gwt.ui.leaderboard.LeaderboardPanel;
|
import com.sap.sailing.gwt.ui.leaderboard.ClassicLeaderboardPanel;
|
||||||
|
|
||||||
public class OldLeaderboardDelegateFullscreenViewer extends AbstractLeaderboardFullscreenViewer<LeaderboardPanel>
|
public class OldLeaderboardDelegateFullscreenViewer extends AbstractLeaderboardFullscreenViewer<ClassicLeaderboardPanel>
|
||||||
implements OldLeaderboardDelegate {
|
implements OldLeaderboardDelegate {
|
||||||
|
|
||||||
private final Label hasLiveRace = new Label();
|
private final Label hasLiveRace = new Label();
|
||||||
|
|||||||
+3
-3
@@ -27,7 +27,7 @@ import com.sap.sailing.gwt.settings.client.leaderboard.LeaderboardSettings;
|
|||||||
import com.sap.sailing.gwt.ui.client.DebugIdHelper;
|
import com.sap.sailing.gwt.ui.client.DebugIdHelper;
|
||||||
import com.sap.sailing.gwt.ui.client.StringMessages;
|
import com.sap.sailing.gwt.ui.client.StringMessages;
|
||||||
import com.sap.sailing.gwt.ui.common.client.DateAndTimeFormatterUtil;
|
import com.sap.sailing.gwt.ui.common.client.DateAndTimeFormatterUtil;
|
||||||
import com.sap.sailing.gwt.ui.leaderboard.LeaderboardPanel;
|
import com.sap.sailing.gwt.ui.leaderboard.ClassicLeaderboardPanel;
|
||||||
import com.sap.sailing.gwt.ui.leaderboard.MultiLeaderboardProxyPanel;
|
import com.sap.sailing.gwt.ui.leaderboard.MultiLeaderboardProxyPanel;
|
||||||
import com.sap.sailing.gwt.ui.leaderboard.ScoringSchemeTypeFormatter;
|
import com.sap.sailing.gwt.ui.leaderboard.ScoringSchemeTypeFormatter;
|
||||||
import com.sap.sailing.gwt.ui.leaderboard.SelectedLeaderboardChangeListener;
|
import com.sap.sailing.gwt.ui.leaderboard.SelectedLeaderboardChangeListener;
|
||||||
@@ -59,7 +59,7 @@ public class OldMultiLeaderboard extends Composite implements SelectedLeaderboar
|
|||||||
private MultiLeaderboardProxyPanel multiLeaderboardPanel;
|
private MultiLeaderboardProxyPanel multiLeaderboardPanel;
|
||||||
private Timer autoRefreshTimer;
|
private Timer autoRefreshTimer;
|
||||||
private final OldMultiLeaderboardDelegate delegate;
|
private final OldMultiLeaderboardDelegate delegate;
|
||||||
private LeaderboardPanel lastSelectedLeaderboardPanel;
|
private ClassicLeaderboardPanel lastSelectedLeaderboardPanel;
|
||||||
|
|
||||||
public OldMultiLeaderboard() {
|
public OldMultiLeaderboard() {
|
||||||
this(null);
|
this(null);
|
||||||
@@ -232,7 +232,7 @@ public class OldMultiLeaderboard extends Composite implements SelectedLeaderboar
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSelectedLeaderboardChanged(LeaderboardPanel selectedLeaderboard) {
|
public void onSelectedLeaderboardChanged(ClassicLeaderboardPanel selectedLeaderboard) {
|
||||||
if(lastSelectedLeaderboardPanel != null) {
|
if(lastSelectedLeaderboardPanel != null) {
|
||||||
lastSelectedLeaderboardPanel.removeBusyStateChangeListener(this);
|
lastSelectedLeaderboardPanel.removeBusyStateChangeListener(this);
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-5
@@ -9,7 +9,7 @@ import com.sap.sailing.gwt.ui.client.DebugIdHelper;
|
|||||||
import com.sap.sailing.gwt.ui.client.SailingServiceAsync;
|
import com.sap.sailing.gwt.ui.client.SailingServiceAsync;
|
||||||
import com.sap.sailing.gwt.ui.client.StringMessages;
|
import com.sap.sailing.gwt.ui.client.StringMessages;
|
||||||
import com.sap.sailing.gwt.ui.client.shared.charts.MultiCompetitorLeaderboardChart;
|
import com.sap.sailing.gwt.ui.client.shared.charts.MultiCompetitorLeaderboardChart;
|
||||||
import com.sap.sailing.gwt.ui.leaderboard.LeaderboardPanel;
|
import com.sap.sailing.gwt.ui.leaderboard.ClassicLeaderboardPanel;
|
||||||
import com.sap.sse.common.settings.Settings;
|
import com.sap.sse.common.settings.Settings;
|
||||||
import com.sap.sse.gwt.client.ErrorReporter;
|
import com.sap.sse.gwt.client.ErrorReporter;
|
||||||
import com.sap.sse.gwt.client.async.AsyncActionsExecutor;
|
import com.sap.sse.gwt.client.async.AsyncActionsExecutor;
|
||||||
@@ -24,7 +24,7 @@ import com.sap.sse.gwt.client.shared.perspective.ComponentContext;
|
|||||||
* @author Frank Mittag (c163874)
|
* @author Frank Mittag (c163874)
|
||||||
*/
|
*/
|
||||||
public class RegattaAnalyticsDataManager {
|
public class RegattaAnalyticsDataManager {
|
||||||
private LeaderboardPanel leaderboardPanel;
|
private ClassicLeaderboardPanel leaderboardPanel;
|
||||||
private MultiCompetitorLeaderboardChart multiCompetitorChart;
|
private MultiCompetitorLeaderboardChart multiCompetitorChart;
|
||||||
|
|
||||||
private final CompetitorSelectionModel competitorSelectionProvider;
|
private final CompetitorSelectionModel competitorSelectionProvider;
|
||||||
@@ -44,12 +44,12 @@ public class RegattaAnalyticsDataManager {
|
|||||||
this.multiCompetitorChart = null;
|
this.multiCompetitorChart = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LeaderboardPanel createLeaderboardPanel(Component<?> parent, ComponentContext<?> context,
|
public ClassicLeaderboardPanel createLeaderboardPanel(Component<?> parent, ComponentContext<?> context,
|
||||||
final LeaderboardSettings leaderboardSettings, final RegattaAndRaceIdentifier preselectedRace,
|
final LeaderboardSettings leaderboardSettings, final RegattaAndRaceIdentifier preselectedRace,
|
||||||
final String leaderboardGroupName, String leaderboardName, boolean showRaceDetails,
|
final String leaderboardGroupName, String leaderboardName, boolean showRaceDetails,
|
||||||
boolean autoExpandLastRaceColumn) {
|
boolean autoExpandLastRaceColumn) {
|
||||||
if (leaderboardPanel == null) {
|
if (leaderboardPanel == null) {
|
||||||
leaderboardPanel = new LeaderboardPanel(parent, context, sailingService,
|
leaderboardPanel = new ClassicLeaderboardPanel(parent, context, sailingService,
|
||||||
asyncActionsExecutor,
|
asyncActionsExecutor,
|
||||||
leaderboardSettings,
|
leaderboardSettings,
|
||||||
true, preselectedRace,
|
true, preselectedRace,
|
||||||
@@ -71,7 +71,7 @@ public class RegattaAnalyticsDataManager {
|
|||||||
return multiCompetitorChart;
|
return multiCompetitorChart;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LeaderboardPanel getLeaderboardPanel() {
|
public ClassicLeaderboardPanel getLeaderboardPanel() {
|
||||||
return leaderboardPanel;
|
return leaderboardPanel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -10,7 +10,7 @@ import com.sap.sailing.gwt.settings.client.leaderboard.LeaderboardUrlSettings;
|
|||||||
import com.sap.sailing.gwt.settings.client.utils.StorageDefinitionIdFactory;
|
import com.sap.sailing.gwt.settings.client.utils.StorageDefinitionIdFactory;
|
||||||
import com.sap.sailing.gwt.ui.client.LeaderboardUpdateListener;
|
import com.sap.sailing.gwt.ui.client.LeaderboardUpdateListener;
|
||||||
import com.sap.sailing.gwt.ui.client.StringMessages;
|
import com.sap.sailing.gwt.ui.client.StringMessages;
|
||||||
import com.sap.sailing.gwt.ui.leaderboard.LeaderboardPanel;
|
import com.sap.sailing.gwt.ui.leaderboard.ClassicLeaderboardPanel;
|
||||||
import com.sap.sse.gwt.client.mutationobserver.ElementSizeMutationObserver;
|
import com.sap.sse.gwt.client.mutationobserver.ElementSizeMutationObserver;
|
||||||
import com.sap.sse.gwt.client.mutationobserver.ElementSizeMutationObserver.DomMutationCallback;
|
import com.sap.sse.gwt.client.mutationobserver.ElementSizeMutationObserver.DomMutationCallback;
|
||||||
import com.sap.sse.gwt.client.shared.perspective.ComponentContext;
|
import com.sap.sse.gwt.client.shared.perspective.ComponentContext;
|
||||||
@@ -33,7 +33,7 @@ public abstract class SharedLeaderboardRegattaTabView<T extends AbstractEventReg
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void createSharedLeaderboardPanel(String leaderboardName, RegattaAnalyticsDataManager regattaAnalyticsManager, UserService userService,
|
public void createSharedLeaderboardPanel(String leaderboardName, RegattaAnalyticsDataManager regattaAnalyticsManager, UserService userService,
|
||||||
String placeToken, final Consumer<LeaderboardPanel> consumer) {
|
String placeToken, final Consumer<ClassicLeaderboardPanel> consumer) {
|
||||||
|
|
||||||
// FIXME remove
|
// FIXME remove
|
||||||
boolean autoExpandLastRaceColumn = GwtHttpRequestUtils.getBooleanParameter(
|
boolean autoExpandLastRaceColumn = GwtHttpRequestUtils.getBooleanParameter(
|
||||||
@@ -44,7 +44,7 @@ public abstract class SharedLeaderboardRegattaTabView<T extends AbstractEventReg
|
|||||||
componentContext.initInitialSettings(new DefaultOnSettingsLoadedCallback<LeaderboardSettings>() {
|
componentContext.initInitialSettings(new DefaultOnSettingsLoadedCallback<LeaderboardSettings>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(LeaderboardSettings leaderboardSettings) {
|
public void onSuccess(LeaderboardSettings leaderboardSettings) {
|
||||||
final LeaderboardPanel leaderboardPanel = regattaAnalyticsManager.createLeaderboardPanel(null, componentContext, //
|
final ClassicLeaderboardPanel leaderboardPanel = regattaAnalyticsManager.createLeaderboardPanel(null, componentContext, //
|
||||||
leaderboardSettings, //
|
leaderboardSettings, //
|
||||||
null, //
|
null, //
|
||||||
"leaderboardGroupName", // TODO: keep using magic string? ask frank!
|
"leaderboardGroupName", // TODO: keep using magic string? ask frank!
|
||||||
|
|||||||
+3
-3
@@ -29,7 +29,7 @@ import com.sap.sailing.gwt.ui.client.CompetitorSelectionChangeListener;
|
|||||||
import com.sap.sailing.gwt.ui.client.CompetitorSelectionModel;
|
import com.sap.sailing.gwt.ui.client.CompetitorSelectionModel;
|
||||||
import com.sap.sailing.gwt.ui.client.LeaderboardUpdateProvider;
|
import com.sap.sailing.gwt.ui.client.LeaderboardUpdateProvider;
|
||||||
import com.sap.sailing.gwt.ui.client.StringMessages;
|
import com.sap.sailing.gwt.ui.client.StringMessages;
|
||||||
import com.sap.sailing.gwt.ui.leaderboard.LeaderboardPanel;
|
import com.sap.sailing.gwt.ui.leaderboard.ClassicLeaderboardPanel;
|
||||||
import com.sap.sse.common.Util;
|
import com.sap.sse.common.Util;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -96,9 +96,9 @@ public class RegattaCompetitorAnalyticsTabView extends SharedLeaderboardRegattaT
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
if(regattaAnalyticsManager.getLeaderboardPanel() == null) {
|
if(regattaAnalyticsManager.getLeaderboardPanel() == null) {
|
||||||
createSharedLeaderboardPanel(leaderboardName, regattaAnalyticsManager, currentPresenter.getUserService(), null, new Consumer<LeaderboardPanel>() {
|
createSharedLeaderboardPanel(leaderboardName, regattaAnalyticsManager, currentPresenter.getUserService(), null, new Consumer<ClassicLeaderboardPanel>() {
|
||||||
@Override
|
@Override
|
||||||
public void consume(LeaderboardPanel object) {
|
public void consume(ClassicLeaderboardPanel object) {
|
||||||
callback.run();
|
callback.run();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
+4
-4
@@ -22,7 +22,7 @@ import com.sap.sailing.gwt.home.shared.partials.placeholder.InfoPlaceholder;
|
|||||||
import com.sap.sailing.gwt.settings.client.leaderboard.LeaderboardSettings;
|
import com.sap.sailing.gwt.settings.client.leaderboard.LeaderboardSettings;
|
||||||
import com.sap.sailing.gwt.ui.client.LeaderboardUpdateProvider;
|
import com.sap.sailing.gwt.ui.client.LeaderboardUpdateProvider;
|
||||||
import com.sap.sailing.gwt.ui.client.StringMessages;
|
import com.sap.sailing.gwt.ui.client.StringMessages;
|
||||||
import com.sap.sailing.gwt.ui.leaderboard.LeaderboardPanel;
|
import com.sap.sailing.gwt.ui.leaderboard.ClassicLeaderboardPanel;
|
||||||
import com.sap.sse.gwt.client.shared.perspective.DefaultOnSettingsLoadedCallback;
|
import com.sap.sse.gwt.client.shared.perspective.DefaultOnSettingsLoadedCallback;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -73,10 +73,10 @@ public class RegattaLeaderboardTabView extends SharedLeaderboardRegattaTabView<R
|
|||||||
if (regattaId != null && !regattaId.isEmpty()) {
|
if (regattaId != null && !regattaId.isEmpty()) {
|
||||||
String leaderboardName = regattaId;
|
String leaderboardName = regattaId;
|
||||||
RegattaAnalyticsDataManager regattaAnalyticsManager = currentPresenter.getCtx().getRegattaAnalyticsManager();
|
RegattaAnalyticsDataManager regattaAnalyticsManager = currentPresenter.getCtx().getRegattaAnalyticsManager();
|
||||||
LeaderboardPanel leaderboardPanel = regattaAnalyticsManager.getLeaderboardPanel();
|
ClassicLeaderboardPanel leaderboardPanel = regattaAnalyticsManager.getLeaderboardPanel();
|
||||||
final Consumer<LeaderboardPanel> leaderboardConsumer = new Consumer<LeaderboardPanel>() {
|
final Consumer<ClassicLeaderboardPanel> leaderboardConsumer = new Consumer<ClassicLeaderboardPanel>() {
|
||||||
@Override
|
@Override
|
||||||
public void consume(LeaderboardPanel leaderboardPanel) {
|
public void consume(ClassicLeaderboardPanel leaderboardPanel) {
|
||||||
leaderboardUpdateProvider = leaderboardPanel;
|
leaderboardUpdateProvider = leaderboardPanel;
|
||||||
leaderboardUpdateProvider.addLeaderboardUpdateListener(RegattaLeaderboardTabView.this);
|
leaderboardUpdateProvider.addLeaderboardUpdateListener(RegattaLeaderboardTabView.this);
|
||||||
initWidget(ourUiBinder.createAndBindUi(RegattaLeaderboardTabView.this));
|
initWidget(ourUiBinder.createAndBindUi(RegattaLeaderboardTabView.this));
|
||||||
|
|||||||
+5
-5
@@ -16,7 +16,7 @@ import com.sap.sailing.gwt.ui.client.DebugIdHelper;
|
|||||||
import com.sap.sailing.gwt.ui.client.SailingServiceAsync;
|
import com.sap.sailing.gwt.ui.client.SailingServiceAsync;
|
||||||
import com.sap.sailing.gwt.ui.client.StringMessages;
|
import com.sap.sailing.gwt.ui.client.StringMessages;
|
||||||
import com.sap.sailing.gwt.ui.client.shared.charts.MultiCompetitorLeaderboardChart;
|
import com.sap.sailing.gwt.ui.client.shared.charts.MultiCompetitorLeaderboardChart;
|
||||||
import com.sap.sailing.gwt.ui.leaderboard.LeaderboardPanel;
|
import com.sap.sailing.gwt.ui.leaderboard.ClassicLeaderboardPanel;
|
||||||
import com.sap.sailing.gwt.ui.leaderboard.MultiLeaderboardProxyPanel;
|
import com.sap.sailing.gwt.ui.leaderboard.MultiLeaderboardProxyPanel;
|
||||||
import com.sap.sse.common.Util;
|
import com.sap.sse.common.Util;
|
||||||
import com.sap.sse.common.settings.Settings;
|
import com.sap.sse.common.settings.Settings;
|
||||||
@@ -35,7 +35,7 @@ import com.sap.sse.gwt.client.shared.perspective.ComponentContext;
|
|||||||
* @author Axel Uhl (d043530)
|
* @author Axel Uhl (d043530)
|
||||||
*/
|
*/
|
||||||
public class EventSeriesAnalyticsDataManager {
|
public class EventSeriesAnalyticsDataManager {
|
||||||
private LeaderboardPanel overallLeaderboardPanel;
|
private ClassicLeaderboardPanel overallLeaderboardPanel;
|
||||||
private MultiCompetitorLeaderboardChart multiCompetitorChart;
|
private MultiCompetitorLeaderboardChart multiCompetitorChart;
|
||||||
private MultiLeaderboardProxyPanel multiLeaderboardPanel;
|
private MultiLeaderboardProxyPanel multiLeaderboardPanel;
|
||||||
|
|
||||||
@@ -57,12 +57,12 @@ public class EventSeriesAnalyticsDataManager {
|
|||||||
this.multiCompetitorChart = null;
|
this.multiCompetitorChart = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LeaderboardPanel createOverallLeaderboardPanel(Component<?> parent, ComponentContext<?> context,
|
public ClassicLeaderboardPanel createOverallLeaderboardPanel(Component<?> parent, ComponentContext<?> context,
|
||||||
final LeaderboardSettings leaderboardSettings, final RegattaAndRaceIdentifier preselectedRace,
|
final LeaderboardSettings leaderboardSettings, final RegattaAndRaceIdentifier preselectedRace,
|
||||||
final String leaderboardGroupName, String leaderboardName, boolean showRaceDetails,
|
final String leaderboardGroupName, String leaderboardName, boolean showRaceDetails,
|
||||||
boolean autoExpandLastRaceColumn) {
|
boolean autoExpandLastRaceColumn) {
|
||||||
if(overallLeaderboardPanel == null) {
|
if(overallLeaderboardPanel == null) {
|
||||||
overallLeaderboardPanel = new LeaderboardPanel(parent, context, sailingService, asyncActionsExecutor,
|
overallLeaderboardPanel = new ClassicLeaderboardPanel(parent, context, sailingService, asyncActionsExecutor,
|
||||||
leaderboardSettings, true, preselectedRace,
|
leaderboardSettings, true, preselectedRace,
|
||||||
competitorSelectionProvider, timer, leaderboardGroupName, leaderboardName, errorReporter,
|
competitorSelectionProvider, timer, leaderboardGroupName, leaderboardName, errorReporter,
|
||||||
StringMessages.INSTANCE, showRaceDetails, /* competitorSearchTextBox */ null,
|
StringMessages.INSTANCE, showRaceDetails, /* competitorSearchTextBox */ null,
|
||||||
@@ -103,7 +103,7 @@ public class EventSeriesAnalyticsDataManager {
|
|||||||
return multiLeaderboardPanel;
|
return multiLeaderboardPanel;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LeaderboardPanel getLeaderboardPanel() {
|
public ClassicLeaderboardPanel getLeaderboardPanel() {
|
||||||
return overallLeaderboardPanel;
|
return overallLeaderboardPanel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -10,7 +10,7 @@ import com.sap.sailing.gwt.settings.client.leaderboard.LeaderboardUrlSettings;
|
|||||||
import com.sap.sailing.gwt.settings.client.utils.StorageDefinitionIdFactory;
|
import com.sap.sailing.gwt.settings.client.utils.StorageDefinitionIdFactory;
|
||||||
import com.sap.sailing.gwt.ui.client.LeaderboardUpdateListener;
|
import com.sap.sailing.gwt.ui.client.LeaderboardUpdateListener;
|
||||||
import com.sap.sailing.gwt.ui.client.StringMessages;
|
import com.sap.sailing.gwt.ui.client.StringMessages;
|
||||||
import com.sap.sailing.gwt.ui.leaderboard.LeaderboardPanel;
|
import com.sap.sailing.gwt.ui.leaderboard.ClassicLeaderboardPanel;
|
||||||
import com.sap.sse.gwt.client.shared.perspective.ComponentContext;
|
import com.sap.sse.gwt.client.shared.perspective.ComponentContext;
|
||||||
import com.sap.sse.gwt.client.shared.perspective.ComponentContextWithSettingsStorage;
|
import com.sap.sse.gwt.client.shared.perspective.ComponentContextWithSettingsStorage;
|
||||||
import com.sap.sse.gwt.client.shared.perspective.DefaultOnSettingsLoadedCallback;
|
import com.sap.sse.gwt.client.shared.perspective.DefaultOnSettingsLoadedCallback;
|
||||||
@@ -31,7 +31,7 @@ public abstract class SharedLeaderboardEventSeriesTabView<T extends AbstractSeri
|
|||||||
|
|
||||||
protected void createSharedLeaderboardPanel(String leaderboardName,
|
protected void createSharedLeaderboardPanel(String leaderboardName,
|
||||||
EventSeriesAnalyticsDataManager eventSeriesAnalyticsManager, UserService userService,
|
EventSeriesAnalyticsDataManager eventSeriesAnalyticsManager, UserService userService,
|
||||||
String placeToken, final Consumer<LeaderboardPanel> consumer) {
|
String placeToken, final Consumer<ClassicLeaderboardPanel> consumer) {
|
||||||
|
|
||||||
// FIXME remove
|
// FIXME remove
|
||||||
boolean autoExpandLastRaceColumn = GwtHttpRequestUtils
|
boolean autoExpandLastRaceColumn = GwtHttpRequestUtils
|
||||||
@@ -42,7 +42,7 @@ public abstract class SharedLeaderboardEventSeriesTabView<T extends AbstractSeri
|
|||||||
componentContext.initInitialSettings(new DefaultOnSettingsLoadedCallback<LeaderboardSettings>() {
|
componentContext.initInitialSettings(new DefaultOnSettingsLoadedCallback<LeaderboardSettings>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(LeaderboardSettings leaderboardSettings) {
|
public void onSuccess(LeaderboardSettings leaderboardSettings) {
|
||||||
LeaderboardPanel leaderboardPanel = eventSeriesAnalyticsManager.createOverallLeaderboardPanel(null,
|
ClassicLeaderboardPanel leaderboardPanel = eventSeriesAnalyticsManager.createOverallLeaderboardPanel(null,
|
||||||
componentContext, leaderboardSettings, null, "leaderboardGroupName",
|
componentContext, leaderboardSettings, null, "leaderboardGroupName",
|
||||||
leaderboardName, true, // this information came from place, now hard coded. check with frank
|
leaderboardName, true, // this information came from place, now hard coded. check with frank
|
||||||
autoExpandLastRaceColumn);
|
autoExpandLastRaceColumn);
|
||||||
|
|||||||
+3
-3
@@ -25,7 +25,7 @@ import com.sap.sailing.gwt.home.desktop.places.fakeseries.SharedLeaderboardEvent
|
|||||||
import com.sap.sailing.gwt.home.shared.ExperimentalFeatures;
|
import com.sap.sailing.gwt.home.shared.ExperimentalFeatures;
|
||||||
import com.sap.sailing.gwt.ui.client.CompetitorSelectionChangeListener;
|
import com.sap.sailing.gwt.ui.client.CompetitorSelectionChangeListener;
|
||||||
import com.sap.sailing.gwt.ui.client.CompetitorSelectionModel;
|
import com.sap.sailing.gwt.ui.client.CompetitorSelectionModel;
|
||||||
import com.sap.sailing.gwt.ui.leaderboard.LeaderboardPanel;
|
import com.sap.sailing.gwt.ui.leaderboard.ClassicLeaderboardPanel;
|
||||||
import com.sap.sse.common.Util;
|
import com.sap.sse.common.Util;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -78,9 +78,9 @@ public class EventSeriesCompetitorAnalyticsTabView extends SharedLeaderboardEven
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
if(eventSeriesAnalyticsManager.getLeaderboardPanel() == null) {
|
if(eventSeriesAnalyticsManager.getLeaderboardPanel() == null) {
|
||||||
createSharedLeaderboardPanel(leaderboardName, eventSeriesAnalyticsManager, currentPresenter.getUserService(), null, new Consumer<LeaderboardPanel>() {
|
createSharedLeaderboardPanel(leaderboardName, eventSeriesAnalyticsManager, currentPresenter.getUserService(), null, new Consumer<ClassicLeaderboardPanel>() {
|
||||||
@Override
|
@Override
|
||||||
public void consume(LeaderboardPanel object) {
|
public void consume(ClassicLeaderboardPanel object) {
|
||||||
callback.run();
|
callback.run();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
+4
-4
@@ -17,7 +17,7 @@ import com.sap.sailing.gwt.home.desktop.places.fakeseries.EventSeriesAnalyticsDa
|
|||||||
import com.sap.sailing.gwt.home.desktop.places.fakeseries.SeriesView;
|
import com.sap.sailing.gwt.home.desktop.places.fakeseries.SeriesView;
|
||||||
import com.sap.sailing.gwt.home.desktop.places.fakeseries.SharedLeaderboardEventSeriesTabView;
|
import com.sap.sailing.gwt.home.desktop.places.fakeseries.SharedLeaderboardEventSeriesTabView;
|
||||||
import com.sap.sailing.gwt.settings.client.leaderboard.LeaderboardSettings;
|
import com.sap.sailing.gwt.settings.client.leaderboard.LeaderboardSettings;
|
||||||
import com.sap.sailing.gwt.ui.leaderboard.LeaderboardPanel;
|
import com.sap.sailing.gwt.ui.leaderboard.ClassicLeaderboardPanel;
|
||||||
import com.sap.sse.gwt.client.shared.perspective.DefaultOnSettingsLoadedCallback;
|
import com.sap.sse.gwt.client.shared.perspective.DefaultOnSettingsLoadedCallback;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -61,9 +61,9 @@ public class EventSeriesOverallLeaderboardTabView extends SharedLeaderboardEvent
|
|||||||
String leaderboardName = currentPresenter.getSeriesDTO().getLeaderboardId();
|
String leaderboardName = currentPresenter.getSeriesDTO().getLeaderboardId();
|
||||||
if (leaderboardName != null && !leaderboardName.isEmpty()) {
|
if (leaderboardName != null && !leaderboardName.isEmpty()) {
|
||||||
EventSeriesAnalyticsDataManager eventSeriesAnalyticsManager = currentPresenter.getCtx().getAnalyticsManager();
|
EventSeriesAnalyticsDataManager eventSeriesAnalyticsManager = currentPresenter.getCtx().getAnalyticsManager();
|
||||||
final Consumer<LeaderboardPanel> leaderboardConsumer = new Consumer<LeaderboardPanel>() {
|
final Consumer<ClassicLeaderboardPanel> leaderboardConsumer = new Consumer<ClassicLeaderboardPanel>() {
|
||||||
@Override
|
@Override
|
||||||
public void consume(LeaderboardPanel leaderboardPanel) {
|
public void consume(ClassicLeaderboardPanel leaderboardPanel) {
|
||||||
initWidget(ourUiBinder.createAndBindUi(EventSeriesOverallLeaderboardTabView.this));
|
initWidget(ourUiBinder.createAndBindUi(EventSeriesOverallLeaderboardTabView.this));
|
||||||
leaderboard.setLeaderboard(leaderboardPanel, currentPresenter.getAutoRefreshTimer());
|
leaderboard.setLeaderboard(leaderboardPanel, currentPresenter.getAutoRefreshTimer());
|
||||||
eventSeriesAnalyticsManager.hideCompetitorChart();
|
eventSeriesAnalyticsManager.hideCompetitorChart();
|
||||||
@@ -73,7 +73,7 @@ public class EventSeriesOverallLeaderboardTabView extends SharedLeaderboardEvent
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
LeaderboardPanel leaderboardPanel = eventSeriesAnalyticsManager.getLeaderboardPanel();
|
ClassicLeaderboardPanel leaderboardPanel = eventSeriesAnalyticsManager.getLeaderboardPanel();
|
||||||
if(leaderboardPanel == null) {
|
if(leaderboardPanel == null) {
|
||||||
createSharedLeaderboardPanel(leaderboardName, eventSeriesAnalyticsManager, currentPresenter.getUserService(), /*FIXME placeToken */ null, leaderboardConsumer);
|
createSharedLeaderboardPanel(leaderboardName, eventSeriesAnalyticsManager, currentPresenter.getUserService(), /*FIXME placeToken */ null, leaderboardConsumer);
|
||||||
} else if( /*FIXME placeToken not empty */ false) {
|
} else if( /*FIXME placeToken not empty */ false) {
|
||||||
|
|||||||
+2
-2
@@ -27,7 +27,7 @@ import com.sap.sailing.gwt.settings.client.utils.StorageDefinitionIdFactory;
|
|||||||
import com.sap.sailing.gwt.ui.client.CompetitorSelectionModel;
|
import com.sap.sailing.gwt.ui.client.CompetitorSelectionModel;
|
||||||
import com.sap.sailing.gwt.ui.client.SailingServiceAsync;
|
import com.sap.sailing.gwt.ui.client.SailingServiceAsync;
|
||||||
import com.sap.sailing.gwt.ui.client.StringMessages;
|
import com.sap.sailing.gwt.ui.client.StringMessages;
|
||||||
import com.sap.sailing.gwt.ui.leaderboard.LeaderboardPanel;
|
import com.sap.sailing.gwt.ui.leaderboard.ClassicLeaderboardPanel;
|
||||||
import com.sap.sailing.gwt.ui.shared.EventDTO;
|
import com.sap.sailing.gwt.ui.shared.EventDTO;
|
||||||
import com.sap.sailing.gwt.ui.shared.RaceGroupDTO;
|
import com.sap.sailing.gwt.ui.shared.RaceGroupDTO;
|
||||||
import com.sap.sailing.gwt.ui.shared.StrippedLeaderboardDTO;
|
import com.sap.sailing.gwt.ui.shared.StrippedLeaderboardDTO;
|
||||||
@@ -268,7 +268,7 @@ public class RegattaOverviewPanel extends SimplePanel {
|
|||||||
public void onSuccess(List<StrippedLeaderboardDTO> result) {
|
public void onSuccess(List<StrippedLeaderboardDTO> result) {
|
||||||
leaderboardsTabPanel.clear();
|
leaderboardsTabPanel.clear();
|
||||||
for (StrippedLeaderboardDTO leaderboard : result) {
|
for (StrippedLeaderboardDTO leaderboard : result) {
|
||||||
LeaderboardPanel leaderboardPanel = new LeaderboardPanel(null, null, sailingService,
|
ClassicLeaderboardPanel leaderboardPanel = new ClassicLeaderboardPanel(null, null, sailingService,
|
||||||
new AsyncActionsExecutor(), leaderboardSettings, false,
|
new AsyncActionsExecutor(), leaderboardSettings, false,
|
||||||
/*preSelectedRace*/null,
|
/*preSelectedRace*/null,
|
||||||
competitorSelectionProvider,
|
competitorSelectionProvider,
|
||||||
|
|||||||
+6
-6
@@ -8,7 +8,7 @@ import com.sap.sailing.domain.common.DetailType;
|
|||||||
import com.sap.sailing.gwt.settings.client.settingtypes.converter.DetailTypeStringToEnumConverter;
|
import com.sap.sailing.gwt.settings.client.settingtypes.converter.DetailTypeStringToEnumConverter;
|
||||||
import com.sap.sailing.gwt.settings.client.settingtypes.converter.RaceColumnSelectionStrategiesStringToEnumConverter;
|
import com.sap.sailing.gwt.settings.client.settingtypes.converter.RaceColumnSelectionStrategiesStringToEnumConverter;
|
||||||
import com.sap.sailing.gwt.ui.leaderboard.LeaderboardEntryPoint;
|
import com.sap.sailing.gwt.ui.leaderboard.LeaderboardEntryPoint;
|
||||||
import com.sap.sailing.gwt.ui.leaderboard.LeaderboardPanel;
|
import com.sap.sailing.gwt.ui.leaderboard.ClassicLeaderboardPanel;
|
||||||
import com.sap.sse.common.Util;
|
import com.sap.sse.common.Util;
|
||||||
import com.sap.sse.common.settings.generic.AbstractGenericSerializableSettings;
|
import com.sap.sse.common.settings.generic.AbstractGenericSerializableSettings;
|
||||||
import com.sap.sse.common.settings.generic.BooleanSetting;
|
import com.sap.sse.common.settings.generic.BooleanSetting;
|
||||||
@@ -20,7 +20,7 @@ import com.sap.sse.common.settings.generic.StringListSetting;
|
|||||||
import com.sap.sse.common.settings.generic.StringSetting;
|
import com.sap.sse.common.settings.generic.StringSetting;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Settings for the {@link LeaderboardPanel} component. If you change here, please also visit
|
* Settings for the {@link ClassicLeaderboardPanel} component. If you change here, please also visit
|
||||||
* {@link LeaderboardSettingsDialogComponent} to make the setting editable, and edit {@link LeaderboardUrlSettings}
|
* {@link LeaderboardSettingsDialogComponent} to make the setting editable, and edit {@link LeaderboardUrlSettings}
|
||||||
* for URL generation and parsing.
|
* for URL generation and parsing.
|
||||||
*
|
*
|
||||||
@@ -216,7 +216,7 @@ public class LeaderboardSettings extends AbstractGenericSerializableSettings {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* If <code>null</code>, this is to mean that the race columns should not be modified by
|
* If <code>null</code>, this is to mean that the race columns should not be modified by
|
||||||
* {@link LeaderboardPanel#updateSettings(LeaderboardSettings)}. Otherwise a
|
* {@link ClassicLeaderboardPanel#updateSettings(LeaderboardSettings)}. Otherwise a
|
||||||
* live collection that reflects the current state of the settings of a leaderboard panel
|
* live collection that reflects the current state of the settings of a leaderboard panel
|
||||||
*/
|
*/
|
||||||
public List<String> getNamesOfRaceColumnsToShow() {
|
public List<String> getNamesOfRaceColumnsToShow() {
|
||||||
@@ -225,7 +225,7 @@ public class LeaderboardSettings extends AbstractGenericSerializableSettings {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* If <code>null</code>, this is to mean that the race columns should not be modified by
|
* If <code>null</code>, this is to mean that the race columns should not be modified by
|
||||||
* {@link LeaderboardPanel#updateSettings(LeaderboardSettings)}. Otherwise
|
* {@link ClassicLeaderboardPanel#updateSettings(LeaderboardSettings)}. Otherwise
|
||||||
* a live collection that reflects the current state of the settings of a leaderboard panel
|
* a live collection that reflects the current state of the settings of a leaderboard panel
|
||||||
*/
|
*/
|
||||||
public List<String> getNamesOfRacesToShow() {
|
public List<String> getNamesOfRacesToShow() {
|
||||||
@@ -234,7 +234,7 @@ public class LeaderboardSettings extends AbstractGenericSerializableSettings {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* If <code>null</code>, this is to mean that the race columns should not be modified by
|
* If <code>null</code>, this is to mean that the race columns should not be modified by
|
||||||
* {@link LeaderboardPanel#updateSettings(LeaderboardSettings)}.
|
* {@link ClassicLeaderboardPanel#updateSettings(LeaderboardSettings)}.
|
||||||
*/
|
*/
|
||||||
public Integer getNumberOfLastRacesToShow() {
|
public Integer getNumberOfLastRacesToShow() {
|
||||||
return activeRaceColumnSelectionStrategy.getValue() == RaceColumnSelectionStrategies.LAST_N ? numberOfLastRacesToShow.getValue() : null;
|
return activeRaceColumnSelectionStrategy.getValue() == RaceColumnSelectionStrategies.LAST_N ? numberOfLastRacesToShow.getValue() : null;
|
||||||
@@ -246,7 +246,7 @@ public class LeaderboardSettings extends AbstractGenericSerializableSettings {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return if <code>null</code>, leave refresh interval alone (don't change in
|
* @return if <code>null</code>, leave refresh interval alone (don't change in
|
||||||
* {@link LeaderboardPanel#updateSettings(LeaderboardSettings)}
|
* {@link ClassicLeaderboardPanel#updateSettings(LeaderboardSettings)}
|
||||||
*/
|
*/
|
||||||
public Long getDelayBetweenAutoAdvancesInMilliseconds() {
|
public Long getDelayBetweenAutoAdvancesInMilliseconds() {
|
||||||
return delayBetweenAutoAdvancesInMilliseconds.getValue();
|
return delayBetweenAutoAdvancesInMilliseconds.getValue();
|
||||||
|
|||||||
+4
-4
@@ -27,7 +27,7 @@ import com.sap.sailing.gwt.ui.client.StringMessages;
|
|||||||
import com.sap.sailing.gwt.ui.leaderboard.LeaderboardEntryPoint;
|
import com.sap.sailing.gwt.ui.leaderboard.LeaderboardEntryPoint;
|
||||||
import com.sap.sailing.gwt.ui.leaderboard.LegColumn;
|
import com.sap.sailing.gwt.ui.leaderboard.LegColumn;
|
||||||
import com.sap.sailing.gwt.ui.leaderboard.ManeuverCountRaceColumn;
|
import com.sap.sailing.gwt.ui.leaderboard.ManeuverCountRaceColumn;
|
||||||
import com.sap.sailing.gwt.ui.leaderboard.UnStyledLeaderboardPanel;
|
import com.sap.sailing.gwt.ui.leaderboard.LeaderboardPanel;
|
||||||
import com.sap.sse.common.Util;
|
import com.sap.sse.common.Util;
|
||||||
import com.sap.sse.gwt.client.controls.IntegerBox;
|
import com.sap.sse.gwt.client.controls.IntegerBox;
|
||||||
import com.sap.sse.gwt.client.dialog.DataEntryDialog;
|
import com.sap.sse.gwt.client.dialog.DataEntryDialog;
|
||||||
@@ -134,7 +134,7 @@ public class LeaderboardSettingsDialogComponent implements SettingsDialogCompone
|
|||||||
int detailCountInCurrentFlowPanel = 0;
|
int detailCountInCurrentFlowPanel = 0;
|
||||||
List<DetailType> currentRaceDetailSelection = initialSettings.getRaceDetailsToShow();
|
List<DetailType> currentRaceDetailSelection = initialSettings.getRaceDetailsToShow();
|
||||||
FlowPanel raceDetailDialogContent = null;
|
FlowPanel raceDetailDialogContent = null;
|
||||||
for (DetailType type : UnStyledLeaderboardPanel.getAvailableRaceDetailColumnTypes()) {
|
for (DetailType type : LeaderboardPanel.getAvailableRaceDetailColumnTypes()) {
|
||||||
if (detailCountInCurrentFlowPanel % 8 == 0) {
|
if (detailCountInCurrentFlowPanel % 8 == 0) {
|
||||||
raceDetailDialogContent = new FlowPanel();
|
raceDetailDialogContent = new FlowPanel();
|
||||||
raceDetailDialogContent.addStyleName("dialogInnerContent");
|
raceDetailDialogContent.addStyleName("dialogInnerContent");
|
||||||
@@ -168,7 +168,7 @@ public class LeaderboardSettingsDialogComponent implements SettingsDialogCompone
|
|||||||
int detailCountInCurrentFlowPanel = 0;
|
int detailCountInCurrentFlowPanel = 0;
|
||||||
List<DetailType> currentRaceDetailSelection = initialSettings.getRaceDetailsToShow();
|
List<DetailType> currentRaceDetailSelection = initialSettings.getRaceDetailsToShow();
|
||||||
FlowPanel raceStartAnalysisDialogContent = null;
|
FlowPanel raceStartAnalysisDialogContent = null;
|
||||||
for (DetailType type : UnStyledLeaderboardPanel.getAvailableRaceStartAnalysisColumnTypes()) {
|
for (DetailType type : LeaderboardPanel.getAvailableRaceStartAnalysisColumnTypes()) {
|
||||||
if (detailCountInCurrentFlowPanel % 8 == 0) {
|
if (detailCountInCurrentFlowPanel % 8 == 0) {
|
||||||
raceStartAnalysisDialogContent = new FlowPanel();
|
raceStartAnalysisDialogContent = new FlowPanel();
|
||||||
raceStartAnalysisDialogContent.addStyleName("dialogInnerContent");
|
raceStartAnalysisDialogContent.addStyleName("dialogInnerContent");
|
||||||
@@ -190,7 +190,7 @@ public class LeaderboardSettingsDialogComponent implements SettingsDialogCompone
|
|||||||
FlowPanel overallDetailDialogContent = new FlowPanel();
|
FlowPanel overallDetailDialogContent = new FlowPanel();
|
||||||
overallDetailDialogContent.addStyleName("dialogInnerContent");
|
overallDetailDialogContent.addStyleName("dialogInnerContent");
|
||||||
List<DetailType> currentOverallDetailSelection = initialSettings.getOverallDetailsToShow();
|
List<DetailType> currentOverallDetailSelection = initialSettings.getOverallDetailsToShow();
|
||||||
for (DetailType type : UnStyledLeaderboardPanel.getAvailableOverallDetailColumnTypes()) {
|
for (DetailType type : LeaderboardPanel.getAvailableOverallDetailColumnTypes()) {
|
||||||
CheckBox checkbox = createAndRegisterCheckbox(dialog, type, currentOverallDetailSelection.contains(type),
|
CheckBox checkbox = createAndRegisterCheckbox(dialog, type, currentOverallDetailSelection.contains(type),
|
||||||
overallDetailCheckboxes);
|
overallDetailCheckboxes);
|
||||||
overallDetailDialogContent.add(checkbox);
|
overallDetailDialogContent.add(checkbox);
|
||||||
|
|||||||
+3
-3
@@ -6,7 +6,7 @@ import java.util.List;
|
|||||||
|
|
||||||
import com.sap.sailing.domain.common.DetailType;
|
import com.sap.sailing.domain.common.DetailType;
|
||||||
import com.sap.sailing.gwt.settings.client.leaderboard.LeaderboardSettings.RaceColumnSelectionStrategies;
|
import com.sap.sailing.gwt.settings.client.leaderboard.LeaderboardSettings.RaceColumnSelectionStrategies;
|
||||||
import com.sap.sailing.gwt.ui.leaderboard.LeaderboardPanel;
|
import com.sap.sailing.gwt.ui.leaderboard.ClassicLeaderboardPanel;
|
||||||
import com.sap.sse.common.Util;
|
import com.sap.sse.common.Util;
|
||||||
import com.sap.sse.gwt.client.player.Timer.PlayModes;
|
import com.sap.sse.gwt.client.player.Timer.PlayModes;
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@ public class LeaderboardSettingsFactory {
|
|||||||
* if <code>null</code>, don't sort any race column
|
* if <code>null</code>, don't sort any race column
|
||||||
* @param nameOfRaceColumnToShow
|
* @param nameOfRaceColumnToShow
|
||||||
* if <code>null</code>, the settings returned will cause the list of race columns shown to remain
|
* if <code>null</code>, the settings returned will cause the list of race columns shown to remain
|
||||||
* unchanged during {@link LeaderboardPanel#updateSettings(LeaderboardSettings)}; otherwise, the settings
|
* unchanged during {@link ClassicLeaderboardPanel#updateSettings(LeaderboardSettings)}; otherwise, the settings
|
||||||
* will show the single race column identified by this argument
|
* will show the single race column identified by this argument
|
||||||
* @param nameOfRaceToShow
|
* @param nameOfRaceToShow
|
||||||
* alternatively to <code>nameOfRaceColumnToShow</code>, this argument may be used in case the race name
|
* alternatively to <code>nameOfRaceColumnToShow</code>, this argument may be used in case the race name
|
||||||
@@ -110,7 +110,7 @@ public class LeaderboardSettingsFactory {
|
|||||||
/**
|
/**
|
||||||
* @param namesOfRaceColumnsToShow
|
* @param namesOfRaceColumnsToShow
|
||||||
* if <code>null</code>, create settings which leave the list of races to show unchanged when applied
|
* if <code>null</code>, create settings which leave the list of races to show unchanged when applied
|
||||||
* using {@link LeaderboardPanel#updateSettings(LeaderboardSettings)}; otherwise, the list of names of
|
* using {@link ClassicLeaderboardPanel#updateSettings(LeaderboardSettings)}; otherwise, the list of names of
|
||||||
* the race columns (not their races!) that will be shown, so that, e.g., an empty list causes no race
|
* the race columns (not their races!) that will be shown, so that, e.g., an empty list causes no race
|
||||||
* columns to be shown
|
* columns to be shown
|
||||||
* @param namesOfRacesToShow
|
* @param namesOfRacesToShow
|
||||||
|
|||||||
+2
-2
@@ -3,13 +3,13 @@ package com.sap.sailing.gwt.ui.client;
|
|||||||
import com.sap.sailing.domain.common.RaceIdentifier;
|
import com.sap.sailing.domain.common.RaceIdentifier;
|
||||||
import com.sap.sailing.domain.common.dto.LeaderboardDTO;
|
import com.sap.sailing.domain.common.dto.LeaderboardDTO;
|
||||||
import com.sap.sailing.domain.common.dto.RaceColumnDTO;
|
import com.sap.sailing.domain.common.dto.RaceColumnDTO;
|
||||||
import com.sap.sailing.gwt.ui.leaderboard.LeaderboardPanel;
|
import com.sap.sailing.gwt.ui.leaderboard.ClassicLeaderboardPanel;
|
||||||
import com.sap.sailing.gwt.ui.raceboard.RaceBoardPanel;
|
import com.sap.sailing.gwt.ui.raceboard.RaceBoardPanel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Listener interface that gets information about refresh of leaderboard.
|
* Listener interface that gets information about refresh of leaderboard.
|
||||||
* Currently implemented by {@link RaceBoardPanel} and triggered by
|
* Currently implemented by {@link RaceBoardPanel} and triggered by
|
||||||
* {@link LeaderboardPanel}.
|
* {@link ClassicLeaderboardPanel}.
|
||||||
*
|
*
|
||||||
* @author Simon Marcel Pamies
|
* @author Simon Marcel Pamies
|
||||||
*/
|
*/
|
||||||
|
|||||||
+3
-3
@@ -87,7 +87,7 @@ import com.sap.sailing.gwt.ui.client.shared.racemap.BoundsUtil;
|
|||||||
import com.sap.sailing.gwt.ui.client.shared.racemap.CourseMarkOverlay;
|
import com.sap.sailing.gwt.ui.client.shared.racemap.CourseMarkOverlay;
|
||||||
import com.sap.sailing.gwt.ui.client.shared.racemap.FixOverlay;
|
import com.sap.sailing.gwt.ui.client.shared.racemap.FixOverlay;
|
||||||
import com.sap.sailing.gwt.ui.client.shared.racemap.RaceMap;
|
import com.sap.sailing.gwt.ui.client.shared.racemap.RaceMap;
|
||||||
import com.sap.sailing.gwt.ui.leaderboard.LeaderboardPanel;
|
import com.sap.sailing.gwt.ui.leaderboard.ClassicLeaderboardPanel;
|
||||||
import com.sap.sailing.gwt.ui.raceboard.SideBySideComponentViewer;
|
import com.sap.sailing.gwt.ui.raceboard.SideBySideComponentViewer;
|
||||||
import com.sap.sailing.gwt.ui.shared.GPSFixDTO;
|
import com.sap.sailing.gwt.ui.shared.GPSFixDTO;
|
||||||
import com.sap.sailing.gwt.ui.shared.GPSFixDTOWithSpeedWindTackAndLegType;
|
import com.sap.sailing.gwt.ui.shared.GPSFixDTOWithSpeedWindTackAndLegType;
|
||||||
@@ -108,7 +108,7 @@ import com.sap.sse.gwt.client.shared.perspective.ComponentContext;
|
|||||||
public class EditMarkPositionPanel extends AbstractRaceChart<AbstractSettings> implements RequiresResize, SelectionChangeEvent.Handler {
|
public class EditMarkPositionPanel extends AbstractRaceChart<AbstractSettings> implements RequiresResize, SelectionChangeEvent.Handler {
|
||||||
protected static final int FIX_OVERLAY_Z_ORDER = 230;
|
protected static final int FIX_OVERLAY_Z_ORDER = 230;
|
||||||
private final RaceMap raceMap;
|
private final RaceMap raceMap;
|
||||||
private final LeaderboardPanel leaderboardPanel;
|
private final ClassicLeaderboardPanel leaderboardPanel;
|
||||||
private final MarksPanel marksPanel;
|
private final MarksPanel marksPanel;
|
||||||
private Series markSeries;
|
private Series markSeries;
|
||||||
private LinePlotOptions markSeriesPlotOptions;
|
private LinePlotOptions markSeriesPlotOptions;
|
||||||
@@ -134,7 +134,7 @@ public class EditMarkPositionPanel extends AbstractRaceChart<AbstractSettings> i
|
|||||||
private final RaceIdentifierToLeaderboardRaceColumnAndFleetMapper raceIdentifierToLeaderboardRaceColumnAndFleetMapper;
|
private final RaceIdentifierToLeaderboardRaceColumnAndFleetMapper raceIdentifierToLeaderboardRaceColumnAndFleetMapper;
|
||||||
|
|
||||||
public EditMarkPositionPanel(Component<?> parent, ComponentContext<?> context, final RaceMap raceMap,
|
public EditMarkPositionPanel(Component<?> parent, ComponentContext<?> context, final RaceMap raceMap,
|
||||||
final LeaderboardPanel leaderboardPanel,
|
final ClassicLeaderboardPanel leaderboardPanel,
|
||||||
RegattaAndRaceIdentifier selectedRaceIdentifier, String leaderboardName, final StringMessages stringMessages,
|
RegattaAndRaceIdentifier selectedRaceIdentifier, String leaderboardName, final StringMessages stringMessages,
|
||||||
SailingServiceAsync sailingService, Timer timer, TimeRangeWithZoomProvider timeRangeWithZoomProvider,
|
SailingServiceAsync sailingService, Timer timer, TimeRangeWithZoomProvider timeRangeWithZoomProvider,
|
||||||
AsyncActionsExecutor asyncActionsExecutor, ErrorReporter errorReporter) {
|
AsyncActionsExecutor asyncActionsExecutor, ErrorReporter errorReporter) {
|
||||||
|
|||||||
+3
-3
@@ -35,7 +35,7 @@ public abstract class AbstractLeaderboardViewer<PL extends AbstractLeaderboardPe
|
|||||||
|
|
||||||
protected static final ViewerToolbar RES = GWT.create(ViewerToolbar.class);
|
protected static final ViewerToolbar RES = GWT.create(ViewerToolbar.class);
|
||||||
protected final StringMessages stringMessages;
|
protected final StringMessages stringMessages;
|
||||||
private LeaderboardPanel leaderboardPanel;
|
private ClassicLeaderboardPanel leaderboardPanel;
|
||||||
protected final CompetitorSelectionModel competitorSelectionProvider;
|
protected final CompetitorSelectionModel competitorSelectionProvider;
|
||||||
protected final AsyncActionsExecutor asyncActionsExecutor;
|
protected final AsyncActionsExecutor asyncActionsExecutor;
|
||||||
|
|
||||||
@@ -63,12 +63,12 @@ public abstract class AbstractLeaderboardViewer<PL extends AbstractLeaderboardPe
|
|||||||
RES.css().ensureInjected();
|
RES.css().ensureInjected();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void init(LeaderboardPanel leaderboardPanel) {
|
protected void init(ClassicLeaderboardPanel leaderboardPanel) {
|
||||||
addChildComponent(leaderboardPanel);
|
addChildComponent(leaderboardPanel);
|
||||||
this.leaderboardPanel = leaderboardPanel;
|
this.leaderboardPanel = leaderboardPanel;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LeaderboardPanel getLeaderboardPanel() {
|
public ClassicLeaderboardPanel getLeaderboardPanel() {
|
||||||
return leaderboardPanel;
|
return leaderboardPanel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+58
@@ -0,0 +1,58 @@
|
|||||||
|
package com.sap.sailing.gwt.ui.leaderboard;
|
||||||
|
|
||||||
|
import com.google.gwt.core.client.GWT;
|
||||||
|
import com.sap.sailing.domain.common.RegattaAndRaceIdentifier;
|
||||||
|
import com.sap.sailing.gwt.settings.client.leaderboard.LeaderboardSettings;
|
||||||
|
import com.sap.sailing.gwt.ui.client.CompetitorSelectionProvider;
|
||||||
|
import com.sap.sailing.gwt.ui.client.RaceTimesInfoProvider;
|
||||||
|
import com.sap.sailing.gwt.ui.client.SailingServiceAsync;
|
||||||
|
import com.sap.sailing.gwt.ui.client.StringMessages;
|
||||||
|
import com.sap.sse.gwt.client.ErrorReporter;
|
||||||
|
import com.sap.sse.gwt.client.async.AsyncActionsExecutor;
|
||||||
|
import com.sap.sse.gwt.client.player.Timer;
|
||||||
|
import com.sap.sse.gwt.client.shared.components.Component;
|
||||||
|
import com.sap.sse.gwt.client.shared.components.ComponentResources;
|
||||||
|
import com.sap.sse.gwt.client.shared.perspective.ComponentContext;
|
||||||
|
|
||||||
|
|
||||||
|
public class ClassicLeaderboardPanel extends LeaderboardPanel {
|
||||||
|
|
||||||
|
private static final LeaderboardResources resources = GWT.create(LeaderboardResources.class);
|
||||||
|
private static final ComponentResources componentResources = GWT.create(ComponentResources.class);
|
||||||
|
private static final LeaderboardTableResources tableResources = GWT.create(LeaderboardTableResources.class);
|
||||||
|
|
||||||
|
public ClassicLeaderboardPanel(Component<?> parent, ComponentContext<?> context, SailingServiceAsync sailingService,
|
||||||
|
AsyncActionsExecutor asyncActionsExecutor, LeaderboardSettings settings, boolean isEmbedded,
|
||||||
|
RegattaAndRaceIdentifier preSelectedRace, CompetitorSelectionProvider competitorSelectionProvider,
|
||||||
|
String leaderboardGroupName, String leaderboardName, ErrorReporter errorReporter,
|
||||||
|
StringMessages stringMessages, boolean showRaceDetails) {
|
||||||
|
super(parent, context, sailingService, asyncActionsExecutor, settings, isEmbedded, preSelectedRace,
|
||||||
|
competitorSelectionProvider, leaderboardGroupName, leaderboardName, errorReporter, stringMessages,
|
||||||
|
showRaceDetails, resources, componentResources, tableResources);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ClassicLeaderboardPanel(Component<?> parent, ComponentContext<?> context, SailingServiceAsync sailingService,
|
||||||
|
AsyncActionsExecutor asyncActionsExecutor, LeaderboardSettings settings, boolean isEmbedded,
|
||||||
|
RegattaAndRaceIdentifier preSelectedRace, CompetitorSelectionProvider competitorSelectionProvider,
|
||||||
|
Timer timer, String leaderboardGroupName, String leaderboardName, ErrorReporter errorReporter,
|
||||||
|
StringMessages stringMessages, boolean showRaceDetails, CompetitorFilterPanel competitorSearchTextBox,
|
||||||
|
boolean showSelectionCheckbox, RaceTimesInfoProvider optionalRaceTimesInfoProvider,
|
||||||
|
boolean autoExpandLastRaceColumn, boolean adjustTimerDelay, boolean autoApplyTopNFilter,
|
||||||
|
boolean showCompetitorFilterStatus, boolean enableSyncScroller) {
|
||||||
|
super(parent, context, sailingService, asyncActionsExecutor, settings, isEmbedded, preSelectedRace,
|
||||||
|
competitorSelectionProvider, timer, leaderboardGroupName, leaderboardName, errorReporter,
|
||||||
|
stringMessages, showRaceDetails, competitorSearchTextBox, showSelectionCheckbox,
|
||||||
|
optionalRaceTimesInfoProvider, autoExpandLastRaceColumn, adjustTimerDelay, autoApplyTopNFilter,
|
||||||
|
showCompetitorFilterStatus, enableSyncScroller, resources, componentResources, tableResources);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ClassicLeaderboardPanel(Component<?> parent, ComponentContext<?> context, SailingServiceAsync sailingService,
|
||||||
|
AsyncActionsExecutor asyncActionsExecutor, LeaderboardSettings settings,
|
||||||
|
CompetitorSelectionProvider competitorSelectionProvider, String leaderboardName,
|
||||||
|
ErrorReporter errorReporter, StringMessages stringMessages, boolean showRaceDetails) {
|
||||||
|
super(parent, context, sailingService, asyncActionsExecutor, settings, competitorSelectionProvider,
|
||||||
|
leaderboardName, errorReporter, stringMessages, showRaceDetails, resources, componentResources,
|
||||||
|
tableResources);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+1
-1
@@ -44,7 +44,7 @@ import com.sap.sse.common.filter.FilterSet;
|
|||||||
import com.sap.sse.gwt.client.dialog.DataEntryDialog.DialogCallback;
|
import com.sap.sse.gwt.client.dialog.DataEntryDialog.DialogCallback;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A text box that belongs to a {@link LeaderboardPanel} and allows the user to search for competitors by sail number
|
* A text box that belongs to a {@link ClassicLeaderboardPanel} and allows the user to search for competitors by sail number
|
||||||
* and competitor name. When the user provides a non-empty search string, a new {@link Filter} for type {@link CompetitorDTO}
|
* and competitor name. When the user provides a non-empty search string, a new {@link Filter} for type {@link CompetitorDTO}
|
||||||
* will be added that accepts competitors whose {@link CompetitorDTO#getSailID() sail number} or {@link CompetitorDTO#getName() name}
|
* will be added that accepts competitors whose {@link CompetitorDTO#getSailID() sail number} or {@link CompetitorDTO#getName() name}
|
||||||
* matches the user input. When the text box is emptied,
|
* matches the user input. When the text box is emptied,
|
||||||
|
|||||||
+2
-2
@@ -7,10 +7,10 @@ import com.sap.sailing.domain.common.dto.CompetitorDTO;
|
|||||||
import com.sap.sailing.domain.common.dto.LeaderboardRowDTO;
|
import com.sap.sailing.domain.common.dto.LeaderboardRowDTO;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A {@link LeaderboardPanel} does not always display all rows available. One reason for filtering can be a filter set
|
* A {@link ClassicLeaderboardPanel} does not always display all rows available. One reason for filtering can be a filter set
|
||||||
* explicitly by the user. Another can be that the leaderboard panel is configured to only show entries for one
|
* explicitly by the user. Another can be that the leaderboard panel is configured to only show entries for one
|
||||||
* particular race. Other UI controls that need to know which rows are being shown shall not need to see the entire
|
* particular race. Other UI controls that need to know which rows are being shown shall not need to see the entire
|
||||||
* {@link LeaderboardPanel} interface. Therefore, this interface provides the capabilities needed.
|
* {@link ClassicLeaderboardPanel} interface. Therefore, this interface provides the capabilities needed.
|
||||||
*
|
*
|
||||||
* @author Axel Uhl (D043530)
|
* @author Axel Uhl (D043530)
|
||||||
*
|
*
|
||||||
|
|||||||
+6
-6
@@ -52,7 +52,7 @@ public abstract class ExpandableSortableColumn<C> extends LeaderboardSortableCol
|
|||||||
private final LinkedList<Boolean> queuedToggleRequests;
|
private final LinkedList<Boolean> queuedToggleRequests;
|
||||||
|
|
||||||
private boolean suppressSortingOnce;
|
private boolean suppressSortingOnce;
|
||||||
private final UnStyledLeaderboardPanel leaderboardPanel;
|
private final LeaderboardPanel leaderboardPanel;
|
||||||
private final Map<DetailType, AbstractSortableColumnWithMinMax<LeaderboardRowDTO, ?>> detailColumnsMap;
|
private final Map<DetailType, AbstractSortableColumnWithMinMax<LeaderboardRowDTO, ?>> detailColumnsMap;
|
||||||
private final List<DetailType> detailSelection;
|
private final List<DetailType> detailSelection;
|
||||||
|
|
||||||
@@ -71,7 +71,7 @@ public abstract class ExpandableSortableColumn<C> extends LeaderboardSortableCol
|
|||||||
*/
|
*/
|
||||||
private boolean expanded;
|
private boolean expanded;
|
||||||
|
|
||||||
public ExpandableSortableColumn(UnStyledLeaderboardPanel leaderboardPanel, boolean enableExpansion, Cell<C> cell,
|
public ExpandableSortableColumn(LeaderboardPanel leaderboardPanel, boolean enableExpansion, Cell<C> cell,
|
||||||
SortingOrder preferredSortingOrder, StringMessages stringConstants, String detailHeaderStyle, String detailColumnStyle,
|
SortingOrder preferredSortingOrder, StringMessages stringConstants, String detailHeaderStyle, String detailColumnStyle,
|
||||||
List<DetailType> detailSelection, DisplayedLeaderboardRowsProvider displayedLeaderboardRowsProvider) {
|
List<DetailType> detailSelection, DisplayedLeaderboardRowsProvider displayedLeaderboardRowsProvider) {
|
||||||
super(cell, preferredSortingOrder, displayedLeaderboardRowsProvider);
|
super(cell, preferredSortingOrder, displayedLeaderboardRowsProvider);
|
||||||
@@ -87,12 +87,12 @@ public abstract class ExpandableSortableColumn<C> extends LeaderboardSortableCol
|
|||||||
* override this method.
|
* override this method.
|
||||||
*/
|
*/
|
||||||
protected Map<DetailType, AbstractSortableColumnWithMinMax<LeaderboardRowDTO, ?>> getDetailColumnMap(
|
protected Map<DetailType, AbstractSortableColumnWithMinMax<LeaderboardRowDTO, ?>> getDetailColumnMap(
|
||||||
UnStyledLeaderboardPanel leaderboardPanel, StringMessages stringConstants, String detailHeaderStyle,
|
LeaderboardPanel leaderboardPanel, StringMessages stringConstants, String detailHeaderStyle,
|
||||||
String detailColumnStyle) {
|
String detailColumnStyle) {
|
||||||
return Collections.emptyMap();
|
return Collections.emptyMap();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected UnStyledLeaderboardPanel getLeaderboardPanel() {
|
protected LeaderboardPanel getLeaderboardPanel() {
|
||||||
return leaderboardPanel;
|
return leaderboardPanel;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -239,10 +239,10 @@ public abstract class ExpandableSortableColumn<C> extends LeaderboardSortableCol
|
|||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Finishes the current toggling by removing the
|
* Finishes the current toggling by removing the
|
||||||
* {@link LeaderboardPanel#removeBusyTask() busy task} from the {@link #getLeaderboardPanel() leaderboard panel} and setting the
|
* {@link ClassicLeaderboardPanel#removeBusyTask() busy task} from the {@link #getLeaderboardPanel() leaderboard panel} and setting the
|
||||||
* {@link #setTogglingInProcess(boolean) togglingInProcess flag} to <code>false</code>.
|
* {@link #setTogglingInProcess(boolean) togglingInProcess flag} to <code>false</code>.
|
||||||
* Afterwards, {@link #queuedToggleRequests queued toggling requests} are executed, if any.
|
* Afterwards, {@link #queuedToggleRequests queued toggling requests} are executed, if any.
|
||||||
* Make sure that this method is called only once, and only after {@link LeaderboardPanel#addBusyTask()} has been called.
|
* Make sure that this method is called only once, and only after {@link ClassicLeaderboardPanel#addBusyTask()} has been called.
|
||||||
*/
|
*/
|
||||||
private void finishCurrentToggling() {
|
private void finishCurrentToggling() {
|
||||||
getLeaderboardPanel().removeBusyTask();
|
getLeaderboardPanel().removeBusyTask();
|
||||||
|
|||||||
+3621
-30
File diff suppressed because it is too large.
Load diff
+2
-2
@@ -30,7 +30,7 @@ import com.sap.sse.gwt.client.shared.perspective.PerspectiveCompositeSettings;
|
|||||||
*/
|
*/
|
||||||
public class LeaderboardViewer extends AbstractLeaderboardViewer<LeaderboardPerspectiveLifecycle> {
|
public class LeaderboardViewer extends AbstractLeaderboardViewer<LeaderboardPerspectiveLifecycle> {
|
||||||
private final MultiCompetitorLeaderboardChart multiCompetitorChart;
|
private final MultiCompetitorLeaderboardChart multiCompetitorChart;
|
||||||
private LeaderboardPanel overallLeaderboardPanel;
|
private ClassicLeaderboardPanel overallLeaderboardPanel;
|
||||||
|
|
||||||
public LeaderboardViewer(Component<?> parent,
|
public LeaderboardViewer(Component<?> parent,
|
||||||
ComponentContext<PerspectiveCompositeSettings<LeaderboardPerspectiveOwnSettings>> componentContext,
|
ComponentContext<PerspectiveCompositeSettings<LeaderboardPerspectiveOwnSettings>> componentContext,
|
||||||
@@ -58,7 +58,7 @@ public class LeaderboardViewer extends AbstractLeaderboardViewer<LeaderboardPers
|
|||||||
super(parent, componentContext, lifecycle, settings, competitorSelectionModel, asyncActionsExecutor, timer,
|
super(parent, componentContext, lifecycle, settings, competitorSelectionModel, asyncActionsExecutor, timer,
|
||||||
stringMessages);
|
stringMessages);
|
||||||
// FIXME: Cleanup with java8 using supplier
|
// FIXME: Cleanup with java8 using supplier
|
||||||
init(new LeaderboardPanel(this, getComponentContext(), sailingService, asyncActionsExecutor,
|
init(new ClassicLeaderboardPanel(this, getComponentContext(), sailingService, asyncActionsExecutor,
|
||||||
settings.findSettingsByComponentId(LeaderboardPanelLifecycle.ID), preselectedRace != null,
|
settings.findSettingsByComponentId(LeaderboardPanelLifecycle.ID), preselectedRace != null,
|
||||||
preselectedRace, competitorSelectionModel, timer, leaderboardGroupName, leaderboardName, errorReporter,
|
preselectedRace, competitorSelectionModel, timer, leaderboardGroupName, leaderboardName, errorReporter,
|
||||||
stringMessages, settings.getPerspectiveOwnSettings().isShowRaceDetails(),
|
stringMessages, settings.getPerspectiveOwnSettings().isShowRaceDetails(),
|
||||||
|
|||||||
+2
-2
@@ -255,7 +255,7 @@ public class LegColumn extends ExpandableSortableColumn<String> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public LegColumn(UnStyledLeaderboardPanel leaderboardPanel, String raceColumnName, int legIndex,
|
public LegColumn(LeaderboardPanel leaderboardPanel, String raceColumnName, int legIndex,
|
||||||
SortingOrder preferredSortingOrder, StringMessages stringMessages,
|
SortingOrder preferredSortingOrder, StringMessages stringMessages,
|
||||||
List<DetailType> legDetailSelection, String headerStyle, String columnStyle,
|
List<DetailType> legDetailSelection, String headerStyle, String columnStyle,
|
||||||
String detailHeaderStyle, String detailColumnStyle) {
|
String detailHeaderStyle, String detailColumnStyle) {
|
||||||
@@ -283,7 +283,7 @@ public class LegColumn extends ExpandableSortableColumn<String> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Map<DetailType, AbstractSortableColumnWithMinMax<LeaderboardRowDTO, ?>> getDetailColumnMap(
|
protected Map<DetailType, AbstractSortableColumnWithMinMax<LeaderboardRowDTO, ?>> getDetailColumnMap(
|
||||||
UnStyledLeaderboardPanel leaderboardPanel, StringMessages stringMessages, String detailHeaderStyle,
|
LeaderboardPanel leaderboardPanel, StringMessages stringMessages, String detailHeaderStyle,
|
||||||
String detailColumnStyle) {
|
String detailColumnStyle) {
|
||||||
Map<DetailType, AbstractSortableColumnWithMinMax<LeaderboardRowDTO, ?>> result = new HashMap<>();
|
Map<DetailType, AbstractSortableColumnWithMinMax<LeaderboardRowDTO, ?>> result = new HashMap<>();
|
||||||
result.put(DetailType.DISTANCE_TRAVELED,
|
result.put(DetailType.DISTANCE_TRAVELED,
|
||||||
|
|||||||
+2
-2
@@ -85,7 +85,7 @@ public class ManeuverCountRaceColumn extends ExpandableSortableColumn<String> im
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public ManeuverCountRaceColumn(UnStyledLeaderboardPanel leaderboardPanel, RaceNameProvider raceNameProvider,
|
public ManeuverCountRaceColumn(LeaderboardPanel leaderboardPanel, RaceNameProvider raceNameProvider,
|
||||||
StringMessages stringConstants, List<DetailType> maneuverDetailSelection, String headerStyle,
|
StringMessages stringConstants, List<DetailType> maneuverDetailSelection, String headerStyle,
|
||||||
String columnStylee, String detailHeaderStyle, String detailColumnStyle, DisplayedLeaderboardRowsProvider displayedLeaderboardRowsProvider) {
|
String columnStylee, String detailHeaderStyle, String detailColumnStyle, DisplayedLeaderboardRowsProvider displayedLeaderboardRowsProvider) {
|
||||||
super(leaderboardPanel, /* expandable */true /* all legs have details */, new TextCell(), DetailType.NUMBER_OF_MANEUVERS.getDefaultSortingOrder(),
|
super(leaderboardPanel, /* expandable */true /* all legs have details */, new TextCell(), DetailType.NUMBER_OF_MANEUVERS.getDefaultSortingOrder(),
|
||||||
@@ -235,7 +235,7 @@ public class ManeuverCountRaceColumn extends ExpandableSortableColumn<String> im
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Map<DetailType, AbstractSortableColumnWithMinMax<LeaderboardRowDTO, ?>> getDetailColumnMap(
|
protected Map<DetailType, AbstractSortableColumnWithMinMax<LeaderboardRowDTO, ?>> getDetailColumnMap(
|
||||||
UnStyledLeaderboardPanel leaderboardPanel, StringMessages stringMessages, String detailHeaderStyle,
|
LeaderboardPanel leaderboardPanel, StringMessages stringMessages, String detailHeaderStyle,
|
||||||
String detailColumnStyle) {
|
String detailColumnStyle) {
|
||||||
Map<DetailType, AbstractSortableColumnWithMinMax<LeaderboardRowDTO, ?>> result = new HashMap<>();
|
Map<DetailType, AbstractSortableColumnWithMinMax<LeaderboardRowDTO, ?>> result = new HashMap<>();
|
||||||
result.put(DetailType.TACK, new FormattedDoubleDetailTypeColumn(DetailType.TACK, new NumberOfTacks(), detailHeaderStyle, detailColumnStyle, leaderboardPanel));
|
result.put(DetailType.TACK, new FormattedDoubleDetailTypeColumn(DetailType.TACK, new NumberOfTacks(), detailHeaderStyle, detailColumnStyle, leaderboardPanel));
|
||||||
|
|||||||
+1
-1
@@ -62,7 +62,7 @@ public class MetaLeaderboardViewer extends AbstractLeaderboardViewer<MetaLeaderb
|
|||||||
/**
|
/**
|
||||||
* Cleanup one java8 suppliers can be used
|
* Cleanup one java8 suppliers can be used
|
||||||
*/
|
*/
|
||||||
init(new LeaderboardPanel(this, componentContext, sailingService, asyncActionsExecutor,
|
init(new ClassicLeaderboardPanel(this, componentContext, sailingService, asyncActionsExecutor,
|
||||||
settings.findSettingsByComponentId(LeaderboardPanelLifecycle.ID),
|
settings.findSettingsByComponentId(LeaderboardPanelLifecycle.ID),
|
||||||
preselectedRace != null, preselectedRace, competitorSelectionModel, timer,
|
preselectedRace != null, preselectedRace, competitorSelectionModel, timer,
|
||||||
leaderboardGroupName, metaLeaderboardName, errorReporter, stringMessages,
|
leaderboardGroupName, metaLeaderboardName, errorReporter, stringMessages,
|
||||||
|
|||||||
+1
-1
@@ -16,7 +16,7 @@ import com.sap.sse.gwt.client.shared.perspective.ComponentContext;
|
|||||||
* Represents a single Leaderboard in the Context of a MultiLeaderboard
|
* Represents a single Leaderboard in the Context of a MultiLeaderboard
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class MultiLeaderboardPanel extends LeaderboardPanel {
|
public class MultiLeaderboardPanel extends ClassicLeaderboardPanel {
|
||||||
public MultiLeaderboardPanel(Component<?> parent, ComponentContext<?> context,
|
public MultiLeaderboardPanel(Component<?> parent, ComponentContext<?> context,
|
||||||
SailingServiceAsync sailingService, AsyncActionsExecutor asyncActionsExecutor, LeaderboardSettings settings,
|
SailingServiceAsync sailingService, AsyncActionsExecutor asyncActionsExecutor, LeaderboardSettings settings,
|
||||||
boolean isEmbedded, RegattaAndRaceIdentifier preSelectedRace,
|
boolean isEmbedded, RegattaAndRaceIdentifier preSelectedRace,
|
||||||
|
|||||||
+3
-3
@@ -38,12 +38,12 @@ import com.sap.sse.gwt.client.shared.perspective.ComponentContext;
|
|||||||
import com.sap.sse.gwt.client.shared.perspective.ComponentContextWithSettingsStorage;
|
import com.sap.sse.gwt.client.shared.perspective.ComponentContextWithSettingsStorage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A panel managing multiple {@link LeaderboardPanel}s (e.g. from a meta leaderboard) so that the user can switch between them.
|
* A panel managing multiple {@link ClassicLeaderboardPanel}s (e.g. from a meta leaderboard) so that the user can switch between them.
|
||||||
* @author Frank
|
* @author Frank
|
||||||
*/
|
*/
|
||||||
public class MultiLeaderboardProxyPanel extends AbstractLazyComponent<LeaderboardSettings> implements TimeListener, SelectedLeaderboardChangeProvider {
|
public class MultiLeaderboardProxyPanel extends AbstractLazyComponent<LeaderboardSettings> implements TimeListener, SelectedLeaderboardChangeProvider {
|
||||||
|
|
||||||
private LeaderboardPanel selectedLeaderboardPanel;
|
private ClassicLeaderboardPanel selectedLeaderboardPanel;
|
||||||
private FlowPanel selectedLeaderboardFlowPanel;
|
private FlowPanel selectedLeaderboardFlowPanel;
|
||||||
|
|
||||||
private final StringMessages stringMessages;
|
private final StringMessages stringMessages;
|
||||||
@@ -299,7 +299,7 @@ public class MultiLeaderboardProxyPanel extends AbstractLazyComponent<Leaderboar
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setSelectedLeaderboard(LeaderboardPanel selectedLeaderboard) {
|
public void setSelectedLeaderboard(ClassicLeaderboardPanel selectedLeaderboard) {
|
||||||
if (this.selectedLeaderboardPanel != selectedLeaderboard) {
|
if (this.selectedLeaderboardPanel != selectedLeaderboard) {
|
||||||
this.selectedLeaderboardPanel = selectedLeaderboard;
|
this.selectedLeaderboardPanel = selectedLeaderboard;
|
||||||
for (SelectedLeaderboardChangeListener listener : selectedLeaderboardChangeListeners) {
|
for (SelectedLeaderboardChangeListener listener : selectedLeaderboardChangeListeners) {
|
||||||
|
|||||||
+1
-1
@@ -13,7 +13,7 @@ import com.sap.sse.gwt.client.player.Timer;
|
|||||||
import com.sap.sse.gwt.client.shared.components.Component;
|
import com.sap.sse.gwt.client.shared.components.Component;
|
||||||
import com.sap.sse.gwt.client.shared.perspective.ComponentContext;
|
import com.sap.sse.gwt.client.shared.perspective.ComponentContext;
|
||||||
|
|
||||||
public class OverallLeaderboardPanel extends LeaderboardPanel {
|
public class OverallLeaderboardPanel extends ClassicLeaderboardPanel {
|
||||||
public OverallLeaderboardPanel(Component<?> parent, ComponentContext<?> context,
|
public OverallLeaderboardPanel(Component<?> parent, ComponentContext<?> context,
|
||||||
SailingServiceAsync sailingService, AsyncActionsExecutor asyncActionsExecutor, LeaderboardSettings settings,
|
SailingServiceAsync sailingService, AsyncActionsExecutor asyncActionsExecutor, LeaderboardSettings settings,
|
||||||
boolean isEmbedded, RegattaAndRaceIdentifier preSelectedRace,
|
boolean isEmbedded, RegattaAndRaceIdentifier preSelectedRace,
|
||||||
|
|||||||
+2
-2
@@ -30,7 +30,7 @@ public class OverallTimeTraveledColumn extends ExpandableSortableColumn<String>
|
|||||||
private String headerStyle;
|
private String headerStyle;
|
||||||
private MinMaxRenderer minmaxRenderer;
|
private MinMaxRenderer minmaxRenderer;
|
||||||
|
|
||||||
public OverallTimeTraveledColumn(UnStyledLeaderboardPanel leaderboardPanel, StringMessages stringMessages,
|
public OverallTimeTraveledColumn(LeaderboardPanel leaderboardPanel, StringMessages stringMessages,
|
||||||
String headerStyle, String columnStyle, String detailHeaderStyle,
|
String headerStyle, String columnStyle, String detailHeaderStyle,
|
||||||
String detailColumnStyle) {
|
String detailColumnStyle) {
|
||||||
super(leaderboardPanel, /* expandable */true, new TextCell(), DETAIL_TYPE.getDefaultSortingOrder(),
|
super(leaderboardPanel, /* expandable */true, new TextCell(), DETAIL_TYPE.getDefaultSortingOrder(),
|
||||||
@@ -50,7 +50,7 @@ public class OverallTimeTraveledColumn extends ExpandableSortableColumn<String>
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Map<DetailType, AbstractSortableColumnWithMinMax<LeaderboardRowDTO, ?>> getDetailColumnMap(
|
protected Map<DetailType, AbstractSortableColumnWithMinMax<LeaderboardRowDTO, ?>> getDetailColumnMap(
|
||||||
UnStyledLeaderboardPanel leaderboardPanel, StringMessages stringConstants, String detailHeaderStyle,
|
LeaderboardPanel leaderboardPanel, StringMessages stringConstants, String detailHeaderStyle,
|
||||||
String detailColumnStyle) {
|
String detailColumnStyle) {
|
||||||
Map<DetailType, AbstractSortableColumnWithMinMax<LeaderboardRowDTO, ?>> result = new HashMap<>();
|
Map<DetailType, AbstractSortableColumnWithMinMax<LeaderboardRowDTO, ?>> result = new HashMap<>();
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -9,6 +9,6 @@ public interface SelectedLeaderboardChangeListener {
|
|||||||
/**
|
/**
|
||||||
* @param selectedLeaderboard the selected non-<code>null</code> LeaderboardPanel
|
* @param selectedLeaderboard the selected non-<code>null</code> LeaderboardPanel
|
||||||
*/
|
*/
|
||||||
void onSelectedLeaderboardChanged(LeaderboardPanel selectedLeaderboard);
|
void onSelectedLeaderboardChanged(ClassicLeaderboardPanel selectedLeaderboard);
|
||||||
|
|
||||||
}
|
}
|
||||||
+1
-1
@@ -7,5 +7,5 @@ public interface SelectedLeaderboardChangeProvider {
|
|||||||
|
|
||||||
void removeSelectedLeaderboardChangeListener(SelectedLeaderboardChangeListener listener);
|
void removeSelectedLeaderboardChangeListener(SelectedLeaderboardChangeListener listener);
|
||||||
|
|
||||||
void setSelectedLeaderboard(LeaderboardPanel selectedLeaderboard);
|
void setSelectedLeaderboard(ClassicLeaderboardPanel selectedLeaderboard);
|
||||||
}
|
}
|
||||||
+5
-5
@@ -51,31 +51,31 @@ public class SortableExpandableColumnHeader extends Header<SafeHtml> {
|
|||||||
|
|
||||||
private static CellTemplates template = GWT.create(CellTemplates.class);
|
private static CellTemplates template = GWT.create(CellTemplates.class);
|
||||||
|
|
||||||
public SortableExpandableColumnHeader(String title, String iconURL, UnStyledLeaderboardPanel leaderboardPanel,
|
public SortableExpandableColumnHeader(String title, String iconURL, LeaderboardPanel leaderboardPanel,
|
||||||
ExpandableSortableColumn<?> column, StringMessages stringConstants) {
|
ExpandableSortableColumn<?> column, StringMessages stringConstants) {
|
||||||
this(title, null, null, iconURL, leaderboardPanel, column, stringConstants);
|
this(title, null, null, iconURL, leaderboardPanel, column, stringConstants);
|
||||||
}
|
}
|
||||||
|
|
||||||
public SortableExpandableColumnHeader(String title, String tooltip, String iconURL,
|
public SortableExpandableColumnHeader(String title, String tooltip, String iconURL,
|
||||||
UnStyledLeaderboardPanel leaderboardPanel, ExpandableSortableColumn<?> column,
|
LeaderboardPanel leaderboardPanel, ExpandableSortableColumn<?> column,
|
||||||
StringMessages stringConstants) {
|
StringMessages stringConstants) {
|
||||||
this(title, tooltip, null, iconURL, leaderboardPanel, column, stringConstants);
|
this(title, tooltip, null, iconURL, leaderboardPanel, column, stringConstants);
|
||||||
}
|
}
|
||||||
|
|
||||||
public SortableExpandableColumnHeader(String title, String tooltip, String iconURL,
|
public SortableExpandableColumnHeader(String title, String tooltip, String iconURL,
|
||||||
UnStyledLeaderboardPanel leaderboardPanel, ExpandableSortableColumn<?> column,
|
LeaderboardPanel leaderboardPanel, ExpandableSortableColumn<?> column,
|
||||||
StringMessages stringConstants, String unit) {
|
StringMessages stringConstants, String unit) {
|
||||||
this(title, tooltip, unit, iconURL, leaderboardPanel, column, stringConstants);
|
this(title, tooltip, unit, iconURL, leaderboardPanel, column, stringConstants);
|
||||||
}
|
}
|
||||||
|
|
||||||
public SortableExpandableColumnHeader(String title, String tooltip, String unit,
|
public SortableExpandableColumnHeader(String title, String tooltip, String unit,
|
||||||
String iconURL, UnStyledLeaderboardPanel leaderboardPanel, ExpandableSortableColumn<?> column,
|
String iconURL, LeaderboardPanel leaderboardPanel, ExpandableSortableColumn<?> column,
|
||||||
StringMessages stringConstants) {
|
StringMessages stringConstants) {
|
||||||
super(constructCell(title, tooltip, unit, iconURL, column.isExpansionEnabled(), leaderboardPanel, column, stringConstants));
|
super(constructCell(title, tooltip, unit, iconURL, column.isExpansionEnabled(), leaderboardPanel, column, stringConstants));
|
||||||
}
|
}
|
||||||
|
|
||||||
private static <T> Cell<SafeHtml> constructCell(final String title, final String tooltip, final String unit,
|
private static <T> Cell<SafeHtml> constructCell(final String title, final String tooltip, final String unit,
|
||||||
final String iconURL, boolean isExpansionEnabled, final UnStyledLeaderboardPanel leaderboardPanel,
|
final String iconURL, boolean isExpansionEnabled, final LeaderboardPanel leaderboardPanel,
|
||||||
final ExpandableSortableColumn<?> column, final StringMessages stringConstants) {
|
final ExpandableSortableColumn<?> column, final StringMessages stringConstants) {
|
||||||
final List<HasCell<SafeHtml, ?>> cells = new ArrayList<HasCell<SafeHtml, ?>>(3);
|
final List<HasCell<SafeHtml, ?>> cells = new ArrayList<HasCell<SafeHtml, ?>>(3);
|
||||||
// if it's a medal race, add the cell rendering the medal image
|
// if it's a medal race, add the cell rendering the medal image
|
||||||
|
|||||||
+2
-2
@@ -32,7 +32,7 @@ public class TimeTraveledRaceColumn extends ExpandableSortableColumn<String> imp
|
|||||||
private String headerStyle;
|
private String headerStyle;
|
||||||
private MinMaxRenderer minmaxRenderer;
|
private MinMaxRenderer minmaxRenderer;
|
||||||
|
|
||||||
public TimeTraveledRaceColumn(UnStyledLeaderboardPanel leaderboardPanel, RaceNameProvider raceNameProvider,
|
public TimeTraveledRaceColumn(LeaderboardPanel leaderboardPanel, RaceNameProvider raceNameProvider,
|
||||||
StringMessages stringMessages, String headerStyle, String columnStyle,
|
StringMessages stringMessages, String headerStyle, String columnStyle,
|
||||||
String detailHeaderStyle, String detailColumnStyle) {
|
String detailHeaderStyle, String detailColumnStyle) {
|
||||||
super(leaderboardPanel, /* expandable */true, new TextCell(), DETAIL_TYPE.getDefaultSortingOrder(),
|
super(leaderboardPanel, /* expandable */true, new TextCell(), DETAIL_TYPE.getDefaultSortingOrder(),
|
||||||
@@ -83,7 +83,7 @@ public class TimeTraveledRaceColumn extends ExpandableSortableColumn<String> imp
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Map<DetailType, AbstractSortableColumnWithMinMax<LeaderboardRowDTO, ?>> getDetailColumnMap(
|
protected Map<DetailType, AbstractSortableColumnWithMinMax<LeaderboardRowDTO, ?>> getDetailColumnMap(
|
||||||
UnStyledLeaderboardPanel leaderboardPanel, StringMessages stringConstants, String detailHeaderStyle,
|
LeaderboardPanel leaderboardPanel, StringMessages stringConstants, String detailHeaderStyle,
|
||||||
String detailColumnStyle) {
|
String detailColumnStyle) {
|
||||||
Map<DetailType, AbstractSortableColumnWithMinMax<LeaderboardRowDTO, ?>> result = new HashMap<>();
|
Map<DetailType, AbstractSortableColumnWithMinMax<LeaderboardRowDTO, ?>> result = new HashMap<>();
|
||||||
|
|
||||||
|
|||||||
-3649
File diff suppressed because it is too large.
Load diff
+3
-3
@@ -61,7 +61,7 @@ import com.sap.sailing.gwt.ui.client.SailingServiceAsync;
|
|||||||
import com.sap.sailing.gwt.ui.client.StringMessages;
|
import com.sap.sailing.gwt.ui.client.StringMessages;
|
||||||
import com.sap.sailing.gwt.ui.leaderboard.CompetitorColumnBase;
|
import com.sap.sailing.gwt.ui.leaderboard.CompetitorColumnBase;
|
||||||
import com.sap.sailing.gwt.ui.leaderboard.CompetitorFetcher;
|
import com.sap.sailing.gwt.ui.leaderboard.CompetitorFetcher;
|
||||||
import com.sap.sailing.gwt.ui.leaderboard.LeaderboardPanel;
|
import com.sap.sailing.gwt.ui.leaderboard.ClassicLeaderboardPanel;
|
||||||
import com.sap.sailing.gwt.ui.leaderboard.LeaderboardSortableColumnWithMinMax;
|
import com.sap.sailing.gwt.ui.leaderboard.LeaderboardSortableColumnWithMinMax;
|
||||||
import com.sap.sse.common.Util;
|
import com.sap.sse.common.Util;
|
||||||
import com.sap.sse.gwt.client.ErrorReporter;
|
import com.sap.sse.gwt.client.ErrorReporter;
|
||||||
@@ -72,13 +72,13 @@ import com.sap.sse.gwt.client.shared.components.SettingsDialog;
|
|||||||
import com.sap.sse.gwt.client.useragent.UserAgentDetails;
|
import com.sap.sse.gwt.client.useragent.UserAgentDetails;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An editable version of the {@link LeaderboardPanel} which allows a user to enter carried / accumulated
|
* An editable version of the {@link ClassicLeaderboardPanel} which allows a user to enter carried / accumulated
|
||||||
* points and fix individual race scores.
|
* points and fix individual race scores.
|
||||||
*
|
*
|
||||||
* @author Axel Uhl (d043530)
|
* @author Axel Uhl (d043530)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class EditableLeaderboardPanel extends LeaderboardPanel {
|
public class EditableLeaderboardPanel extends ClassicLeaderboardPanel {
|
||||||
private static EditableLeaderboardResources resources = GWT.create(EditableLeaderboardResources.class);
|
private static EditableLeaderboardResources resources = GWT.create(EditableLeaderboardResources.class);
|
||||||
|
|
||||||
final DateBox lastScoreCorrectionTimeBox;
|
final DateBox lastScoreCorrectionTimeBox;
|
||||||
|
|||||||
+5
-5
@@ -16,7 +16,7 @@ import com.sap.sailing.gwt.ui.client.RaceTimePanel;
|
|||||||
import com.sap.sailing.gwt.ui.client.RaceTimesInfoProviderListener;
|
import com.sap.sailing.gwt.ui.client.RaceTimesInfoProviderListener;
|
||||||
import com.sap.sailing.gwt.ui.client.StringMessages;
|
import com.sap.sailing.gwt.ui.client.StringMessages;
|
||||||
import com.sap.sailing.gwt.ui.client.shared.racemap.RaceCompetitorSet.CompetitorsForRaceDefinedListener;
|
import com.sap.sailing.gwt.ui.client.shared.racemap.RaceCompetitorSet.CompetitorsForRaceDefinedListener;
|
||||||
import com.sap.sailing.gwt.ui.leaderboard.LeaderboardPanel;
|
import com.sap.sailing.gwt.ui.leaderboard.ClassicLeaderboardPanel;
|
||||||
import com.sap.sailing.gwt.ui.shared.RaceTimesInfoDTO;
|
import com.sap.sailing.gwt.ui.shared.RaceTimesInfoDTO;
|
||||||
import com.sap.sse.gwt.client.player.Timer;
|
import com.sap.sse.gwt.client.player.Timer;
|
||||||
|
|
||||||
@@ -42,7 +42,7 @@ import com.sap.sse.gwt.client.player.Timer;
|
|||||||
* {@link #updatedLeaderboard(LeaderboardDTO)} eventually, but in between, other callbacks to the same method
|
* {@link #updatedLeaderboard(LeaderboardDTO)} eventually, but in between, other callbacks to the same method
|
||||||
* may occur, triggered by other, automatic adjustments or initialization of the {@link Timer}. To solve this
|
* may occur, triggered by other, automatic adjustments or initialization of the {@link Timer}. To solve this
|
||||||
* problem, subclasses may decide to use a separate {@link GetLeaderboardByNameAction} action and execute
|
* problem, subclasses may decide to use a separate {@link GetLeaderboardByNameAction} action and execute
|
||||||
* it using the {@link #getLeaderboardPanel()}.{@link LeaderboardPanel#getExecutor() getExecutor()}. In the
|
* it using the {@link #getLeaderboardPanel()}.{@link ClassicLeaderboardPanel#getExecutor() getExecutor()}. In the
|
||||||
* dedicated callback the subclass can then be sure that the {@link LeaderboardDTO} received matches the
|
* dedicated callback the subclass can then be sure that the {@link LeaderboardDTO} received matches the
|
||||||
* time previously set on the {@link Timer}.
|
* time previously set on the {@link Timer}.
|
||||||
*
|
*
|
||||||
@@ -53,7 +53,7 @@ public abstract class AbstractRaceBoardMode implements RaceBoardMode, RaceTimesI
|
|||||||
private Timer timer;
|
private Timer timer;
|
||||||
private RegattaAndRaceIdentifier raceIdentifier;
|
private RegattaAndRaceIdentifier raceIdentifier;
|
||||||
private RaceTimePanel raceTimePanel;
|
private RaceTimePanel raceTimePanel;
|
||||||
private LeaderboardPanel leaderboardPanel;
|
private ClassicLeaderboardPanel leaderboardPanel;
|
||||||
private RaceBoardPanel raceBoardPanel;
|
private RaceBoardPanel raceBoardPanel;
|
||||||
|
|
||||||
private Map<RegattaAndRaceIdentifier, RaceTimesInfoDTO> raceTimesInfo;
|
private Map<RegattaAndRaceIdentifier, RaceTimesInfoDTO> raceTimesInfo;
|
||||||
@@ -91,7 +91,7 @@ public abstract class AbstractRaceBoardMode implements RaceBoardMode, RaceTimesI
|
|||||||
return raceTimePanel;
|
return raceTimePanel;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected LeaderboardPanel getLeaderboardPanel() {
|
protected ClassicLeaderboardPanel getLeaderboardPanel() {
|
||||||
return leaderboardPanel;
|
return leaderboardPanel;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -161,7 +161,7 @@ public abstract class AbstractRaceBoardMode implements RaceBoardMode, RaceTimesI
|
|||||||
getTimer().getTime(), raceColumnNameAsList, /* addOverallDetails */ false,
|
getTimer().getTime(), raceColumnNameAsList, /* addOverallDetails */ false,
|
||||||
getLeaderboard(), /* fillTotalPointsUncorrected */ false,
|
getLeaderboard(), /* fillTotalPointsUncorrected */ false,
|
||||||
/* timerToAdjustOffsetIn */ getTimer(), /* errorReporter */ null, StringMessages.INSTANCE);
|
/* timerToAdjustOffsetIn */ getTimer(), /* errorReporter */ null, StringMessages.INSTANCE);
|
||||||
getLeaderboardPanel().getExecutor().execute(getLeaderboardByNameAction, LeaderboardPanel.LOAD_LEADERBOARD_DATA_CATEGORY, callback);
|
getLeaderboardPanel().getExecutor().execute(getLeaderboardByNameAction, ClassicLeaderboardPanel.LOAD_LEADERBOARD_DATA_CATEGORY, callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
+5
-5
@@ -76,7 +76,7 @@ import com.sap.sailing.gwt.ui.client.shared.racemap.RaceMapResources;
|
|||||||
import com.sap.sailing.gwt.ui.client.shared.racemap.RaceMapSettings;
|
import com.sap.sailing.gwt.ui.client.shared.racemap.RaceMapSettings;
|
||||||
import com.sap.sailing.gwt.ui.leaderboard.CompetitorFilterPanel;
|
import com.sap.sailing.gwt.ui.leaderboard.CompetitorFilterPanel;
|
||||||
import com.sap.sailing.gwt.ui.leaderboard.ExplicitRaceColumnSelectionWithPreselectedRace;
|
import com.sap.sailing.gwt.ui.leaderboard.ExplicitRaceColumnSelectionWithPreselectedRace;
|
||||||
import com.sap.sailing.gwt.ui.leaderboard.LeaderboardPanel;
|
import com.sap.sailing.gwt.ui.leaderboard.ClassicLeaderboardPanel;
|
||||||
import com.sap.sailing.gwt.ui.raceboard.RaceBoardResources.RaceBoardMainCss;
|
import com.sap.sailing.gwt.ui.raceboard.RaceBoardResources.RaceBoardMainCss;
|
||||||
import com.sap.sailing.gwt.ui.shared.RegattaDTO;
|
import com.sap.sailing.gwt.ui.shared.RegattaDTO;
|
||||||
import com.sap.sse.common.Util;
|
import com.sap.sse.common.Util;
|
||||||
@@ -129,7 +129,7 @@ public class RaceBoardPanel
|
|||||||
private final RegattaAndRaceIdentifier selectedRaceIdentifier;
|
private final RegattaAndRaceIdentifier selectedRaceIdentifier;
|
||||||
|
|
||||||
private final String leaderboardName;
|
private final String leaderboardName;
|
||||||
private final LeaderboardPanel leaderboardPanel;
|
private final ClassicLeaderboardPanel leaderboardPanel;
|
||||||
private WindChart windChart;
|
private WindChart windChart;
|
||||||
private MultiCompetitorRaceChart competitorChart;
|
private MultiCompetitorRaceChart competitorChart;
|
||||||
private MediaPlayerManagerComponent mediaPlayerManagerComponent;
|
private MediaPlayerManagerComponent mediaPlayerManagerComponent;
|
||||||
@@ -445,7 +445,7 @@ public class RaceBoardPanel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private LeaderboardPanel createLeaderboardPanel(RaceBoardPerspectiveLifecycle lifecycle,
|
private ClassicLeaderboardPanel createLeaderboardPanel(RaceBoardPerspectiveLifecycle lifecycle,
|
||||||
PerspectiveCompositeSettings<RaceBoardPerspectiveOwnSettings> settings, String leaderboardName,
|
PerspectiveCompositeSettings<RaceBoardPerspectiveOwnSettings> settings, String leaderboardName,
|
||||||
String leaderboardGroupName,
|
String leaderboardGroupName,
|
||||||
CompetitorFilterPanel competitorSearchTextBox, boolean isScreenLargeEnoughToInitiallyDisplayLeaderboard) {
|
CompetitorFilterPanel competitorSearchTextBox, boolean isScreenLargeEnoughToInitiallyDisplayLeaderboard) {
|
||||||
@@ -462,7 +462,7 @@ public class RaceBoardPanel
|
|||||||
/* don't showCompetitorFullNameColumn in case screen is so small that we don't
|
/* don't showCompetitorFullNameColumn in case screen is so small that we don't
|
||||||
* even display the leaderboard initially */ isScreenLargeEnoughToInitiallyDisplayLeaderboard,raceColumn.getNumberOfLastRaceColumnsToShow(),raceColumn.getType());
|
* even display the leaderboard initially */ isScreenLargeEnoughToInitiallyDisplayLeaderboard,raceColumn.getNumberOfLastRaceColumnsToShow(),raceColumn.getType());
|
||||||
leaderboardSettings = LeaderboardSettingsFactory.getInstance().overrideDefaultValuesWithNewDefaults(leaderboardSettings, defaultLeaderboardSettingsForCurrentPlayMode);
|
leaderboardSettings = LeaderboardSettingsFactory.getInstance().overrideDefaultValuesWithNewDefaults(leaderboardSettings, defaultLeaderboardSettingsForCurrentPlayMode);
|
||||||
return new LeaderboardPanel(this, getComponentContext(), sailingService, asyncActionsExecutor,
|
return new ClassicLeaderboardPanel(this, getComponentContext(), sailingService, asyncActionsExecutor,
|
||||||
leaderboardSettings,
|
leaderboardSettings,
|
||||||
selectedRaceIdentifier != null, selectedRaceIdentifier,
|
selectedRaceIdentifier != null, selectedRaceIdentifier,
|
||||||
competitorSelectionProvider, timer, leaderboardGroupName, leaderboardName, errorReporter, stringMessages,
|
competitorSelectionProvider, timer, leaderboardGroupName, leaderboardName, errorReporter, stringMessages,
|
||||||
@@ -477,7 +477,7 @@ public class RaceBoardPanel
|
|||||||
componentViewer.forceLayout();
|
componentViewer.forceLayout();
|
||||||
}
|
}
|
||||||
|
|
||||||
LeaderboardPanel getLeaderboardPanel() {
|
ClassicLeaderboardPanel getLeaderboardPanel() {
|
||||||
return leaderboardPanel;
|
return leaderboardPanel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user