diff --git a/pictures/screenshot.png b/pictures/screenshot.png index 6039dfb..b2a3683 100644 Binary files a/pictures/screenshot.png and b/pictures/screenshot.png differ diff --git a/src/main/kotlin/io/github/agcom/quadtree/Launcher.kt b/src/main/kotlin/io/github/agcom/quadtree/Launcher.kt index 4286880..3445f66 100755 --- a/src/main/kotlin/io/github/agcom/quadtree/Launcher.kt +++ b/src/main/kotlin/io/github/agcom/quadtree/Launcher.kt @@ -18,7 +18,7 @@ class Launcher : Application() { primaryStage.apply { scene = Scene(loadFXML("layouts/home.fxml")) - title = "QuadTree" + title = "Quadtree" icons.add(Image("images/launcher.png".toStream())) show() diff --git a/src/main/kotlin/io/github/agcom/quadtree/controllers/HomeController.kt b/src/main/kotlin/io/github/agcom/quadtree/controllers/HomeController.kt index 4a7a1ac..5853a8c 100755 --- a/src/main/kotlin/io/github/agcom/quadtree/controllers/HomeController.kt +++ b/src/main/kotlin/io/github/agcom/quadtree/controllers/HomeController.kt @@ -31,7 +31,7 @@ import kotlin.time.ExperimentalTime @ExperimentalTime class HomeController : Initializable { - @FXML private lateinit var quadTreeController: QuadTreeController + @FXML private lateinit var quadtreeController: QuadtreeController @FXML private lateinit var controlPane: VBox @FXML private lateinit var logs: TextArea @FXML private lateinit var queryShapeGroup: ToggleGroup @@ -62,7 +62,7 @@ class HomeController : Initializable { override fun initialize(location: URL?, resources: ResourceBundle?) { - quadTreeController.also { + quadtreeController.also { it.queryStatistics.value = queryStatistics it.erase.bindBidirectional(eraser.selectedProperty()) @@ -132,7 +132,7 @@ class HomeController : Initializable { val count = randomize.text?.toIntOrNull() ?: 100 - val qTree = quadTreeController.quadTree.value + val qTree = quadtreeController.quadTree.value qTree.clear() @@ -146,7 +146,7 @@ class HomeController : Initializable { } - Platform.runLater { quadTreeController.quadTreeModified() } + Platform.runLater { quadtreeController.quadTreeModified() } } @@ -162,7 +162,7 @@ class HomeController : Initializable { rebuildDisposable = Single.fromCallable { - val old = quadTreeController.quadTree.value + val old = quadtreeController.quadTree.value val new = QuadTree(Rectangle(width.text?.toIntOrNull() ?: 600, height.text?.toIntOrNull() ?: 600), capacity.text?.toIntOrNull() ?: 4) @@ -175,7 +175,7 @@ class HomeController : Initializable { .subscribeOn(Schedulers.computation()) .subscribe({ - quadTreeController.quadTree.value = it + quadtreeController.quadTree.value = it }, Throwable::printStackTrace) diff --git a/src/main/kotlin/io/github/agcom/quadtree/controllers/QuadTreeController.kt b/src/main/kotlin/io/github/agcom/quadtree/controllers/QuadtreeController.kt similarity index 95% rename from src/main/kotlin/io/github/agcom/quadtree/controllers/QuadTreeController.kt rename to src/main/kotlin/io/github/agcom/quadtree/controllers/QuadtreeController.kt index 26faafa..3ebd11d 100755 --- a/src/main/kotlin/io/github/agcom/quadtree/controllers/QuadTreeController.kt +++ b/src/main/kotlin/io/github/agcom/quadtree/controllers/QuadtreeController.kt @@ -28,7 +28,7 @@ import java.util.concurrent.TimeUnit import kotlin.time.ExperimentalTime @ExperimentalTime -class QuadTreeController : Initializable { +class QuadtreeController : Initializable { val quadTree = SimpleObjectProperty() val query = SimpleObjectProperty() @@ -43,7 +43,7 @@ class QuadTreeController : Initializable { @FXML private lateinit var queryCanvas: Canvas @FXML - private lateinit var quadTreeCanvas: Canvas + private lateinit var quadtreeCanvas: Canvas @FXML private lateinit var queryArea: BorderPane @FXML @@ -81,7 +81,7 @@ class QuadTreeController : Initializable { } - quadTreeCanvas.also { + quadtreeCanvas.also { it.widthProperty().bind(width) it.heightProperty().bind(height) @@ -118,7 +118,7 @@ class QuadTreeController : Initializable { } - quadTree.value.draw(quadTreeCanvas) + quadTree.value.draw(quadtreeCanvas) } @@ -183,8 +183,8 @@ class QuadTreeController : Initializable { drawDisposable = Completable.fromAction { - quadTreeCanvas.clear() - quadTree.value?.draw(quadTreeCanvas) + quadtreeCanvas.clear() + quadTree.value?.draw(quadtreeCanvas) query() }.subscribeOn(JavaFxScheduler.platform()) diff --git a/src/main/resources/io/github/agcom/quadtree/layouts/home.fxml b/src/main/resources/io/github/agcom/quadtree/layouts/home.fxml index fd6d27b..800d63a 100755 --- a/src/main/resources/io/github/agcom/quadtree/layouts/home.fxml +++ b/src/main/resources/io/github/agcom/quadtree/layouts/home.fxml @@ -32,7 +32,7 @@ - + @@ -109,6 +109,6 @@ - + diff --git a/src/main/resources/io/github/agcom/quadtree/layouts/quadtree.fxml b/src/main/resources/io/github/agcom/quadtree/layouts/quadtree.fxml index f3f33aa..d5a4e38 100755 --- a/src/main/resources/io/github/agcom/quadtree/layouts/quadtree.fxml +++ b/src/main/resources/io/github/agcom/quadtree/layouts/quadtree.fxml @@ -10,14 +10,14 @@
-