mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-09 13:50:57 +00:00
Merge branch 'master' into ubilabs--rcapp--develop
This commit is contained in:
commit
beb63078b5
10 files changed
+39
-16
No files matched your search
+4
-5
@@ -40,8 +40,6 @@ public class DeviceConfigurationDetailComposite extends Composite {
|
||||
void onCloneRequested(DeviceConfigurationMatcherDTO matcher, DeviceConfigurationDTO configuration);
|
||||
}
|
||||
|
||||
private static List<String> suggestedCourseNames = Arrays.asList("Upwind", "Downwind");
|
||||
|
||||
private final AdminConsoleResources resources = GWT.create(AdminConsoleResources.class);
|
||||
|
||||
protected final SailingServiceAsync sailingService;
|
||||
@@ -82,7 +80,7 @@ public class DeviceConfigurationDetailComposite extends Composite {
|
||||
captionPanel = new CaptionPanel(stringMessages.configuration());
|
||||
VerticalPanel verticalPanel = new VerticalPanel();
|
||||
contentPanel = new VerticalPanel();
|
||||
cloneButton = new Button(stringMessages.save() + " + " + "Clone");
|
||||
cloneButton = new Button(stringMessages.save() + " + " + stringMessages.clone());
|
||||
cloneButton.addClickHandler(new ClickHandler() {
|
||||
@Override
|
||||
public void onClick(ClickEvent event) {
|
||||
@@ -196,7 +194,7 @@ public class DeviceConfigurationDetailComposite extends Composite {
|
||||
protected void setupIdentifier(Grid grid, int gridRow) {
|
||||
identifierBox = new TextBox();
|
||||
identifierBox.setWidth("80%");
|
||||
identifierBox.setText(DeviceConfigurationPanel.renderIdentifiers(matcher.clients));
|
||||
identifierBox.setText(DeviceConfigurationPanel.renderIdentifiers(matcher.clients, stringMessages));
|
||||
identifierBox.setReadOnly(true);
|
||||
|
||||
grid.setWidget(gridRow, 0, new Label("Identifier"));
|
||||
@@ -220,6 +218,7 @@ public class DeviceConfigurationDetailComposite extends Composite {
|
||||
List<String> initialValues = originalConfiguration.byNameDesignerCourseNames == null ? Collections
|
||||
.<String> emptyList() : originalConfiguration.byNameDesignerCourseNames;
|
||||
|
||||
List<String> suggestedCourseNames = Arrays.asList(stringMessages.upWind(), stringMessages.downWind());
|
||||
courseNamesList = new StringListEditorComposite(initialValues, stringMessages, stringMessages.courseNames(), IconResources.INSTANCE.removeIcon(), suggestedCourseNames,
|
||||
stringMessages.enterCourseName());
|
||||
courseNamesList.setWidth("80%");
|
||||
@@ -248,7 +247,7 @@ public class DeviceConfigurationDetailComposite extends Composite {
|
||||
private void markAsDirty(boolean dirty) {
|
||||
if (dirty) {
|
||||
if (captionPanel.getCaptionText().equals(stringMessages.configuration())) {
|
||||
captionPanel.setCaptionText(stringMessages.configuration() + "* (CHANGED)");
|
||||
captionPanel.setCaptionText(stringMessages.configuration() + "* ("+stringMessages.changed()+")");
|
||||
}
|
||||
} else {
|
||||
if (!captionPanel.getCaptionText().equals(stringMessages.configuration())) {
|
||||
|
||||
+4
-4
@@ -39,7 +39,7 @@ public class DeviceConfigurationListComposite extends Composite {
|
||||
|
||||
private final SailingServiceAsync sailingService;
|
||||
private final ErrorReporter errorReporter;
|
||||
private final StringMessages stringMessages;
|
||||
protected final StringMessages stringMessages;
|
||||
|
||||
public DeviceConfigurationListComposite(final SailingServiceAsync sailingService,
|
||||
final SelectionProvider<DeviceConfigurationMatcherDTO> selectionProvider,
|
||||
@@ -130,7 +130,7 @@ public class DeviceConfigurationListComposite extends Composite {
|
||||
new TextColumn<DeviceConfigurationMatcherDTO>() {
|
||||
@Override
|
||||
public String getValue(DeviceConfigurationMatcherDTO identifier) {
|
||||
return DeviceConfigurationPanel.renderIdentifiers(identifier.clients);
|
||||
return DeviceConfigurationPanel.renderIdentifiers(identifier.clients, stringMessages);
|
||||
}
|
||||
};
|
||||
identifierNameColumn.setSortable(true);
|
||||
@@ -141,8 +141,8 @@ public class DeviceConfigurationListComposite extends Composite {
|
||||
}
|
||||
});
|
||||
|
||||
table.addColumn(identifierTypeColumn, "Matcher");
|
||||
table.addColumn(identifierNameColumn, "Device");
|
||||
table.addColumn(identifierTypeColumn, stringMessages.matcher());
|
||||
table.addColumn(identifierNameColumn, stringMessages.device());
|
||||
return table;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -28,11 +28,11 @@ import com.sap.sse.gwt.client.dialog.DataEntryDialog.Validator;
|
||||
|
||||
public class DeviceConfigurationPanel extends SimplePanel implements SelectionChangeListener<DeviceConfigurationMatcherDTO>, DeviceConfigurationCloneListener {
|
||||
|
||||
public static String renderIdentifiers(List<String> clientIdentifiers) {
|
||||
public static String renderIdentifiers(List<String> clientIdentifiers, StringMessages stringMessages) {
|
||||
if (clientIdentifiers.size() == 1) {
|
||||
return clientIdentifiers.get(0);
|
||||
} else if (clientIdentifiers.size() == 0) {
|
||||
return "[ANY]";
|
||||
return "["+stringMessages.any()+"]";
|
||||
} else {
|
||||
return clientIdentifiers.toString();
|
||||
}
|
||||
|
||||
+2
-2
@@ -34,7 +34,7 @@ public class DeviceConfigurationUserListComposite extends DeviceConfigurationLis
|
||||
new TextColumn<DeviceConfigurationMatcherDTO>() {
|
||||
@Override
|
||||
public String getValue(DeviceConfigurationMatcherDTO identifier) {
|
||||
return DeviceConfigurationPanel.renderIdentifiers(identifier.clients);
|
||||
return DeviceConfigurationPanel.renderIdentifiers(identifier.clients, stringMessages);
|
||||
}
|
||||
};
|
||||
identifierNameColumn.setSortable(true);
|
||||
@@ -45,7 +45,7 @@ public class DeviceConfigurationUserListComposite extends DeviceConfigurationLis
|
||||
}
|
||||
});
|
||||
|
||||
table.addColumn(identifierNameColumn, "Device");
|
||||
table.addColumn(identifierNameColumn, stringMessages.device());
|
||||
return table;
|
||||
}
|
||||
|
||||
|
||||
+4
@@ -1267,4 +1267,8 @@ public interface StringMessages extends com.sap.sse.gwt.client.StringMessages, c
|
||||
String competitorsCount(@PluralCount(DefaultRule_1_0n.class) int count);
|
||||
String trackedRacesCount(@PluralCount(DefaultRule_1_0n.class) int count);
|
||||
String eventsCount(@PluralCount(DefaultRule_1_0n.class) int count);
|
||||
String clone();
|
||||
String changed();
|
||||
String matcher();
|
||||
String any();
|
||||
}
|
||||
+4
@@ -1235,3 +1235,7 @@ eventsCount={0,number} events
|
||||
eventsCount[one]={0,number} event
|
||||
competitorsCount={0,number} competitors
|
||||
competitorsCount[one]={0,number} competitor
|
||||
clone=Clone
|
||||
changed=Changed
|
||||
matcher=Matcher
|
||||
any=Any
|
||||
+5
-1
@@ -1224,6 +1224,10 @@ trackedRacesCount[one]={0,number} tracked race
|
||||
eventsCount={0,number} events
|
||||
eventsCount[one]={0,number} event
|
||||
competitorsCount={0,number} competitors
|
||||
competitorsCount[one]={0,number} competitor�
|
||||
competitorsCount[one]={0,number} competitor�
|
||||
dashboardWindBotLoadingText=Loading wind bot data ...
|
||||
dashboardWindBotLoadingMessage=Depending on your connection this operation might take some minutes to complete the first time.
|
||||
clone=Clone
|
||||
changed=Changed
|
||||
matcher=Matcher
|
||||
any=Any
|
||||
+4
@@ -1225,3 +1225,7 @@ eventsCount={0,number} Veranstaltungen
|
||||
eventsCount[one]={0,number} Veranstaltung
|
||||
competitorsCount={0,number} Teams
|
||||
competitorsCount[one]={0,number} Team
|
||||
clone=Clone
|
||||
changed=Changed
|
||||
matcher=Matcher
|
||||
any=Any
|
||||
+4
@@ -1174,3 +1174,7 @@ eventsCount={0,number} events
|
||||
eventsCount[one]={0,number} event
|
||||
competitorsCount={0,number} competitors
|
||||
competitorsCount[one]={0,number} competitor
|
||||
clone=Clone
|
||||
changed=Changed
|
||||
matcher=Matcher
|
||||
any=Any
|
||||
+6
-2
@@ -442,8 +442,12 @@ public class WindGridCanvasOverlay extends FullCanvasOverlay implements TimeList
|
||||
}
|
||||
|
||||
private Position getCenter(final Position a, final Position b, final Position c, final Position d) {
|
||||
final Position center = new DegreePosition((a.getLatDeg() + b.getLatDeg() + c.getLatDeg() + d.getLatDeg()) / 4.0,
|
||||
(a.getLngDeg() + b.getLngDeg() + c.getLngDeg() + d.getLngDeg()) / 4.0);
|
||||
// center longitudes on position a, to ensure consistency on date line
|
||||
double aLng = (a.getLngDeg() + 180) % 360.0 - 180;
|
||||
double bLng = (b.getLngDeg() - aLng + 180) % 360.0 - 180;
|
||||
double cLng = (c.getLngDeg() - aLng + 180) % 360.0 - 180;
|
||||
double dLng = (d.getLngDeg() - aLng + 180) % 360.0 - 180;
|
||||
final Position center = new DegreePosition((a.getLatDeg() + b.getLatDeg() + c.getLatDeg() + d.getLatDeg()) / 4.0, aLng + (bLng + cLng + dLng) / 4.0);
|
||||
return center;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user