edvin
12/16/2017, 12:12 PMedvin
12/16/2017, 12:13 PMbutton(graphic = imageview
issue. I just realized that I should have added special support for nodes inside of menu items as well.. hehe, will add it now. You should just change to using the ImageView()
constructor for now.edvin
12/16/2017, 12:16 PMedvin
12/16/2017, 12:17 PMApplication.launch
, so instead of Application.launch(WordSearchApp::class.java, *args)
you can write launch<WordSearchApp>(args)
.edvin
12/16/2017, 12:18 PMedvin
12/16/2017, 12:20 PMitem("test", graphic = resources.imageview("/local/path/to/image.png"))
edvin
12/16/2017, 12:21 PM/resources
folder are to be available on the classpath you need to move them to src/main/resources
. They will then be at the root of the classpath, so to create an imageview for add_word.gif
you'd write resources.imageview("/add_word.gif")
.edvin
12/16/2017, 12:26 PMoverride val root = borderpane() {
can be defined as override val root = borderpane {
edvin
12/16/2017, 12:27 PMsetPrefSize(800.0, 600.0)
.edvin
12/16/2017, 12:27 PMstart
in your app class and configure the stage there of course.carlw
12/16/2017, 12:28 PMedvin
12/16/2017, 12:28 PMwgModel
look like?edvin
12/16/2017, 12:29 PMedvin
12/16/2017, 12:29 PMjavafxpert
12/16/2017, 12:30 PMcarlw
12/16/2017, 12:30 PMedvin
12/16/2017, 12:31 PMcarlw
12/16/2017, 12:31 PMjavafxpert
12/16/2017, 12:31 PMedvin
12/16/2017, 12:32 PMjavafxpert
12/16/2017, 12:32 PMedvin
12/16/2017, 12:33 PMjavafxpert
12/16/2017, 12:33 PMedvin
12/16/2017, 12:33 PMedvin
12/16/2017, 12:34 PMclass WordGridModel : ViewModel()
. That way you can add properties like normal, but you can also inject this into several views and have access to the same data. There is nothing more to it, really.javafxpert
12/16/2017, 12:34 PMedvin
12/16/2017, 12:35 PMval rowsProperty / var rows
and just define val rows = SimpleIntegerProperty()
. Nothing wrong with that.edvin
12/16/2017, 12:36 PMitem{}
builder you can do enableWhen(!wgModel.fillLettersOnGrid)
or enableWhen(wgModel.fillLettersOnGrid.not())
depending on taste/preference.edvin
12/16/2017, 12:36 PMdisableWhen
so you avoid negating your properties. disableWhen(wgModel.fillLettersOnGrid)
. That makes it more easy to read IMO.