diff --git a/libs/commons-csv-1.4.jar b/libs/commons-csv-1.4.jar new file mode 100644 index 0000000..e9eb0bd Binary files /dev/null and b/libs/commons-csv-1.4.jar differ diff --git a/libs/commons-io-2.5.jar b/libs/commons-io-2.5.jar new file mode 100644 index 0000000..1234918 Binary files /dev/null and b/libs/commons-io-2.5.jar differ diff --git a/nsaa-seed-predictor/src/META-INF/MANIFEST.MF b/nsaa-seed-predictor/src/META-INF/MANIFEST.MF new file mode 100644 index 0000000..ec5448b --- /dev/null +++ b/nsaa-seed-predictor/src/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Main-Class: main.Main + diff --git a/nsaa-seed-predictor/src/controller/DownloadController.java b/nsaa-seed-predictor/src/controller/DownloadController.java new file mode 100644 index 0000000..4bb009b --- /dev/null +++ b/nsaa-seed-predictor/src/controller/DownloadController.java @@ -0,0 +1,42 @@ +package controller; + +import javafx.fxml.FXMLLoader; +import javafx.fxml.Initializable; +import javafx.scene.Parent; +import javafx.scene.Scene; +import javafx.stage.Stage; + +import java.io.IOException; +import java.net.URL; +import java.util.ResourceBundle; + +/** + * Created by Andrew Bueide on 10/3/16. + */ +public class DownloadController implements Initializable { + + public DownloadController(){} + + + @Override + public void initialize(URL url, ResourceBundle resourceBundle) { + + } + + public void display() { + FXMLLoader loader = new FXMLLoader( + getClass().getClassLoader().getResource("view/download.fxml")); + loader.setController(this); + Parent root; + try { + root = loader.load(); + Stage stage = new Stage(); + stage.setTitle("Download file"); + stage.setScene(new Scene(root)); + stage.show(); + } catch (IOException e) { + e.printStackTrace(); + } + } + +} diff --git a/nsaa-seed-predictor/src/controller/MainController.java b/nsaa-seed-predictor/src/controller/MainController.java new file mode 100644 index 0000000..6c3bb98 --- /dev/null +++ b/nsaa-seed-predictor/src/controller/MainController.java @@ -0,0 +1,44 @@ +package controller; + +import javafx.fxml.FXML; +import javafx.fxml.FXMLLoader; +import javafx.fxml.Initializable; +import javafx.scene.Parent; +import javafx.scene.Scene; +import javafx.scene.control.MenuItem; +import javafx.stage.Stage; + +import java.io.IOException; +import java.net.URL; +import java.util.ResourceBundle; + +/** + * Created by Andrew Bueide on 10/2/16. + */ +public class MainController implements Initializable{ + @FXML + MenuItem download; + public MainController(){}; + + public MainController(String file){} + + public void launch(Stage primaryStage) { + FXMLLoader loader = new FXMLLoader( + getClass().getClassLoader().getResource("view/main.fxml")); + loader.setController(this); + Parent root; + try { + root = loader.load(); + primaryStage.setTitle("NSAA Seed Predictor by Andrew Bueide"); + primaryStage.setScene(new Scene(root)); + primaryStage.show(); + } catch (IOException e) { + e.printStackTrace(); + } + } + + @Override + public void initialize(URL url, ResourceBundle resourceBundle) { + download.setOnAction(e -> new DownloadController().display()); + } +} diff --git a/nsaa-seed-predictor/src/main/Main.java b/nsaa-seed-predictor/src/main/Main.java new file mode 100644 index 0000000..6a4b193 --- /dev/null +++ b/nsaa-seed-predictor/src/main/Main.java @@ -0,0 +1,18 @@ +package main; + +import controller.MainController; +import javafx.application.Application; +import javafx.stage.Stage; + +public class Main extends Application { + + @Override + public void start(Stage primaryStage) throws Exception{ + new MainController().launch(primaryStage); + } + + + public static void main(String[] args) { + launch(args); + } +} diff --git a/nsaa-seed-predictor/src/view/download.fxml b/nsaa-seed-predictor/src/view/download.fxml new file mode 100644 index 0000000..f456a77 --- /dev/null +++ b/nsaa-seed-predictor/src/view/download.fxml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + +