72 lines
2.6 KiB
Java
72 lines
2.6 KiB
Java
// Fluglogbuch Software Studienleistung
|
|
// Sabic Eldar (3009675), Hajrovic Davud (3013128), Keiserman Vlada (3012879)
|
|
|
|
package Controller;
|
|
|
|
import View.FluglogbuchUI;
|
|
import javafx.application.Application;
|
|
import javafx.geometry.Insets;
|
|
import javafx.geometry.Pos;
|
|
import javafx.scene.Scene;
|
|
import javafx.scene.control.Button;
|
|
import javafx.scene.control.Label;
|
|
import javafx.scene.control.Tab;
|
|
import javafx.scene.control.TabPane;
|
|
import javafx.scene.layout.VBox;
|
|
import javafx.stage.Stage;
|
|
import Model.Database;
|
|
|
|
public class FluglogbuchController extends Application {
|
|
|
|
@Override
|
|
public void start(Stage primaryStage) {
|
|
Database.createDatabase();
|
|
showWelcomeScreen(primaryStage);
|
|
}
|
|
|
|
private void showWelcomeScreen(Stage primaryStage) {
|
|
VBox vbox = new VBox(20);
|
|
vbox.setAlignment(Pos.CENTER);
|
|
vbox.setPadding(new Insets(20));
|
|
|
|
Label welcomeLabel = new Label("Willkommen zur Software:\nDigitales Fluglogbuch Version 1.5");
|
|
welcomeLabel.setStyle("-fx-font-size: 16px; -fx-font-weight: bold; -fx-text-alignment: center;");
|
|
Label createdByLabel = new Label("Erstellt von:\nEldarDavudVlada Software GmbH");
|
|
createdByLabel.setStyle("-fx-font-size: 14px; -fx-text-alignment: center;");
|
|
|
|
Button continueButton = new Button("Weiter");
|
|
continueButton.setStyle(
|
|
"-fx-font-size: 14px; -fx-padding: 10 20 10 20; -fx-background-color: #0073e6; -fx-text-fill: white;");
|
|
continueButton.setOnMouseEntered(e -> continueButton.setStyle(
|
|
"-fx-font-size: 14px; -fx-padding: 10 20 10 20; -fx-background-color: #005bb5; -fx-text-fill: white;"));
|
|
continueButton.setOnMouseExited(e -> continueButton.setStyle(
|
|
"-fx-font-size: 14px; -fx-padding: 10 20 10 20; -fx-background-color: #0073e6; -fx-text-fill: white;"));
|
|
|
|
vbox.getChildren().addAll(welcomeLabel, createdByLabel, continueButton);
|
|
|
|
Scene welcomeScene = new Scene(vbox, 500, 300);
|
|
primaryStage.setScene(welcomeScene);
|
|
primaryStage.show();
|
|
|
|
continueButton.setOnAction(e -> showMainApplication(primaryStage));
|
|
}
|
|
|
|
private void showMainApplication(Stage primaryStage) {
|
|
FluglogbuchUI view = new FluglogbuchUI();
|
|
|
|
TabPane tabPane = new TabPane();
|
|
Tab pilotenTab = new Tab("Pilotenverwaltung", view.createPilotenverwaltungPane());
|
|
Tab lizenzenTab = new Tab("Lizenzverwaltung", view.createLizenzverwaltungPane());
|
|
Tab berechtigungenTab = new Tab("Berechtigungsverwaltung", view.createBerechtigungsverwaltungPane());
|
|
Tab logbuchTab = new Tab("Logbucheinträge", view.createLogbucheintragPane());
|
|
|
|
tabPane.getTabs().addAll(pilotenTab, lizenzenTab, berechtigungenTab, logbuchTab);
|
|
|
|
view.start(primaryStage, tabPane);
|
|
}
|
|
|
|
public static void main(String[] args) {
|
|
launch(args);
|
|
}
|
|
}
|