mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-12 07:10:55 +00:00
fixed Double box creation in DataEntryDialog to also accept null/Double instead of double only
This commit is contained in:
1 parent
ba1fceecaa
commit
39c22eee86
3 files changed
+5
-4
No files matched your search
+3
-2
@@ -132,8 +132,9 @@ public class CompetitorEditDialog extends DataEntryDialog<CompetitorDTO> {
|
||||
this.imageUrlAndUploadComposite = new URLFieldWithFileUpload(stringMessages);
|
||||
this.imageUrlAndUploadComposite.setURL(competitorToEdit.getImageURL());
|
||||
this.timeOnTimeFactor = createDoubleBox(competitorToEdit.getTimeOnTimeFactor(), 10);
|
||||
this.timeOnDistanceAllowanceInSecondsPerNauticalMile = createDoubleBox(competitorToEdit
|
||||
.getTimeOnDistanceAllowancePerNauticalMile().asSeconds(), 10);
|
||||
this.timeOnDistanceAllowanceInSecondsPerNauticalMile = createDoubleBox(
|
||||
competitorToEdit.getTimeOnDistanceAllowancePerNauticalMile() == null ? null : competitorToEdit
|
||||
.getTimeOnDistanceAllowancePerNauticalMile().asSeconds(), 10);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+1
-1
@@ -184,7 +184,7 @@ public class RaceMapSettingsDialogComponent implements SettingsDialogComponent<R
|
||||
buoyZoneRadiusLabel.getElement().getStyle().setMarginLeft(25, Unit.PX);
|
||||
buoyZoneSettingsPanel.add(buoyZoneRadiusLabel);
|
||||
buoyZoneSettingsPanel.setCellVerticalAlignment(buoyZoneRadiusLabel, HasVerticalAlignment.ALIGN_MIDDLE);
|
||||
buoyZoneRadiusBox = dialog.createDoubleBox((int) (initialSettings.getBuoyZoneRadiusInMeters()), 4);
|
||||
buoyZoneRadiusBox = dialog.createDoubleBox(Double.valueOf((int) (initialSettings.getBuoyZoneRadiusInMeters())), 4);
|
||||
buoyZoneRadiusBox.setEnabled(initialSettings.getHelpLinesSettings().isVisible(HelpLineTypes.BOATTAILS));
|
||||
buoyZoneSettingsPanel.add(buoyZoneRadiusBox);
|
||||
buoyZoneSettingsPanel.setCellVerticalAlignment(buoyZoneRadiusBox, HasVerticalAlignment.ALIGN_MIDDLE);
|
||||
|
||||
@@ -266,7 +266,7 @@ public abstract class DataEntryDialog<T> {
|
||||
return longBox;
|
||||
}
|
||||
|
||||
public DoubleBox createDoubleBox(double initialValue, int visibleLength) {
|
||||
public DoubleBox createDoubleBox(Double initialValue, int visibleLength) {
|
||||
return createDoubleBoxInternal(initialValue, visibleLength);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user