/** * */ package de.fhswf.in.inf.se.projektthemenvergabe; import de.fhswf.in.inf.se.projektthemenvergabe.model.Ansprechpartner; import de.fhswf.in.inf.se.projektthemenvergabe.model.Organisation; import de.fhswf.in.inf.se.projektthemenvergabe.view.AnsprechpartnerListeController; import javafx.application.Application; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.fxml.FXMLLoader; import javafx.scene.Scene; import javafx.scene.layout.BorderPane; import javafx.stage.Stage; /** * Handles the stages and the data. * * @author Dina-Marie Hanxleden & Stefan Suhren * @version 1.0 */ public class Main extends Application { private ObservableList ansprechpartner = FXCollections .observableArrayList(Ansprechpartner.extractor()); private ObservableList organisation = FXCollections .observableArrayList(Organisation.extractor()); private Stage primaryStage; /* * (non-Javadoc) * * @see javafx.application.Application#start(javafx.stage.Stage) */ @Override public void start(Stage primaryStage) throws Exception { this.primaryStage = primaryStage; try { FXMLLoader loader = new FXMLLoader( getClass().getResource("view/AnsprechpartnerListe.fxml")); BorderPane root = (BorderPane) loader.load(); Scene scene = new Scene(root); primaryStage.setScene(scene); AnsprechpartnerListeController controller = loader.getController(); controller.setMain(this); primaryStage.show(); } catch (Exception e) { e.printStackTrace(); } } /** * Getter for property ansprechpartner. * * @return Returns the ansprechpartner. */ public ObservableList getAnsprechpartner() { return ansprechpartner; } /** * Get the primary {@link Stage} for this application. Can for example be * used to set modal. * * @return The primary stage of the application. */ public Stage getPrimaryStage() { return primaryStage; } /** * Getter for property organisation. * * @return Returns the organisation. */ public ObservableList getOrganisation() { return organisation; } /** * Launches the JavaFX application. * * @param args * Command line arguments. */ public static void main(String[] args) { launch(args); } }