mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-08 13:20:57 +00:00
Merge remote-tracking branch 'server/master'
This commit is contained in:
commit
953781dafa
5 files changed
+25
-8
No files matched your search
+8
-2
@@ -65,6 +65,7 @@ public class MediaSelector implements PlayStateListener, TimeListener,
|
||||
private StringMessages stringMessages;
|
||||
private final ErrorReporter errorReporter;
|
||||
private final UserDTO user;
|
||||
private boolean autoSelectMedia;
|
||||
|
||||
private MediaPlayer activeAudioPlayer;
|
||||
private Date currentRaceTime;
|
||||
@@ -73,7 +74,7 @@ public class MediaSelector implements PlayStateListener, TimeListener,
|
||||
|
||||
public MediaSelector(RegattaAndRaceIdentifier selectedRaceIdentifier, RaceTimesInfoProvider raceTimesInfoProvider,
|
||||
Timer raceTimer, MediaServiceAsync mediaService, StringMessages stringMessages,
|
||||
ErrorReporter errorReporter, UserDTO user) {
|
||||
ErrorReporter errorReporter, UserDTO user, boolean autoSelectMedia) {
|
||||
this.raceIdentifier = selectedRaceIdentifier;
|
||||
this.raceTimesInfoProvider = raceTimesInfoProvider;
|
||||
this.raceTimer = raceTimer;
|
||||
@@ -81,6 +82,7 @@ public class MediaSelector implements PlayStateListener, TimeListener,
|
||||
this.stringMessages = stringMessages;
|
||||
this.errorReporter = errorReporter;
|
||||
this.user = user;
|
||||
this.autoSelectMedia = autoSelectMedia;
|
||||
|
||||
Window.addCloseHandler(this);
|
||||
Window.addWindowClosingHandler(this);
|
||||
@@ -120,7 +122,6 @@ public class MediaSelector implements PlayStateListener, TimeListener,
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
setWidgetsVisible(false);
|
||||
|
||||
}
|
||||
@@ -286,6 +287,11 @@ public class MediaSelector implements PlayStateListener, TimeListener,
|
||||
setStatus(mediaTrack);
|
||||
}
|
||||
setWidgetsVisible((this.mediaTracks.size() > 0) || (this.user != null));
|
||||
|
||||
toggleMediaButton.setValue(autoSelectMedia);
|
||||
if (autoSelectMedia) {
|
||||
playDefault();
|
||||
}
|
||||
}
|
||||
|
||||
private void setWidgetsVisible(boolean isVisible) {
|
||||
|
||||
+2
-1
@@ -82,8 +82,9 @@ public class RaceBoardEntryPoint extends AbstractEntryPoint {
|
||||
boolean showCompetitorsChart = GwtHttpRequestUtils.getBooleanParameter(RaceBoardViewConfiguration.PARAM_VIEW_SHOW_COMPETITORSCHART, false /* default*/);
|
||||
String activeCompetitorsFilterSetName = GwtHttpRequestUtils.getStringParameter(RaceBoardViewConfiguration.PARAM_VIEW_COMPETITOR_FILTER, null /* default*/);
|
||||
final boolean canReplayWhileLiveIsPossible = GwtHttpRequestUtils.getBooleanParameter(RaceBoardViewConfiguration.PARAM_CAN_REPLAY_DURING_LIVE_RACES, false);
|
||||
final boolean autoSelectMedia = GwtHttpRequestUtils.getBooleanParameter(RaceBoardViewConfiguration.PARAM_AUTOSELECT_MEDIA, false);
|
||||
raceboardViewConfig = new RaceBoardViewConfiguration(viewMode, activeCompetitorsFilterSetName, showLeaderboard,
|
||||
showWindChart, showCompetitorsChart, canReplayWhileLiveIsPossible);
|
||||
showWindChart, showCompetitorsChart, canReplayWhileLiveIsPossible, autoSelectMedia);
|
||||
|
||||
final ParallelExecutionCallback<List<String>> getLeaderboardNamesCallback = new ParallelExecutionCallback<List<String>>();
|
||||
final ParallelExecutionCallback<List<RegattaDTO>> getRegattasCallback = new ParallelExecutionCallback<List<RegattaDTO>>();
|
||||
|
||||
+1
-1
@@ -276,7 +276,7 @@ public class RaceBoardPanel extends SimplePanel implements RegattaDisplayer, Rac
|
||||
}
|
||||
|
||||
private void addMediaSelectorToNavigationMenu() {
|
||||
MediaSelector mediaSelector = new MediaSelector(selectedRaceIdentifier, raceTimesInfoProvider, timer, mediaService, stringMessages, errorReporter, this.user);
|
||||
MediaSelector mediaSelector = new MediaSelector(selectedRaceIdentifier, raceTimesInfoProvider, timer, mediaService, stringMessages, errorReporter, this.user, getConfiguration().isAutoSelectMedia());
|
||||
// raceTimesInfoProvider.addRaceTimesInfoProviderListener(mediaSelector);
|
||||
timer.addPlayStateListener(mediaSelector);
|
||||
timer.addTimeListener(mediaSelector);
|
||||
|
||||
+12
-3
@@ -12,14 +12,16 @@ public class RaceBoardViewConfiguration {
|
||||
private ViewModes viewMode;
|
||||
private String activeCompetitorsFilterSetName;
|
||||
private boolean canReplayDuringLiveRaces;
|
||||
private final boolean autoSelectMedia;
|
||||
|
||||
public static final String PARAM_VIEW_MODE = "viewMode";
|
||||
public static final String PARAM_VIEW_MODE = "viewMode";
|
||||
public static final String PARAM_VIEW_SHOW_LEADERBOARD = "viewShowLeaderboard";
|
||||
public static final String PARAM_VIEW_SHOW_NAVIGATION_PANEL = "viewShowNavigationPanel";
|
||||
public static final String PARAM_VIEW_SHOW_WINDCHART = "viewShowWindChart";
|
||||
public static final String PARAM_VIEW_SHOW_COMPETITORSCHART = "viewShowCompetitorsChart";
|
||||
public static final String PARAM_VIEW_COMPETITOR_FILTER = "viewCompetitorFilter";
|
||||
public static final String PARAM_CAN_REPLAY_DURING_LIVE_RACES = "canReplayDuringLiveRaces";
|
||||
public static final String PARAM_AUTOSELECT_MEDIA = "autoSelectMedia";
|
||||
|
||||
public static enum ViewModes { ONESCREEN };
|
||||
|
||||
@@ -28,16 +30,18 @@ public class RaceBoardViewConfiguration {
|
||||
showLeaderboard = true;
|
||||
showWindChart = false;
|
||||
showCompetitorsChart = false;
|
||||
}
|
||||
autoSelectMedia = false;
|
||||
}
|
||||
|
||||
public RaceBoardViewConfiguration(ViewModes viewMode, String activeCompetitorsFilterSetName,
|
||||
boolean showLeaderboard, boolean showWindChart, boolean showCompetitorsChart, boolean canReplayDuringLiveRaces) {
|
||||
boolean showLeaderboard, boolean showWindChart, boolean showCompetitorsChart, boolean canReplayDuringLiveRaces, boolean autoSelectMedia) {
|
||||
this.viewMode = viewMode;
|
||||
this.activeCompetitorsFilterSetName = activeCompetitorsFilterSetName;
|
||||
this.showLeaderboard = showLeaderboard;
|
||||
this.showWindChart = showWindChart;
|
||||
this.showCompetitorsChart = showCompetitorsChart;
|
||||
this.canReplayDuringLiveRaces = canReplayDuringLiveRaces;
|
||||
this.autoSelectMedia = autoSelectMedia;
|
||||
}
|
||||
|
||||
public boolean isShowLeaderboard() {
|
||||
@@ -63,4 +67,9 @@ public class RaceBoardViewConfiguration {
|
||||
public boolean isCanReplayDuringLiveRaces() {
|
||||
return canReplayDuringLiveRaces;
|
||||
}
|
||||
|
||||
public boolean isAutoSelectMedia() {
|
||||
return autoSelectMedia;
|
||||
}
|
||||
|
||||
}
|
||||
+2
-1
@@ -43,8 +43,9 @@ public class TVEntryPoint extends AbstractEntryPoint {
|
||||
final boolean showCompetitorsChart = GwtHttpRequestUtils.getBooleanParameter(
|
||||
RaceBoardViewConfiguration.PARAM_VIEW_SHOW_COMPETITORSCHART, false /* default */);
|
||||
String activeCompetitorsFilterSetName = GwtHttpRequestUtils.getStringParameter(RaceBoardViewConfiguration.PARAM_VIEW_COMPETITOR_FILTER, null /* default*/);
|
||||
final boolean autoSelectMedia = GwtHttpRequestUtils.getBooleanParameter(RaceBoardViewConfiguration.PARAM_AUTOSELECT_MEDIA, false);
|
||||
raceboardViewConfig = new RaceBoardViewConfiguration(RaceBoardViewConfiguration.ViewModes.ONESCREEN,
|
||||
activeCompetitorsFilterSetName, showLeaderboard, showWindChart, showCompetitorsChart, /* canReplayWhileLiveIsPossible */ false);
|
||||
activeCompetitorsFilterSetName, showLeaderboard, showWindChart, showCompetitorsChart, /* canReplayWhileLiveIsPossible */ false, autoSelectMedia);
|
||||
|
||||
sailingService.getLeaderboardNames(new AsyncCallback<List<String>>() {
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user