bjonnh
01/29/2019, 6:00 PMclass LoadQueryFragment: Fragment() {
var output: Query? = null
var items: MutableList<Query> = mutableListOf(Query(Resource {"A"}, "B", "C"))
override val root = borderpane {
val list = listview(items.observable()) {
cellFormat { text = it.label }
}
center = list
bottom = hbox {
button("Ok") {
setOnAction {
output = list.selectionModel.selectedItem
close()
}
}
button("Cancel") {
setOnAction {
close()
}
}
}
}
}
val frag = find<LoadQueryFragment>().apply {
items.addAll(controller.configurationManager.getSparqlQueries())
}
frag.openModal(stageStyle = StageStyle.UTILITY, block= true)