ron
12/27/2016, 10:18 AMedvin
12/27/2016, 10:19 AMedvin
12/27/2016, 10:20 AMron
12/27/2016, 10:22 AMsortedfilteredlist
for an interactive searchedvin
12/27/2016, 10:27 AMron
12/27/2016, 10:29 AMedvin
12/27/2016, 10:30 AMron
12/27/2016, 10:31 AMron
12/27/2016, 10:31 AMron
12/27/2016, 10:34 AMScreenshot at 2016-12-27 11-33-47.png▾
ron
12/27/2016, 10:34 AMedvin
12/27/2016, 10:35 AMprimaryStage
is a property in UIComponent
, so you don't need to use the FX.primaryStage
constant.edvin
12/27/2016, 10:36 AMprimaryStage.apply { width = 800.0; height = 600.0; centerOnStage() }
edvin
12/27/2016, 10:36 AMtableview<Entry>
- remove <Entry>
🙂edvin
12/27/2016, 10:37 AMron
12/27/2016, 10:37 AMron
12/27/2016, 10:38 AMmenuitem("open").setOnAction { mainview.replaceWith(SelectFileView::class) }
ron
12/27/2016, 10:38 AMedvin
12/27/2016, 10:42 AMmenuitem("open") { mainview.replaceWith(SelectFileView::class) }
edvin
12/27/2016, 10:43 AMron
12/27/2016, 10:44 AMron
12/27/2016, 10:46 AMobject openFileDialog : FXEvent()
class Mainview : View() {
override fun onDock() {
primaryStage.apply { width = 800.0; height = 600.0; centerOnScreen() }
subscribe<openFileDialog> { replaceWith(SelectFileView::class) }
}
ron
12/27/2016, 10:46 AMmenuitem("open") { fire (openFileDialog)}
edvin
12/27/2016, 11:04 AMstage.centerOnScreen(width, height)
helper?edvin
12/27/2016, 11:05 AMsubscribe
in the init block though, to avoid it from subscribing multiple times in case the view is docked more than once.ron
12/27/2016, 11:08 AMron
12/27/2016, 11:09 AMron
12/27/2016, 11:11 AMron
12/27/2016, 11:12 AM