Added cell factory for usersListView

TODO add cusom box for users list view
This commit is contained in:
Rohan Sircar 2020-05-26 21:50:06 +05:30
parent 0dc4e09960
commit b7a24e6ca0

View File

@ -135,6 +135,20 @@ class ChatController @Inject() (
// curUserAdapter.addDateConverter() // curUserAdapter.addDateConverter()
// curUserAdapter.addBindings(curUserKeys) // curUserAdapter.addBindings(curUserKeys)
chatDataAdapter.addBindings(chatDataAdapterKeys) chatDataAdapter.addBindings(chatDataAdapterKeys)
usersListView.cellFactory = _ => {
new ListCell[ActiveUser] {
override def updateItem(item: ActiveUser, empty: Boolean): Unit = {
super.updateItem(item, empty)
if (empty || item == null) {
setText("")
} else {
setText(item.userName)
}
}
}
}
usersListView usersListView
.selectionModel() .selectionModel()
.selectedItemProperty() .selectedItemProperty()