From 2f45c53df1f7b449b1c54b9ff915b67cd08801a6 Mon Sep 17 00:00:00 2001 From: lsagona Date: Mon, 13 Jul 2020 10:46:57 +0200 Subject: [PATCH] skeleton for user interface --- src/main/kotlin/application/App.kt | 36 +++++++++++++++++++++++++++ src/main/kotlin/application/ui/MenuBar.kt | 11 +++++++++ src/main/kotlin/application/ui/ShipList.kt | 4 +++ src/main/resources/gui/mainApp.fxml | 37 ++++++++++++++++++++++++++++ src/main/resources/gui/menuBar.fxml | 24 ++++++++++++++++++ src/main/resources/gui/shipList.fxml | 7 ++++++ 6 files changed, 119 insertions(+) create mode 100644 src/main/kotlin/application/App.kt create mode 100644 src/main/kotlin/application/ui/MenuBar.kt create mode 100644 src/main/kotlin/application/ui/ShipList.kt create mode 100644 src/main/resources/gui/mainApp.fxml create mode 100644 src/main/resources/gui/menuBar.fxml create mode 100644 src/main/resources/gui/shipList.fxml diff --git a/src/main/kotlin/application/App.kt b/src/main/kotlin/application/App.kt new file mode 100644 index 0000000..d407a7f --- /dev/null +++ b/src/main/kotlin/application/App.kt @@ -0,0 +1,36 @@ +package application + +import javafx.application.Application +import javafx.fxml.FXMLLoader +import javafx.scene.Parent +import javafx.scene.Scene +import javafx.stage.Stage + +class App : Application() { + + + override fun start(primaryStage: Stage?) { + + val fxmlLoader = FXMLLoader(App::class.java.getResource("/gui/mainApp.fxml")) + + val parent: Parent = fxmlLoader.load() + +// val controller: MainAppController = fxmlLoader.getController() + + val scene = Scene(parent) + + primaryStage!!.scene = scene + primaryStage.title = "Maritime Visualisation" + primaryStage.width = 667.0 + primaryStage.height = 375.0 + primaryStage.show() + } + + companion object { + @JvmStatic + fun main(args: Array) { + launch(App::class.java) + } + } + +} \ No newline at end of file diff --git a/src/main/kotlin/application/ui/MenuBar.kt b/src/main/kotlin/application/ui/MenuBar.kt new file mode 100644 index 0000000..9d7873a --- /dev/null +++ b/src/main/kotlin/application/ui/MenuBar.kt @@ -0,0 +1,11 @@ +package application.ui + +import javafx.fxml.FXML + +class MenuBar { + + @FXML + fun initialize() { + } + +} \ No newline at end of file diff --git a/src/main/kotlin/application/ui/ShipList.kt b/src/main/kotlin/application/ui/ShipList.kt new file mode 100644 index 0000000..edb78e0 --- /dev/null +++ b/src/main/kotlin/application/ui/ShipList.kt @@ -0,0 +1,4 @@ +package application.ui + +class ShipList { +} \ No newline at end of file diff --git a/src/main/resources/gui/mainApp.fxml b/src/main/resources/gui/mainApp.fxml new file mode 100644 index 0000000..ba3249f --- /dev/null +++ b/src/main/resources/gui/mainApp.fxml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/gui/menuBar.fxml b/src/main/resources/gui/menuBar.fxml new file mode 100644 index 0000000..8c2c57d --- /dev/null +++ b/src/main/resources/gui/menuBar.fxml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/gui/shipList.fxml b/src/main/resources/gui/shipList.fxml new file mode 100644 index 0000000..93c2d0a --- /dev/null +++ b/src/main/resources/gui/shipList.fxml @@ -0,0 +1,7 @@ + + + + + -- 1.7.10.4