mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-27 06:17:27 +00:00
removed Hoverline.map field
This commit is contained in:
1 parent
d1850350cb
commit
31a1b7fde3
3 files changed
+12
-14
No files matched your search
+1
-1
@@ -436,7 +436,7 @@ public interface StringMessages extends com.sap.sse.gwt.client.StringMessages, c
|
||||
String overallDetailsToShow();
|
||||
String hhmmssUnit();
|
||||
String actionAddWindData();
|
||||
String valueMustBeBetweenMinMax(String name, String minValue, String maxValue);
|
||||
String valueMustBeBetweenMinMax(String name, int minValue, int maxValue);
|
||||
String valueMustBeGreaterThan(String name, String minValue);
|
||||
String optional();
|
||||
String pleaseEnterAValue();
|
||||
|
||||
+5
-9
@@ -12,32 +12,28 @@ import com.google.gwt.maps.client.mvc.MVCArray;
|
||||
import com.google.gwt.maps.client.overlays.Polyline;
|
||||
import com.google.gwt.maps.client.overlays.PolylineOptions;
|
||||
|
||||
class Hoverline {
|
||||
public class Hoverline {
|
||||
private static final double TRANSPARENT = 0;
|
||||
private static final double VISIBLE = 0.2d;
|
||||
|
||||
private final Polyline hoverline;
|
||||
private final PolylineOptions options;
|
||||
private final RaceMap map;
|
||||
|
||||
public Hoverline(final Polyline polyline, PolylineOptions polylineOptions, RaceMap map) {
|
||||
this.map = map;
|
||||
public Hoverline(final Polyline polyline, PolylineOptions polylineOptions, final RaceMap map) {
|
||||
this.options = PolylineOptions.newInstance();
|
||||
this.options.setClickable(polylineOptions.getClickable());
|
||||
this.options.setGeodesic(polylineOptions.getGeodesic());
|
||||
this.options.setMap(polylineOptions.getMap());
|
||||
this.options.setPath(polyline.getPath());
|
||||
this.options.setStrokeColor(polylineOptions.getStrokeColor());
|
||||
this.options.setVisible(polylineOptions.getVisible());
|
||||
this.options.setZindex(polylineOptions.getZindex());
|
||||
this.hoverline = Polyline.newInstance(this.options);
|
||||
this.hoverline.setVisible(false);
|
||||
polyline.addMouseOverHandler(new MouseOverMapHandler() {
|
||||
@Override
|
||||
public void onEvent(MouseOverMapEvent event) {
|
||||
Hoverline.this.options.setStrokeOpacity(Hoverline.this.map.getSettings().getTransparentHoverlines() ? TRANSPARENT : VISIBLE);
|
||||
options.setStrokeWeight(Hoverline.this.map.getSettings().getHoverlineStrokeWeight());
|
||||
options.setMap(polyline.getMap());
|
||||
options.setPath(polyline.getPath());
|
||||
options.setStrokeOpacity(map.getSettings().getTransparentHoverlines() ? TRANSPARENT : VISIBLE);
|
||||
options.setStrokeWeight(map.getSettings().getHoverlineStrokeWeight());
|
||||
hoverline.setOptions(options);
|
||||
hoverline.setVisible(true);
|
||||
}
|
||||
|
||||
+6
-4
@@ -30,6 +30,8 @@ import com.sap.sse.gwt.client.dialog.DataEntryDialog.Validator;
|
||||
import com.sap.sse.gwt.client.shared.components.SettingsDialogComponent;
|
||||
|
||||
public class RaceMapSettingsDialogComponent implements SettingsDialogComponent<RaceMapSettings> {
|
||||
private static final int MAX_BUOY_ZONE_RADIUS_IN_METERS = 100;
|
||||
private static final int MAX_STROKE_WEIGHT = 33;
|
||||
//Initializing the lists to prevent a null pointer exception in the first validation call
|
||||
private List<Util.Pair<CheckBox, ManeuverType>> checkboxAndManeuverType = new ArrayList<Util.Pair<CheckBox, ManeuverType>>();
|
||||
private List<Util.Pair<CheckBox, ZoomTypes>> checkboxAndZoomType = new ArrayList<Util.Pair<CheckBox,ZoomTypes>>();
|
||||
@@ -320,10 +322,10 @@ public class RaceMapSettingsDialogComponent implements SettingsDialogComponent<R
|
||||
if (valueToValidate.getHelpLinesSettings().isVisible(HelpLineTypes.BOATTAILS) && valueToValidate.getTailLengthInMilliseconds() <= 0) {
|
||||
errorMessage = stringMessages.tailLengthMustBePositive();
|
||||
} else if (valueToValidate.getHelpLinesSettings().isVisible(HelpLineTypes.BUOYZONE)
|
||||
&& (valueToValidate.getBuoyZoneRadiusInMeters() < 0.0 || valueToValidate.getBuoyZoneRadiusInMeters() > 100.0)) {
|
||||
errorMessage = stringMessages.valueMustBeBetweenMinMax(stringMessages.buoyZone(), "0", "100");
|
||||
} else if (valueToValidate.getHoverlineStrokeWeight() < 0d || valueToValidate.getHoverlineStrokeWeight() > 33d) {
|
||||
errorMessage = stringMessages.valueMustBeBetweenMinMax(stringMessages.bufferLineStrokeWeight(), "0", "33");
|
||||
&& (valueToValidate.getBuoyZoneRadiusInMeters() < 0 || valueToValidate.getBuoyZoneRadiusInMeters() > MAX_BUOY_ZONE_RADIUS_IN_METERS)) {
|
||||
errorMessage = stringMessages.valueMustBeBetweenMinMax(stringMessages.buoyZone(), 0, 100);
|
||||
} else if (valueToValidate.getHoverlineStrokeWeight() < 0 || valueToValidate.getHoverlineStrokeWeight() > MAX_STROKE_WEIGHT) {
|
||||
errorMessage = stringMessages.valueMustBeBetweenMinMax(stringMessages.bufferLineStrokeWeight(), 0, MAX_STROKE_WEIGHT);
|
||||
}
|
||||
return errorMessage;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user