mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-08 21:30:57 +00:00
also forward firstColumnIsNonDiscardableCarryForward value from regatta/series creation dialog
This commit is contained in:
1 parent
6ae9dab196
commit
984dd3ef3f
4 files changed
+15
-6
No files matched your search
+3
-3
@@ -117,9 +117,9 @@ public class RegattaStructureManagementPanel extends SimplePanel implements Rega
|
||||
private void createNewRegatta(final RegattaDTO newRegatta) {
|
||||
LinkedHashMap<String, SeriesCreationParametersDTO> seriesStructure = new LinkedHashMap<String, SeriesCreationParametersDTO>();
|
||||
for (SeriesDTO seriesDTO : newRegatta.series) {
|
||||
SeriesCreationParametersDTO seriesPair =
|
||||
new SeriesCreationParametersDTO(
|
||||
seriesDTO.getFleets(), seriesDTO.isMedal(), seriesDTO.isStartsWithZeroScore(), seriesDTO.isFirstColumnIsNonDiscardableCarryForward(), seriesDTO.getDiscardThresholds());
|
||||
SeriesCreationParametersDTO seriesPair = new SeriesCreationParametersDTO(seriesDTO.getFleets(),
|
||||
seriesDTO.isMedal(), seriesDTO.isStartsWithZeroScore(),
|
||||
seriesDTO.isFirstColumnIsNonDiscardableCarryForward(), seriesDTO.getDiscardThresholds());
|
||||
seriesStructure.put(seriesDTO.getName(), seriesPair);
|
||||
}
|
||||
sailingService.createRegatta(newRegatta.getName(), newRegatta.boatClass==null?null:newRegatta.boatClass.getName(),
|
||||
|
||||
+7
-3
@@ -34,6 +34,7 @@ public class SeriesWithFleetsCreateDialog extends DataEntryDialog<SeriesDTO> {
|
||||
private TextBox nameEntryField;
|
||||
private CheckBox isMedalSeriesCheckbox;
|
||||
private CheckBox startsWithZeroScoreCheckbox;
|
||||
private CheckBox firstColumnIsNonDiscardableCarryForwardCheckbox;
|
||||
private CheckBox useSeriesResultDiscardingThresholdsCheckbox;
|
||||
private DiscardThresholdBoxes discardThresholdBoxes;
|
||||
|
||||
@@ -111,6 +112,7 @@ public class SeriesWithFleetsCreateDialog extends DataEntryDialog<SeriesDTO> {
|
||||
nameEntryField.setVisibleLength(40);
|
||||
isMedalSeriesCheckbox = createCheckbox(stringMessages.medalSeries());
|
||||
startsWithZeroScoreCheckbox = createCheckbox(stringMessages.startsWithZeroScore());
|
||||
firstColumnIsNonDiscardableCarryForwardCheckbox = createCheckbox(stringMessages.firstRaceIsNonDiscardableCarryForward());
|
||||
useSeriesResultDiscardingThresholdsCheckbox = createCheckbox(stringMessages.seriesDefinesResultDiscardingRule());
|
||||
useSeriesResultDiscardingThresholdsCheckbox.addValueChangeHandler(new ValueChangeHandler<Boolean>() {
|
||||
@Override
|
||||
@@ -181,6 +183,7 @@ public class SeriesWithFleetsCreateDialog extends DataEntryDialog<SeriesDTO> {
|
||||
series.setName(nameEntryField.getText());
|
||||
series.setMedal(isMedalSeriesCheckbox.getValue());
|
||||
series.setStartsWithZeroScore(startsWithZeroScoreCheckbox.getValue());
|
||||
series.setFirstColumnIsNonDiscardableCarryForward(firstColumnIsNonDiscardableCarryForwardCheckbox.getValue());
|
||||
List<FleetDTO> fleets = new ArrayList<FleetDTO>();
|
||||
int fleetsCount = fleetNameEntryFields.size();
|
||||
for(int i = 0; i < fleetsCount; i++) {
|
||||
@@ -222,14 +225,15 @@ public class SeriesWithFleetsCreateDialog extends DataEntryDialog<SeriesDTO> {
|
||||
if (additionalWidget != null) {
|
||||
panel.add(additionalWidget);
|
||||
}
|
||||
Grid formGrid = new Grid(5, 2);
|
||||
Grid formGrid = new Grid(6, 2);
|
||||
panel.add(formGrid);
|
||||
formGrid.setWidget(0, 0, new Label(stringMessages.name() + ":"));
|
||||
formGrid.setWidget(0, 1, nameEntryField);
|
||||
formGrid.setWidget(1, 1, isMedalSeriesCheckbox);
|
||||
formGrid.setWidget(2, 1, startsWithZeroScoreCheckbox);
|
||||
formGrid.setWidget(3, 1, useSeriesResultDiscardingThresholdsCheckbox);
|
||||
formGrid.setWidget(4, 1, discardThresholdBoxes.getWidget());
|
||||
formGrid.setWidget(3, 1, firstColumnIsNonDiscardableCarryForwardCheckbox);
|
||||
formGrid.setWidget(4, 1, useSeriesResultDiscardingThresholdsCheckbox);
|
||||
formGrid.setWidget(5, 1, discardThresholdBoxes.getWidget());
|
||||
panel.add(createHeadlineLabel(stringMessages.fleets()));
|
||||
panel.add(fleetsGrid);
|
||||
Button addFleetButton = new Button(stringMessages.addFleet());
|
||||
|
||||
@@ -75,6 +75,10 @@ public class SeriesDTO extends NamedDTO {
|
||||
public void setStartsWithZeroScore(Boolean startsWithZeroScore) {
|
||||
this.startsWithZeroScore = startsWithZeroScore;
|
||||
}
|
||||
|
||||
public void setFirstColumnIsNonDiscardableCarryForward(boolean firstColumnIsNonDiscardableCarryForward) {
|
||||
this.firstColumnIsNonDiscardableCarryForward = firstColumnIsNonDiscardableCarryForward;
|
||||
}
|
||||
|
||||
public boolean isFirstColumnIsNonDiscardableCarryForward() {
|
||||
return firstColumnIsNonDiscardableCarryForward;
|
||||
|
||||
+1
@@ -53,6 +53,7 @@ public class AddSpecificRegatta extends AbstractAddRegattaOperation {
|
||||
s.setResultDiscardingRule(new ThresholdBasedResultDiscardingRuleImpl(e.getValue().getDiscardingThresholds()));
|
||||
}
|
||||
s.setStartsWithZeroScore(e.getValue().isStartsWithZero());
|
||||
s.setFirstColumnIsNonDiscardableCarryForward(e.getValue().isFirstColumnIsNonDiscardableCarryForward());
|
||||
result.add(s);
|
||||
}
|
||||
return result;
|
||||
|
||||
Reference in new issue
Block a user