mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-02 18:33:54 +00:00
Fixed Bug 1135: Check the default handling of the recently changed switch statements. For more information see comment 2 in the bug
This commit is contained in:
1 parent
c5ce10262c
commit
5bfd2946fe
5 files changed
+9
-7
No files matched your search
-1
@@ -88,7 +88,6 @@ public interface StringMessages extends Messages {
|
||||
String windwardDistanceToGoInMeters();
|
||||
String windwardDistanceToLeaderInMeters();
|
||||
String windwardDistanceToGoInMetersUnit();
|
||||
String raceRankUnit();
|
||||
String name();
|
||||
String leaveEmptyForDefault();
|
||||
String trackNewEvent();
|
||||
|
||||
-1
@@ -83,7 +83,6 @@ velocityMadeGoodInKnotsUnit=kts
|
||||
windwardDistanceToGoInMeters=Windward distance to go
|
||||
windwardDistanceToLeaderInMeters=Windward Distance To Leader
|
||||
windwardDistanceToGoInMetersUnit=m
|
||||
raceRankUnit=rank
|
||||
name=Name
|
||||
leaveEmptyForDefault=Leave empty for default
|
||||
trackNewEvent=Track New event
|
||||
|
||||
-1
@@ -83,7 +83,6 @@ velocityMadeGoodInKnotsUnit=kn
|
||||
windwardDistanceToGoInMeters=Abstand in Windrichtung zur nächsten Tonne
|
||||
windwardDistanceToLeaderInMeters=Abstand zum führenden Boot
|
||||
windwardDistanceToGoInMetersUnit=m
|
||||
raceRankUnit=Rang
|
||||
name=Name
|
||||
leaveEmptyForDefault=Leer für Standardeinstellung
|
||||
trackNewEvent=Track New event
|
||||
|
||||
+6
-4
@@ -377,10 +377,11 @@ public abstract class AbstractChartPanel<SettingsType extends ChartSettings> ext
|
||||
detailTypeUnit = getStringMessages().windwardDistanceToGoInMetersUnit();
|
||||
break;
|
||||
case RACE_RANK:
|
||||
detailTypeUnit = getStringMessages().raceRankUnit();
|
||||
//Case for detail types without unit, so that an empty string is returned.
|
||||
break;
|
||||
default:
|
||||
// throw new UnsupportedOperationException("Theres currently no support for the enum value '" + getSelectedDetailType() + "' in this method.");
|
||||
//Throwing an exception to get notificated if an implementation of an detail type is missing.
|
||||
throw new UnsupportedOperationException("Theres currently no support for the enum value '" + getSelectedDetailType() + "' in this method.");
|
||||
}
|
||||
return detailTypeUnit;
|
||||
}
|
||||
@@ -501,11 +502,12 @@ public abstract class AbstractChartPanel<SettingsType extends ChartSettings> ext
|
||||
}
|
||||
chart.setTitle(new ChartTitle().setText(DetailTypeFormatter.format(selectedDetailType, stringMessages)), null);
|
||||
final String unit = getDetailTypeUnit();
|
||||
final String label = unit.isEmpty() ? "" : "[" + unit + "]";
|
||||
if (!compactChart) {
|
||||
chart.getYAxis().setAxisTitleText(
|
||||
DetailTypeFormatter.format(selectedDetailType, stringMessages) + " [" + unit + "]");
|
||||
DetailTypeFormatter.format(selectedDetailType, stringMessages) + " " + label);
|
||||
} else {
|
||||
chart.getYAxis().setAxisTitleText("[" + unit + "]");
|
||||
chart.getYAxis().setAxisTitleText(label);
|
||||
}
|
||||
chart.getYAxis().setReversed(
|
||||
selectedDetailType == DetailType.WINDWARD_DISTANCE_TO_OVERALL_LEADER || selectedDetailType == DetailType.GAP_TO_LEADER_IN_SECONDS);
|
||||
|
||||
+3
@@ -412,6 +412,7 @@ public class RaceMap extends AbsolutePanel implements TimeListener, CompetitorSe
|
||||
List<String> windSourceTypeNames = new ArrayList<String>();
|
||||
windSourceTypeNames.add(WindSourceType.EXPEDITION.name());
|
||||
windSourceTypeNames.add(WindSourceType.COMBINED.name());
|
||||
|
||||
GetWindInfoAction getWindInfoAction = new GetWindInfoAction(sailingService, race, date, 1000L, 1, windSourceTypeNames,
|
||||
new AsyncCallback<WindInfoForRaceDTO>() {
|
||||
@Override
|
||||
@@ -439,6 +440,8 @@ public class RaceMap extends AbsolutePanel implements TimeListener, CompetitorSe
|
||||
}
|
||||
break;
|
||||
default:
|
||||
//Which wind sources are requested is defined in a list above this action.
|
||||
//So we throw here an exception to notice a missing source.
|
||||
throw new UnsupportedOperationException("Theres currently no support for the enum value '" + windSource.getType() + "' in this method.");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user