From 987f12a83f63e39c9d235d16af1e4b5d409fe5c9 Mon Sep 17 00:00:00 2001
From: Dean Fi <djf@informatik.uni-kiel.de>
Date: Thu, 26 Nov 2015 15:34:00 +0100
Subject: [PATCH] Directory Chooser inserted

---
 NeoSuit/src/main/java/ui/SelectScene.java  | 9 +++++++++
 NeoSuit/src/main/java/ui/SelectScreen.fxml | 2 +-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/NeoSuit/src/main/java/ui/SelectScene.java b/NeoSuit/src/main/java/ui/SelectScene.java
index b24f5f9..6ed19f3 100644
--- a/NeoSuit/src/main/java/ui/SelectScene.java
+++ b/NeoSuit/src/main/java/ui/SelectScene.java
@@ -3,14 +3,23 @@ package ui;
 import javafx.event.ActionEvent;
 import javafx.fxml.FXML;
 import javafx.scene.control.Control;
+import javafx.scene.text.Text;
+import javafx.stage.DirectoryChooser;
 
 public class SelectScene extends Control {
 
 	private MainApp app;
 
+	@FXML
+	private Text dragText;
+
 	@FXML
 	private void handleSelectButtonAction(ActionEvent event) {
 		// TODO: open dialog, etc
+		DirectoryChooser directoryChooser = new DirectoryChooser();
+		directoryChooser.setTitle("Open Java Application Folder");
+		directoryChooser.showDialog(dragText.getScene().getWindow());
+
 		app.showMainScreen();
 	}
 
diff --git a/NeoSuit/src/main/java/ui/SelectScreen.fxml b/NeoSuit/src/main/java/ui/SelectScreen.fxml
index 8111b5e..29bb082 100644
--- a/NeoSuit/src/main/java/ui/SelectScreen.fxml
+++ b/NeoSuit/src/main/java/ui/SelectScreen.fxml
@@ -9,7 +9,7 @@
 
 <AnchorPane prefHeight="600.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/8.0.40" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ui.SelectScene">
    <children>
-      <Text layoutX="310.0" layoutY="221.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Drag Folder" wrappingWidth="177.015625">
+      <Text fx:id="dragText" layoutX="310.0" layoutY="221.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Drag Folder" wrappingWidth="177.015625">
          <font>
             <Font size="32.0" />
          </font>
-- 
GitLab