refactored GUI to be able to just switch between diffrent pane in center
refactored dictionary hirarchy
This commit is contained in:
@@ -3,22 +3,27 @@ package ch.zhaw.projekt2.turnierverwaltung.main;
|
||||
import javafx.application.Application;
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.layout.BorderPane;
|
||||
import javafx.scene.layout.Pane;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
import java.awt.*;
|
||||
import java.io.IOException;
|
||||
|
||||
public class MainWindow extends Application {
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void start(Stage primaryStage) throws Exception {
|
||||
FXMLLoader loader = new FXMLLoader(getClass().getResource("mainWindow.fxml"));
|
||||
Pane pane = loader.load();
|
||||
BorderPane pane = loader.load();
|
||||
|
||||
//test add center pane
|
||||
loader = new FXMLLoader(getClass().getResource("tournamentList/tournamentList.fxml"));
|
||||
pane.setCenter(loader.load());
|
||||
|
||||
Scene scene = new Scene(pane);
|
||||
primaryStage.setScene(scene);
|
||||
primaryStage.setFullScreen(true);
|
||||
primaryStage.setMaximized(true);
|
||||
primaryStage.setResizable(false);
|
||||
primaryStage.show();
|
||||
}
|
||||
@@ -26,7 +31,7 @@ public class MainWindow extends Application {
|
||||
//Can be used to Open new Scene in same Stage.
|
||||
//This way possible to later give object to Controller
|
||||
public void startParticipand(Stage stage) {
|
||||
FXMLLoader loader = new FXMLLoader(getClass().getResource("../participandAddFormular/participandFormular.fxml"));
|
||||
FXMLLoader loader = new FXMLLoader(getClass().getResource("participandAddFormular/participandFormular.fxml"));
|
||||
try {
|
||||
Pane pane = loader.load();
|
||||
Scene scene = new Scene(pane);
|
||||
|
||||
@@ -2,55 +2,9 @@ package ch.zhaw.projekt2.turnierverwaltung.main;
|
||||
|
||||
import javafx.event.ActionEvent;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.scene.control.Button;
|
||||
import javafx.scene.control.ChoiceBox;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.control.ListView;
|
||||
import javafx.scene.control.MenuItem;
|
||||
import javafx.scene.layout.GridPane;
|
||||
import javafx.scene.layout.VBox;
|
||||
|
||||
public class MainWindowController {
|
||||
|
||||
@FXML
|
||||
private MenuItem closeBtn;
|
||||
|
||||
@FXML
|
||||
private Button createBtn;
|
||||
|
||||
@FXML
|
||||
private MenuItem germanSelect;
|
||||
|
||||
@FXML
|
||||
private GridPane grid;
|
||||
|
||||
@FXML
|
||||
private VBox mainContainer;
|
||||
|
||||
@FXML
|
||||
private Label mainTitle;
|
||||
|
||||
@FXML
|
||||
private ChoiceBox<?> modusChoiceBox;
|
||||
|
||||
@FXML
|
||||
private Label newTournamentFormularTitle;
|
||||
|
||||
@FXML
|
||||
private Button openBtn;
|
||||
|
||||
@FXML
|
||||
private Label tournierListTitle;
|
||||
|
||||
@FXML
|
||||
private ListView<?> tournierListView;
|
||||
|
||||
@FXML
|
||||
private Label tournierModLabel;
|
||||
|
||||
@FXML
|
||||
private Label turnierNameLabel;
|
||||
|
||||
@FXML
|
||||
void changeLangToGerman(ActionEvent event) {
|
||||
|
||||
@@ -60,15 +14,4 @@ public class MainWindowController {
|
||||
void closeApplication(ActionEvent event) {
|
||||
|
||||
}
|
||||
|
||||
@FXML
|
||||
void createTournament(ActionEvent event) {
|
||||
|
||||
}
|
||||
|
||||
@FXML
|
||||
void openTournier(ActionEvent event) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+1
-24
@@ -1,11 +1,10 @@
|
||||
package ch.zhaw.projekt2.turnierverwaltung.participandAddFormular;
|
||||
package ch.zhaw.projekt2.turnierverwaltung.main.participandAddFormular;
|
||||
|
||||
import javafx.event.ActionEvent;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.scene.control.Button;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.control.ListView;
|
||||
import javafx.scene.control.MenuItem;
|
||||
import javafx.scene.control.TextField;
|
||||
import javafx.scene.input.MouseEvent;
|
||||
import javafx.scene.layout.GridPane;
|
||||
@@ -25,27 +24,15 @@ public class participantFormularController {
|
||||
@FXML
|
||||
private VBox changeBtn;
|
||||
|
||||
@FXML
|
||||
private MenuItem closeBtn;
|
||||
|
||||
@FXML
|
||||
private Label firstNameLabel;
|
||||
|
||||
@FXML
|
||||
private TextField firstNameTextField;
|
||||
|
||||
@FXML
|
||||
private MenuItem germanSelect;
|
||||
|
||||
@FXML
|
||||
private GridPane grid;
|
||||
|
||||
@FXML
|
||||
private VBox mainContainer;
|
||||
|
||||
@FXML
|
||||
private Label mainTitle;
|
||||
|
||||
@FXML
|
||||
private Label newParticipantFormularTitle;
|
||||
|
||||
@@ -78,21 +65,11 @@ public class participantFormularController {
|
||||
|
||||
}
|
||||
|
||||
@FXML
|
||||
void changeLangToGerman(ActionEvent event) {
|
||||
|
||||
}
|
||||
|
||||
@FXML
|
||||
void changeParticipant(MouseEvent event) {
|
||||
|
||||
}
|
||||
|
||||
@FXML
|
||||
void closeApplication(ActionEvent event) {
|
||||
|
||||
}
|
||||
|
||||
@FXML
|
||||
void save(ActionEvent event) {
|
||||
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
package ch.zhaw.projekt2.turnierverwaltung.main.tournamentList;
|
||||
|
||||
import javafx.event.ActionEvent;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.scene.control.Button;
|
||||
import javafx.scene.control.ChoiceBox;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.control.ListView;
|
||||
import javafx.scene.layout.GridPane;
|
||||
|
||||
public class tournamentListController {
|
||||
|
||||
@FXML
|
||||
private Button createBtn;
|
||||
|
||||
@FXML
|
||||
private GridPane grid;
|
||||
|
||||
@FXML
|
||||
private ChoiceBox<?> modusChoiceBox;
|
||||
|
||||
@FXML
|
||||
private Label newTournamentFormularTitle;
|
||||
|
||||
@FXML
|
||||
private Button openBtn;
|
||||
|
||||
@FXML
|
||||
private Label tournierListTitle;
|
||||
|
||||
@FXML
|
||||
private ListView<?> tournierListView;
|
||||
|
||||
@FXML
|
||||
private Label tournierModLabel;
|
||||
|
||||
@FXML
|
||||
private Label turnierNameLabel;
|
||||
|
||||
@FXML
|
||||
void createTournament(ActionEvent event) {
|
||||
|
||||
}
|
||||
|
||||
@FXML
|
||||
void openTournier(ActionEvent event) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
-4
@@ -1,4 +0,0 @@
|
||||
package ch.zhaw.projekt2.turnierverwaltung.tournamentList;
|
||||
|
||||
public class tournamentListController {
|
||||
}
|
||||
Reference in New Issue
Block a user