From 734d4b94ed3adc427c7cd2b75a78f62241264035 Mon Sep 17 00:00:00 2001 From: Radeck Date: Sun, 2 Apr 2017 22:35:24 +0200 Subject: [PATCH] Removed CRLF line endings that were not converted to LF --- .../AbstractTrackedRacesListComposite.java | 122 +++++++++--------- 1 file changed, 61 insertions(+), 61 deletions(-) diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/AbstractTrackedRacesListComposite.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/AbstractTrackedRacesListComposite.java index 2156abc175e..b03b4441ed0 100644 --- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/AbstractTrackedRacesListComposite.java +++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/AbstractTrackedRacesListComposite.java @@ -515,67 +515,67 @@ public abstract class AbstractTrackedRacesListComposite extends SimplePanel * @param regattas */ @Override - public void fillRegattas(Iterable regattas) { - makeControlsReactToFillRegattas(regattas); - displayRaceTableUI(regattas); - - List newAllRaces = new ArrayList(); - List regattaNames = new ArrayList<>(); - - for (RegattaDTO regatta : regattas) { - for (RaceDTO race : regatta.races) { - if (race != null) { - if (raceIsToBeAddedToList(race)) { - // We need only those regatta names which are available - // at tracking table - if (!regattaNames.contains(regatta.getName())) { - regattaNames.add(regatta.getName()); - } - newAllRaces.add(race); - } - } - } - } - - refreshListBoxRegattas(regattaNames); - allRaces = newAllRaces; - filterablePanelRaces.updateAll(allRaces); - } - - private void refreshListBoxRegattas(List regattaNames) { - String lastSelectedRegatta = listBoxRegattas.getSelectedItemText(); - listBoxRegattas.clear(); - listBoxRegattas.addItem(stringMessages.all(), ""); - regattaNames.stream().sorted().forEach(regatta -> listBoxRegattas.addItem(regatta, regatta)); - restoreListBoxRegattasSelection(lastSelectedRegatta); - } - - private void restoreListBoxRegattasSelection(String lastSelectedRegatta) { - for (int i = 0; i < listBoxRegattas.getItemCount(); i++) { - if (listBoxRegattas.getItemText(i).equals(lastSelectedRegatta)) { - listBoxRegattas.setSelectedIndex(i); - } - } - } - - private void displayRaceTableUI(Iterable regattas) { - if (Util.isEmpty(regattas)) { - hideRaceTable(); - } else { - showRaceTable(); - } - } - - private void showRaceTable() { - raceTable.setVisible(true); - noTrackedRacesLabel.setVisible(false); - } - - private void hideRaceTable() { - raceTable.setVisible(false); - noTrackedRacesLabel.setVisible(true); - } - + public void fillRegattas(Iterable regattas) { + makeControlsReactToFillRegattas(regattas); + displayRaceTableUI(regattas); + + List newAllRaces = new ArrayList(); + List regattaNames = new ArrayList<>(); + + for (RegattaDTO regatta : regattas) { + for (RaceDTO race : regatta.races) { + if (race != null) { + if (raceIsToBeAddedToList(race)) { + // We need only those regatta names which are available + // at tracking table + if (!regattaNames.contains(regatta.getName())) { + regattaNames.add(regatta.getName()); + } + newAllRaces.add(race); + } + } + } + } + + refreshListBoxRegattas(regattaNames); + allRaces = newAllRaces; + filterablePanelRaces.updateAll(allRaces); + } + + private void refreshListBoxRegattas(List regattaNames) { + String lastSelectedRegatta = listBoxRegattas.getSelectedItemText(); + listBoxRegattas.clear(); + listBoxRegattas.addItem(stringMessages.all(), ""); + regattaNames.stream().sorted().forEach(regatta -> listBoxRegattas.addItem(regatta, regatta)); + restoreListBoxRegattasSelection(lastSelectedRegatta); + } + + private void restoreListBoxRegattasSelection(String lastSelectedRegatta) { + for (int i = 0; i < listBoxRegattas.getItemCount(); i++) { + if (listBoxRegattas.getItemText(i).equals(lastSelectedRegatta)) { + listBoxRegattas.setSelectedIndex(i); + } + } + } + + private void displayRaceTableUI(Iterable regattas) { + if (Util.isEmpty(regattas)) { + hideRaceTable(); + } else { + showRaceTable(); + } + } + + private void showRaceTable() { + raceTable.setVisible(true); + noTrackedRacesLabel.setVisible(false); + } + + private void hideRaceTable() { + raceTable.setVisible(false); + noTrackedRacesLabel.setVisible(true); + } + /** * Allows applying some sort of filter to the process of adding races. Defaults to true in standard implementation. * Override for custom behavior