cleanCode fixes.
This commit is contained in:
parent
71d13314f4
commit
fd2e775c94
|
@ -1,11 +1,6 @@
|
||||||
package ch.zhaw.projekt2.turnierverwaltung.main.tournamentList;
|
package ch.zhaw.projekt2.turnierverwaltung.main.tournamentList;
|
||||||
|
|
||||||
import ch.zhaw.projekt2.turnierverwaltung.FXController;
|
import ch.zhaw.projekt2.turnierverwaltung.FXController;
|
||||||
import ch.zhaw.projekt2.turnierverwaltung.Factory;
|
|
||||||
import ch.zhaw.projekt2.turnierverwaltung.FileIO;
|
|
||||||
import ch.zhaw.projekt2.turnierverwaltung.Tournament;
|
|
||||||
import ch.zhaw.projekt2.turnierverwaltung.main.MainWindow;
|
|
||||||
import javafx.beans.Observable;
|
|
||||||
import javafx.collections.FXCollections;
|
import javafx.collections.FXCollections;
|
||||||
import javafx.collections.ObservableList;
|
import javafx.collections.ObservableList;
|
||||||
import javafx.event.ActionEvent;
|
import javafx.event.ActionEvent;
|
||||||
|
@ -38,16 +33,16 @@ public class TournamentListController extends FXController {
|
||||||
private Button openBtn;
|
private Button openBtn;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private Label tournierListTitle;
|
private Label tournamentListTitle;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private ListView<File> tournierListView;
|
private ListView<File> tournamentListView;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private Label tournierModLabel;
|
private Label tournamentModLabel;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private Label turnierNameLabel;
|
private Label tournamentNameLabel;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
void createTournament(ActionEvent event) {
|
void createTournament(ActionEvent event) {
|
||||||
|
@ -57,7 +52,7 @@ public class TournamentListController extends FXController {
|
||||||
@FXML
|
@FXML
|
||||||
void openTournament(ActionEvent event) {
|
void openTournament(ActionEvent event) {
|
||||||
try {
|
try {
|
||||||
File tournamentFile = tournierListView.getSelectionModel().getSelectedItems().get(0);
|
File tournamentFile = tournamentListView.getSelectionModel().getSelectedItems().get(0);
|
||||||
getFactory().setTournament(getFileIO().loadTournament(tournamentFile));
|
getFactory().setTournament(getFileIO().loadTournament(tournamentFile));
|
||||||
getFactory().loadParticipantFormular((BorderPane) getPane());
|
getFactory().loadParticipantFormular((BorderPane) getPane());
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
@ -73,7 +68,7 @@ public class TournamentListController extends FXController {
|
||||||
for(File tournament : getFileIO().getList()){
|
for(File tournament : getFileIO().getList()){
|
||||||
tournamentFiles.add(tournament);
|
tournamentFiles.add(tournament);
|
||||||
}
|
}
|
||||||
tournierListView.setItems(tournamentFiles);
|
tournamentListView.setItems(tournamentFiles);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
<children>
|
<children>
|
||||||
<VBox alignment="TOP_CENTER" prefHeight="331.0" prefWidth="308.0" HBox.hgrow="ALWAYS">
|
<VBox alignment="TOP_CENTER" prefHeight="331.0" prefWidth="308.0" HBox.hgrow="ALWAYS">
|
||||||
<children>
|
<children>
|
||||||
<Label fx:id="tournierListTitle" text="Bestehende Turniere">
|
<Label fx:id="tournamentListTitle" text="Bestehende Turniere">
|
||||||
<font>
|
<font>
|
||||||
<Font name="System Bold" size="21.0" />
|
<Font name="System Bold" size="21.0" />
|
||||||
</font>
|
</font>
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
<Insets bottom="20.0" />
|
<Insets bottom="20.0" />
|
||||||
</VBox.margin>
|
</VBox.margin>
|
||||||
</Label>
|
</Label>
|
||||||
<ListView fx:id="tournierListView" prefHeight="200.0" prefWidth="200.0" VBox.vgrow="ALWAYS">
|
<ListView fx:id="tournamentListView" prefHeight="200.0" prefWidth="200.0" VBox.vgrow="ALWAYS">
|
||||||
<VBox.margin>
|
<VBox.margin>
|
||||||
<Insets />
|
<Insets />
|
||||||
</VBox.margin>
|
</VBox.margin>
|
||||||
|
@ -76,7 +76,7 @@
|
||||||
<Insets />
|
<Insets />
|
||||||
</GridPane.margin>
|
</GridPane.margin>
|
||||||
</TextField>
|
</TextField>
|
||||||
<Label fx:id="tournierModLabel" styleClass="lableGrid" text="Turnier Modus:" GridPane.rowIndex="1">
|
<Label fx:id="tournamentModLabel" styleClass="lableGrid" text="Turnier Modus:" GridPane.rowIndex="1">
|
||||||
<GridPane.margin>
|
<GridPane.margin>
|
||||||
<Insets />
|
<Insets />
|
||||||
</GridPane.margin>
|
</GridPane.margin>
|
||||||
|
|
Loading…
Reference in New Issue