mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-26 07:26:41 +00:00
Merge remote-tracking branch 'origin/master' into mark-rounding-inference
This commit is contained in:
Binary file not shown.
+3
-19
@@ -67,25 +67,14 @@ public class RaceBoardEntryPoint extends AbstractEntryPoint {
|
||||
}
|
||||
|
||||
// read optional parameters
|
||||
RaceBoardViewConfiguration.ViewModes viewMode;
|
||||
String viewModeParamValue = Window.Location.getParameter(RaceBoardViewConfiguration.PARAM_VIEW_MODE);
|
||||
if (viewModeParamValue != null && !viewModeParamValue.isEmpty()) {
|
||||
try {
|
||||
viewMode = RaceBoardViewConfiguration.ViewModes.valueOf(viewModeParamValue);
|
||||
} catch (IllegalArgumentException e) {
|
||||
viewMode = RaceBoardViewConfiguration.ViewModes.ONESCREEN;
|
||||
}
|
||||
} else {
|
||||
viewMode = RaceBoardViewConfiguration.ViewModes.ONESCREEN;
|
||||
}
|
||||
boolean showLeaderboard = GwtHttpRequestUtils.getBooleanParameter(RaceBoardViewConfiguration.PARAM_VIEW_SHOW_LEADERBOARD, true /* default*/);
|
||||
boolean showWindChart = GwtHttpRequestUtils.getBooleanParameter(RaceBoardViewConfiguration.PARAM_VIEW_SHOW_WINDCHART, false /* default*/);
|
||||
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, autoSelectMedia);
|
||||
raceboardViewConfig = new RaceBoardViewConfiguration(activeCompetitorsFilterSetName, showLeaderboard, showWindChart,
|
||||
showCompetitorsChart, canReplayWhileLiveIsPossible, autoSelectMedia);
|
||||
|
||||
final ParallelExecutionCallback<List<String>> getLeaderboardNamesCallback = new ParallelExecutionCallback<List<String>>();
|
||||
final ParallelExecutionCallback<List<RegattaDTO>> getRegattasCallback = new ParallelExecutionCallback<List<RegattaDTO>>();
|
||||
@@ -157,12 +146,7 @@ public class RaceBoardEntryPoint extends AbstractEntryPoint {
|
||||
RaceBoardPanel raceBoardPanel = new RaceBoardPanel(sailingService, mediaService, user, timer, raceSelectionModel, leaderboardName,
|
||||
leaderboardGroupName, raceboardViewConfig, RaceBoardEntryPoint.this, stringMessages, userAgent, raceTimesInfoProvider);
|
||||
raceBoardPanel.fillRegattas(regattas);
|
||||
|
||||
switch (raceBoardPanel.getConfiguration().getViewMode()) {
|
||||
case ONESCREEN:
|
||||
createRaceBoardInOneScreenMode(raceBoardPanel);
|
||||
break;
|
||||
}
|
||||
createRaceBoardInOneScreenMode(raceBoardPanel);
|
||||
}
|
||||
|
||||
private RaceDTO findRace(String regattaName, String raceName, List<RegattaDTO> regattas) {
|
||||
|
||||
+11
-24
@@ -8,6 +8,7 @@ import java.util.Map;
|
||||
|
||||
import com.google.gwt.dom.client.Style;
|
||||
import com.google.gwt.dom.client.Style.Unit;
|
||||
import com.google.gwt.dom.client.Style.VerticalAlign;
|
||||
import com.google.gwt.event.dom.client.ClickEvent;
|
||||
import com.google.gwt.event.dom.client.ClickHandler;
|
||||
import com.google.gwt.event.logical.shared.ValueChangeEvent;
|
||||
@@ -168,10 +169,14 @@ public class RaceBoardPanel extends SimplePanel implements RegattaDisplayer, Rac
|
||||
toolbarPanel.add(viewControlsPanel);
|
||||
|
||||
leaderboardPanel = createLeaderboardPanel(leaderboardName, leaderboardGroupName);
|
||||
createOneScreenView(leaderboardName, leaderboardGroupName, mainPanel);
|
||||
createOneScreenView(leaderboardName, leaderboardGroupName, mainPanel);
|
||||
getElement().getStyle().setMarginLeft(12, Unit.PX);
|
||||
getElement().getStyle().setMarginRight(12, Unit.PX);
|
||||
|
||||
|
||||
// add busy indicator to toolbar panel because the embedded leaderboard has no space for it
|
||||
toolbarPanel.add(leaderboardPanel.getBusyIndicator());
|
||||
leaderboardPanel.getBusyIndicator().getElement().getStyle().setVerticalAlign(VerticalAlign.MIDDLE);
|
||||
|
||||
CompetitorsFilterSets loadedCompetitorsFilterSets = loadCompetitorsFilterSets();
|
||||
if (loadedCompetitorsFilterSets != null) {
|
||||
competitorsFilterSets = loadedCompetitorsFilterSets;
|
||||
@@ -340,17 +345,14 @@ public class RaceBoardPanel extends SimplePanel implements RegattaDisplayer, Rac
|
||||
private void addCompetitorsFilterControl(Panel parentPanel) {
|
||||
String competitorsFilterTitle = stringMessages.competitorsFilter();
|
||||
competitorsFilterCheckBox = new CheckBox(competitorsFilterTitle);
|
||||
|
||||
competitorsFilterCheckBox.getElement().getStyle().setFloat(Style.Float.LEFT);
|
||||
|
||||
competitorsFilterCheckBox.setTitle(competitorsFilterTitle);
|
||||
competitorsFilterCheckBox.addStyleName("raceBoardNavigation-innerElement");
|
||||
|
||||
competitorsFilterCheckBox.addValueChangeHandler(new ValueChangeHandler<Boolean>() {
|
||||
@Override
|
||||
public void onValueChange(ValueChangeEvent<Boolean> newValue) {
|
||||
boolean isChecked = competitorsFilterCheckBox.getValue();
|
||||
if(isChecked) {
|
||||
if (isChecked) {
|
||||
if(lastActiveCompetitorFilterSet != null) {
|
||||
competitorsFilterSets.setActiveFilterSet(lastActiveCompetitorFilterSet);
|
||||
competitorSelectionModel.setCompetitorsFilterSet(competitorsFilterSets.getActiveFilterSet());
|
||||
@@ -365,9 +367,7 @@ public class RaceBoardPanel extends SimplePanel implements RegattaDisplayer, Rac
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
parentPanel.add(competitorsFilterCheckBox);
|
||||
|
||||
Button filterButton = new Button("");
|
||||
filterButton.addClickHandler(new ClickHandler() {
|
||||
@Override
|
||||
@@ -378,7 +378,6 @@ public class RaceBoardPanel extends SimplePanel implements RegattaDisplayer, Rac
|
||||
filterButton.addStyleName("raceBoardNavigation-filterButton");
|
||||
filterButton.getElement().getStyle().setFloat(Style.Float.LEFT);
|
||||
filterButton.setTitle(competitorsFilterTitle);
|
||||
|
||||
parentPanel.add(filterButton);
|
||||
}
|
||||
|
||||
@@ -510,11 +509,7 @@ public class RaceBoardPanel extends SimplePanel implements RegattaDisplayer, Rac
|
||||
* @param visible <code>true</code> if the leaderboard shall be open/visible
|
||||
*/
|
||||
public void setLeaderboardVisible(boolean visible) {
|
||||
switch (getConfiguration().getViewMode()) {
|
||||
case ONESCREEN:
|
||||
setComponentVisible(leaderboardAndMapViewer, leaderboardPanel, visible);
|
||||
break;
|
||||
}
|
||||
setComponentVisible(leaderboardAndMapViewer, leaderboardPanel, visible);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -526,11 +521,7 @@ public class RaceBoardPanel extends SimplePanel implements RegattaDisplayer, Rac
|
||||
* @param visible <code>true</code> if the wind chart shall be open/visible
|
||||
*/
|
||||
public void setWindChartVisible(boolean visible) {
|
||||
switch (getConfiguration().getViewMode()) {
|
||||
case ONESCREEN:
|
||||
setComponentVisible(leaderboardAndMapViewer, windChart, visible);
|
||||
break;
|
||||
}
|
||||
setComponentVisible(leaderboardAndMapViewer, windChart, visible);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -542,11 +533,7 @@ public class RaceBoardPanel extends SimplePanel implements RegattaDisplayer, Rac
|
||||
* @param visible <code>true</code> if the competitor chart shall be open/visible
|
||||
*/
|
||||
public void setCompetitorChartVisible(boolean visible) {
|
||||
switch (getConfiguration().getViewMode()) {
|
||||
case ONESCREEN:
|
||||
setComponentVisible(leaderboardAndMapViewer, competitorChart, visible);
|
||||
break;
|
||||
}
|
||||
setComponentVisible(leaderboardAndMapViewer, competitorChart, visible);
|
||||
}
|
||||
|
||||
public Panel getToolbarPanel() {
|
||||
|
||||
+2
-11
@@ -9,7 +9,6 @@ public class RaceBoardViewConfiguration {
|
||||
private boolean showLeaderboard;
|
||||
private boolean showWindChart;
|
||||
private boolean showCompetitorsChart;
|
||||
private ViewModes viewMode;
|
||||
private String activeCompetitorsFilterSetName;
|
||||
private boolean canReplayDuringLiveRaces;
|
||||
private final boolean autoSelectMedia;
|
||||
@@ -23,19 +22,15 @@ public class RaceBoardViewConfiguration {
|
||||
public static final String PARAM_CAN_REPLAY_DURING_LIVE_RACES = "canReplayDuringLiveRaces";
|
||||
public static final String PARAM_AUTOSELECT_MEDIA = "autoSelectMedia";
|
||||
|
||||
public static enum ViewModes { ONESCREEN };
|
||||
|
||||
public RaceBoardViewConfiguration() {
|
||||
viewMode = ViewModes.ONESCREEN;
|
||||
showLeaderboard = true;
|
||||
showWindChart = false;
|
||||
showCompetitorsChart = false;
|
||||
autoSelectMedia = false;
|
||||
}
|
||||
|
||||
public RaceBoardViewConfiguration(ViewModes viewMode, String activeCompetitorsFilterSetName,
|
||||
boolean showLeaderboard, boolean showWindChart, boolean showCompetitorsChart, boolean canReplayDuringLiveRaces, boolean autoSelectMedia) {
|
||||
this.viewMode = viewMode;
|
||||
public RaceBoardViewConfiguration(String activeCompetitorsFilterSetName, boolean showLeaderboard,
|
||||
boolean showWindChart, boolean showCompetitorsChart, boolean canReplayDuringLiveRaces, boolean autoSelectMedia) {
|
||||
this.activeCompetitorsFilterSetName = activeCompetitorsFilterSetName;
|
||||
this.showLeaderboard = showLeaderboard;
|
||||
this.showWindChart = showWindChart;
|
||||
@@ -56,10 +51,6 @@ public class RaceBoardViewConfiguration {
|
||||
return showCompetitorsChart;
|
||||
}
|
||||
|
||||
public ViewModes getViewMode() {
|
||||
return viewMode;
|
||||
}
|
||||
|
||||
public String getActiveCompetitorsFilterSetName() {
|
||||
return activeCompetitorsFilterSetName;
|
||||
}
|
||||
|
||||
+2
-2
@@ -44,8 +44,8 @@ public class TVEntryPoint extends AbstractEntryPoint {
|
||||
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, autoSelectMedia);
|
||||
raceboardViewConfig = new RaceBoardViewConfiguration(activeCompetitorsFilterSetName,
|
||||
showLeaderboard, showWindChart, showCompetitorsChart, /* canReplayWhileLiveIsPossible */ false, autoSelectMedia);
|
||||
|
||||
sailingService.getLeaderboardNames(new AsyncCallback<List<String>>() {
|
||||
@Override
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
<stringAttribute key="bootstrap" value=""/>
|
||||
<stringAttribute key="checked" value="[NONE]"/>
|
||||
<booleanAttribute key="clearConfig" value="false"/>
|
||||
<booleanAttribute key="com.sap.jvm.profiling.ui.widgets.allowDebugging" value="false"/>
|
||||
<stringAttribute key="configLocation" value="${workspace_loc}/target"/>
|
||||
<booleanAttribute key="default" value="true"/>
|
||||
<booleanAttribute key="default_auto_start" value="true"/>
|
||||
@@ -15,12 +16,18 @@
|
||||
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
|
||||
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/sapjvm7"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog -console -clean"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-ea -Declipse.ignoreApp=true -Dosgi.noShutdown=true -Dfile.encoding=cp1252 -Dexpedition.udp.port=2010 -Xmx6000m -Dhttp.proxyHost=proxy.wdf.sap.corp -Dhttp.proxyPort=8080 -Dhttps.proxyHost=proxy -Dhttps.proxyPort=8080 -Djetty.home=${project_loc:com.sap.sailing.server}/../target/configuration/jetty -Djava.util.logging.config.file=${project_loc:com.sap.sailing.server}/../target/configuration/logging_debug.properties -Dkiwo.results=${project_loc:com.sap.sailing.kiworesultimport.test}/resources -Dpersistentcompetitors.clear=false -XX:+UseMembar -Digtimi.client.id=7fcdd217e0aa16090edb4ad55b09ec43b2021090e209541fc9b7003c2a2b70c6 -Digtimi.client.secret=aa569cf4909bdc7b0e04b11873f3c4ea20687421e010fcc25b771cca9e6f3f9a -Digtimi.client.redirecturi=http://127.0.0.1:8888/igtimi/oauth/v1/authorizationcallback"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${workspace_loc}"/>
|
||||
<stringAttribute key="pde.version" value="3.3"/>
|
||||
<stringAttribute key="profilingTraceType-ALLOCATION_TRACE" value="KEY_APPLICATION_FILTER%CTX_KEY%*%CTX_ENTRY%KEY_INC_LINE_NRS%CTX_KEY%true%CTX_ENTRY%KEY_MAX_SIZE%CTX_KEY%65536%CTX_ENTRY%INCREASE_COUNT%CTX_KEY%8192%CTX_ENTRY%KEY_USER_FILTER%CTX_KEY%*%CTX_ENTRY%KEY_ID%CTX_KEY%false%CTX_ENTRY%KEY_MIN_SIZE%CTX_KEY%32%CTX_ENTRY%KEY_SESSION_FILTER%CTX_KEY%*%CTX_ENTRY%KEY_ENABLEMENT%CTX_KEY%false%CTX_ENTRY%CLASS_FILTER%CTX_KEY%*%CTX_ENTRY%KEY_REQUEST_FILTER%CTX_KEY%*%CTX_ENTRY%KEY_ADAPTIVE%CTX_KEY%false%CTX_ENTRY%KEY_JRUBY_SUPPORT%CTX_KEY%false%CTX_ENTRY%"/>
|
||||
<stringAttribute key="profilingTraceType-IO_TRACE" value="KEY_APPLICATION_FILTER%CTX_KEY%*%CTX_ENTRY%KEY_SESSION_FILTER%CTX_KEY%*%CTX_ENTRY%KEY_ENABLEMENT%CTX_KEY%false%CTX_ENTRY%KEY_USER_FILTER%CTX_KEY%*%CTX_ENTRY%KEY_REQUEST_FILTER%CTX_KEY%*%CTX_ENTRY%"/>
|
||||
<stringAttribute key="profilingTraceType-METHOD_PARAMETER_TRACE" value="KEY_APPLICATION_FILTER%CTX_KEY%*%CTX_ENTRY%KEY_SESSION_FILTER%CTX_KEY%*%CTX_ENTRY%KEY_ENABLEMENT%CTX_KEY%false%CTX_ENTRY%KEY_USER_FILTER%CTX_KEY%*%CTX_ENTRY%KEY_REQUEST_FILTER%CTX_KEY%*%CTX_ENTRY%"/>
|
||||
<stringAttribute key="profilingTraceType-NETWORK_TRACE" value="KEY_APPLICATION_FILTER%CTX_KEY%*%CTX_ENTRY%KEY_SESSION_FILTER%CTX_KEY%*%CTX_ENTRY%KEY_ENABLEMENT%CTX_KEY%false%CTX_ENTRY%KEY_USER_FILTER%CTX_KEY%*%CTX_ENTRY%KEY_REQUEST_FILTER%CTX_KEY%*%CTX_ENTRY%KEY_RESOLVE_ALL_HOSTS%CTX_KEY%true%CTX_ENTRY%"/>
|
||||
<stringAttribute key="profilingTraceType-PERFORMANCE_HOTSPOT_TRACE" value="KEY_IGNORE_SLEEPING_THREADS%CTX_KEY%true%CTX_ENTRY%KEY_APPLICATION_FILTER%CTX_KEY%*%CTX_ENTRY%KEY_SESSION_FILTER%CTX_KEY%*%CTX_ENTRY%KEY_ENABLEMENT%CTX_KEY%false%CTX_ENTRY%KEY_USER_FILTER%CTX_KEY%*%CTX_ENTRY%KEY_REQUEST_FILTER%CTX_KEY%*%CTX_ENTRY%"/>
|
||||
<stringAttribute key="profilingTraceType-SYNCHRONIZATION_TRACE" value="KEY_APPLICATION_FILTER%CTX_KEY%*%CTX_ENTRY%KEY_SESSION_FILTER%CTX_KEY%*%CTX_ENTRY%KEY_ENABLEMENT%CTX_KEY%false%CTX_ENTRY%KEY_USER_FILTER%CTX_KEY%*%CTX_ENTRY%KEY_REQUEST_FILTER%CTX_KEY%*%CTX_ENTRY%"/>
|
||||
<booleanAttribute key="show_selected_only" value="false"/>
|
||||
<stringAttribute key="target_bundles" value="com.rabbitmq.client@default:default,com.sun.jersey@default:default,com.sun.mail.javax.mail@default:default,javax.servlet*3.0.0.v201112011016@default:default,javax.validation@default:default,javax.ws.rs@default:default,jcl.over.slf4j@default:default,org.apache.activemq.activeio-core@default:default,org.apache.activemq.activemq-core@default:default,org.apache.activemq.kahadb@default:default,org.apache.commons.codec@default:default,org.apache.commons.fileupload@default:default,org.apache.commons.io@default:default,org.apache.commons.logging@default:default,org.apache.felix.gogo.command@default:default,org.apache.felix.gogo.runtime@default:default,org.apache.felix.gogo.shell@default:default,org.apache.geronimo.specs.geronimo-annotation_1.0_spec@default:default,org.apache.geronimo.specs.geronimo-j2ee-management_1.1_spec@default:default,org.apache.geronimo.specs.geronimo-jms_1.1_spec@default:default,org.apache.httpcomponents.httpclient@default:default,org.apache.httpcomponents.httpcore@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.console@default:default,org.eclipse.jetty.continuation@default:default,org.eclipse.jetty.deploy@default:default,org.eclipse.jetty.http@default:default,org.eclipse.jetty.io@default:default,org.eclipse.jetty.jmx@default:default,org.eclipse.jetty.osgi.boot@default:default,org.eclipse.jetty.security@default:default,org.eclipse.jetty.server@default:default,org.eclipse.jetty.servlet@default:default,org.eclipse.jetty.util@default:default,org.eclipse.jetty.webapp@default:default,org.eclipse.jetty.websocket.api@default:default,org.eclipse.jetty.websocket.client@default:default,org.eclipse.jetty.websocket.common@default:default,org.eclipse.jetty.websocket.server@default:default,org.eclipse.jetty.websocket.servlet@default:default,org.eclipse.jetty.xml@default:default,org.eclipse.osgi.services@default:default,org.eclipse.osgi@-1:true,org.jdom@default:default,org.objectweb.asm@default:default,rome@default:default,routeconverter@default:default,slf4j.api@default:default,slf4j.jdk14@default:false"/>
|
||||
<booleanAttribute key="tracing" value="false"/>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Create boat graphics for the 2D race viewer
|
||||
|
||||
This page describes how to create the SVG graphics for different boat classes which can be used by the 2D race viewer to draw boat graphics directly to a HTML Canvas.
|
||||
This page describes how to create the SVG graphics for different boat classes which can be used by the 2D race viewer to draw boat graphics directly to an HTML Canvas.
|
||||
|
||||
## Inkscape
|
||||
|
||||
@@ -18,7 +18,7 @@ To draw the boats later on the map with the right scale/size we also have to be
|
||||
|
||||
## Conversion of SVG graphics into a Canvas drawing commands
|
||||
|
||||
You can use the online tool 'SVG to HTML5 Canvas Converter' http://www.professorcloud.com/svg-to-canvas/) to convert the SVG graphics to a list of drawing commands. So for example a SVG line<br/>
|
||||
You can use the online tool 'SVG to HTML5 Canvas Converter' http://www.professorcloud.com/svg-to-canvas/ to convert the SVG graphics to a list of drawing commands. So for example a SVG line<br/>
|
||||
<line x1="1050" y1="651" x2="1050" y2="49" id="line75" /><br/>
|
||||
will be converted to something like<br/>
|
||||
ctx.beginPath();<br/>
|
||||
|
||||
Reference in New Issue
Block a user