cleaned up variable naming

This commit is contained in:
Kai Boernert
2017-07-19 13:35:41 +02:00
parent cbcdbd01c4
commit 89f122c549
9 changed files with 29 additions and 29 deletions
@@ -167,7 +167,7 @@ public class StartAnalysisCard extends Composite implements HasWidgets, StartAna
defaultRaceMapSettings.isShowSelectedCompetitorsInfo(), defaultRaceMapSettings.isShowWindStreamletColors(),
defaultRaceMapSettings.isShowWindStreamletOverlay(), defaultRaceMapSettings.isShowSimulationOverlay(),
defaultRaceMapSettings.isShowMapControls(), defaultRaceMapSettings.getManeuverTypesToShow(),
defaultRaceMapSettings.isShowDouglasPeuckerPoints(), defaultRaceMapSettings.isShowTargetEstimation());
defaultRaceMapSettings.isShowDouglasPeuckerPoints(), defaultRaceMapSettings.isShowEstimatedDuration());
RaceTimesInfoProvider raceTimesInfoProvider = new RaceTimesInfoProvider(sailingServiceAsync,
@@ -53,7 +53,7 @@ public class CombinedWindPanel extends FlowPanel {
oldRaceMapSettings.isShowSelectedCompetitorsInfo(), oldRaceMapSettings.isShowWindStreamletColors(),
newShowStreamletsOverlaySetting, oldRaceMapSettings.isShowSimulationOverlay(),
oldRaceMapSettings.isShowMapControls(), oldRaceMapSettings.getManeuverTypesToShow(),
oldRaceMapSettings.isShowDouglasPeuckerPoints(), oldRaceMapSettings.isShowTargetEstimation());
oldRaceMapSettings.isShowDouglasPeuckerPoints(), oldRaceMapSettings.isShowEstimatedDuration());
map.updateSettings(newRaceMapSettings);
}
});
@@ -419,7 +419,7 @@ public class RaceMap extends AbstractCompositeComponent<RaceMapSettings> impleme
* {@link #showAdvantageLine(Iterable, Date, long)} drawing procedure} needs to be triggered.
*/
private CompetitorDTO advantageLineCompetitor;
protected Label targetEstimationOverlay;
protected Label estimatedDurationOverlay;
private RaceMapStyle raceMapStyle;
private class AdvantageLineUpdater implements QuickRanksListener {
@@ -952,7 +952,7 @@ public class RaceMap extends AbstractCompositeComponent<RaceMapSettings> impleme
asyncActionsExecutor.execute(new GetRaceMapDataAction(sailingService, competitorsByIdAsString,
race, useNullAsTimePoint() ? null : newTime, fromTimesForQuickCall, toTimesForQuickCall, /* extrapolate */true,
(settings.isShowSimulationOverlay() ? simulationOverlay.getLegIdentifier() : null),
raceCompetitorSet.getMd5OfIdsAsStringOfCompetitorParticipatingInRaceInAlphanumericOrderOfTheirID(), newTime, settings.isShowTargetEstimation()),
raceCompetitorSet.getMd5OfIdsAsStringOfCompetitorParticipatingInRaceInAlphanumericOrderOfTheirID(), newTime, settings.isShowEstimatedDuration()),
GET_RACE_MAP_DATA_CATEGORY,
getRaceMapDataCallback(newTime, transitionTimeInMillis, fromAndToAndOverlap.getC(), competitorsToShow, ++boatPositionRequestIDCounter));
// next, if necessary, do the full thing; the two calls have different action classes, so throttling should not drop one for the other
@@ -1049,7 +1049,7 @@ public class RaceMap extends AbstractCompositeComponent<RaceMapSettings> impleme
zoomMapToNewBounds(zoomToBounds);
mapFirstZoomDone = true;
updateTargetEstimation(raceMapDataDTO.estimatedDuration);
updateEstimatedDuration(raceMapDataDTO.estimatedDuration);
}
} else {
lastTimeChangeBeforeInitialization = newTime;
@@ -1058,16 +1058,16 @@ public class RaceMap extends AbstractCompositeComponent<RaceMapSettings> impleme
});
}
protected void updateTargetEstimation(Duration estimatedDuration) {
protected void updateEstimatedDuration(Duration estimatedDuration) {
if (estimatedDuration == null) {
return;
}
if (targetEstimationOverlay == null) {
targetEstimationOverlay = new Label("");
targetEstimationOverlay.setStyleName(raceMapStyle.estimatedTargettime());
map.setControls(ControlPosition.TOP_CENTER, targetEstimationOverlay);
if (estimatedDurationOverlay == null) {
estimatedDurationOverlay = new Label("");
estimatedDurationOverlay.setStyleName(raceMapStyle.estimatedTargettime());
map.setControls(ControlPosition.TOP_CENTER, estimatedDurationOverlay);
}
targetEstimationOverlay.setText(stringMessages.estimatedDuration()
estimatedDurationOverlay.setText(stringMessages.estimatedDuration()
+ " " + DateAndTimeFormatterUtil.formatElapsedTime(estimatedDuration.asMillis()));
}
@@ -2599,8 +2599,8 @@ public class RaceMap extends AbstractCompositeComponent<RaceMapSettings> impleme
if (!newSettings.getHelpLinesSettings().equals(settings.getHelpLinesSettings())) {
requiresRedraw = true;
}
if (!newSettings.isShowTargetEstimation() && targetEstimationOverlay != null){
targetEstimationOverlay.removeFromParent();
if (!newSettings.isShowEstimatedDuration() && estimatedDurationOverlay != null){
estimatedDurationOverlay.removeFromParent();
}
if (newSettings.isShowWindStreamletOverlay() != settings.isShowWindStreamletOverlay()) {
streamletOverlay.setVisible(newSettings.isShowWindStreamletOverlay());
@@ -2615,8 +2615,8 @@ public class RaceMap extends AbstractCompositeComponent<RaceMapSettings> impleme
requiresUpdateCoordinateSystem = true;
requiresRedraw = true;
}
if (!newSettings.isShowTargetEstimation() && targetEstimationOverlay != null){
targetEstimationOverlay.removeFromParent();
if (!newSettings.isShowEstimatedDuration() && estimatedDurationOverlay != null){
estimatedDurationOverlay.removeFromParent();
}
this.settings = newSettings;
@@ -53,7 +53,7 @@ public class RaceMapLifecycle implements ComponentLifecycle<RaceMapSettings> {
settings.isShowOnlySelectedCompetitors(), settings.isShowSelectedCompetitorsInfo(),
settings.isShowWindStreamletColors(), settings.isShowWindStreamletOverlay(),
settings.isShowSimulationOverlay(), settings.isShowMapControls(), settings.getManeuverTypesToShow(),
settings.isShowDouglasPeuckerPoints(), settings.isShowTargetEstimation());
settings.isShowDouglasPeuckerPoints(), settings.isShowEstimatedDuration());
}
@Override
@@ -65,6 +65,6 @@ public class RaceMapLifecycle implements ComponentLifecycle<RaceMapSettings> {
settings.isShowOnlySelectedCompetitors(), settings.isShowSelectedCompetitorsInfo(),
settings.isShowWindStreamletColors(), settings.isShowWindStreamletOverlay(),
settings.isShowSimulationOverlay(), settings.isShowMapControls(), settings.getManeuverTypesToShow(),
settings.isShowDouglasPeuckerPoints(), settings.isShowTargetEstimation());
settings.isShowDouglasPeuckerPoints(), settings.isShowEstimatedDuration());
}
}
@@ -69,7 +69,7 @@ public class RaceMapSettings extends AbstractGenericSerializableSettings {
*/
private BooleanSetting windUp;
private BooleanSetting showEstimatedRaceEnd;
private BooleanSetting showEstimatedDuration;
@Override
protected void addChildSettings() {
@@ -88,7 +88,7 @@ public class RaceMapSettings extends AbstractGenericSerializableSettings {
showSelectedCompetitorsInfo = new BooleanSetting("showSelectedCompetitorsInfo", this, true);
maneuverTypesToShow = new EnumSetSetting<>("maneuverTypesToShow", this, getDefaultManeuvers(), ManeuverType::valueOf);
showDouglasPeuckerPoints = new BooleanSetting("showDouglasPeuckerPoints", this, false);
showEstimatedRaceEnd = new BooleanSetting("showEstimatedRaceEnd", this, false);
showEstimatedDuration = new BooleanSetting("showEstimatedDuration", this, false);
}
public RaceMapSettings() {
@@ -99,7 +99,7 @@ public class RaceMapSettings extends AbstractGenericSerializableSettings {
Distance buoyZoneRadius, Boolean showOnlySelectedCompetitors, Boolean showSelectedCompetitorsInfo,
Boolean showWindStreamletColors, Boolean showWindStreamletOverlay, Boolean showSimulationOverlay,
Boolean showMapControls, Collection<ManeuverType> maneuverTypesToShow, Boolean showDouglasPeuckerPoints,
Boolean showEstimatedRaceEnd) {
Boolean showEstimatedDuration) {
this.zoomSettings.init(zoomSettings);
this.helpLinesSettings.init(helpLinesSettings);
this.transparentHoverlines.setValue(transparentHoverlines);
@@ -115,7 +115,7 @@ public class RaceMapSettings extends AbstractGenericSerializableSettings {
this.showMapControls.setValue(showMapControls);
this.maneuverTypesToShow.setValues(maneuverTypesToShow);
this.showDouglasPeuckerPoints.setValue(showDouglasPeuckerPoints);
this.showEstimatedRaceEnd.setValue(showEstimatedRaceEnd);
this.showEstimatedDuration.setValue(showEstimatedDuration);
}
public static RaceMapSettings getDefaultWithShowMapControls(boolean showMapControlls) {
@@ -176,7 +176,7 @@ public class RaceMapSettings extends AbstractGenericSerializableSettings {
settings.isShowSelectedCompetitorsInfo(), settings.isShowWindStreamletColors(),
settings.isShowWindStreamletOverlay(), settings.isShowSimulationOverlay(), settings.isShowMapControls(),
settings.getManeuverTypesToShow(), settings.isShowDouglasPeuckerPoints(),
settings.isShowTargetEstimation());
settings.isShowEstimatedDuration());
}
/**
@@ -258,7 +258,7 @@ public class RaceMapSettings extends AbstractGenericSerializableSettings {
settings.isShowWindStreamletOverlay(),
settings.isShowSimulationOverlay(), settings.isShowMapControls(),
settings.getManeuverTypesToShow(),
settings.isShowDouglasPeuckerPoints(),settings.isShowTargetEstimation());
settings.isShowDouglasPeuckerPoints(),settings.isShowEstimatedDuration());
return newRaceMapSettings;
}
@@ -296,7 +296,7 @@ public class RaceMapSettings extends AbstractGenericSerializableSettings {
return Util.createSet(maneuverTypesToShow.getValues());
}
public boolean isShowTargetEstimation() {
return showEstimatedRaceEnd.getValue();
public boolean isShowEstimatedDuration() {
return showEstimatedDuration.getValue();
}
}
@@ -100,7 +100,7 @@ public class RaceMapSettingsDialogComponent implements SettingsDialogComponent<R
showTargetEstimation = dialog.createCheckbox(stringMessages.showTargetEstimation());
showTargetEstimation.ensureDebugId("showTargetEstimationCheckBox");
showTargetEstimation.setValue(initialSettings.isShowTargetEstimation());
showTargetEstimation.setValue(initialSettings.isShowEstimatedDuration());
vp.add(showTargetEstimation);
if (isSimulationEnabled) {
@@ -53,7 +53,7 @@ public class TrueNorthIndicatorPanel extends FlowPanel {
oldRaceMapSettings.isShowSelectedCompetitorsInfo(), oldRaceMapSettings.isShowWindStreamletColors(),
oldRaceMapSettings.isShowWindStreamletOverlay(), oldRaceMapSettings.isShowSimulationOverlay(),
oldRaceMapSettings.isShowMapControls(), oldRaceMapSettings.getManeuverTypesToShow(),
oldRaceMapSettings.isShowDouglasPeuckerPoints(), oldRaceMapSettings.isShowTargetEstimation());
oldRaceMapSettings.isShowDouglasPeuckerPoints(), oldRaceMapSettings.isShowEstimatedDuration());
map.updateSettings(newRaceMapSettings);
}
});
@@ -81,7 +81,7 @@ public class StartAnalysisMode extends RaceBoardModeWithPerRaceCompetitors {
defaultSettings.isShowMapControls(),
defaultSettings.getManeuverTypesToShow(),
defaultSettings.isShowDouglasPeuckerPoints(),
defaultSettings.isShowTargetEstimation());
defaultSettings.isShowEstimatedDuration());
((RaceBoardComponentContext) raceMap.getComponentContext()).addModesPatching(raceMap, additiveSettings, new OnSettingsReloadedCallback<RaceMapSettings>() {
@@ -77,7 +77,7 @@ public class WinningLanesMode extends RaceBoardModeWithPerRaceCompetitors {
defaultSettings.isShowMapControls(),
defaultSettings.getManeuverTypesToShow(),
defaultSettings.isShowDouglasPeuckerPoints(),
defaultSettings.isShowTargetEstimation());
defaultSettings.isShowEstimatedDuration());
((RaceBoardComponentContext) raceMap.getComponentContext()).addModesPatching(raceMap, additiveSettings, new OnSettingsReloadedCallback<RaceMapSettings>() {