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