Added cell factory for usersListView
TODO add cusom box for users list view
This commit is contained in:
parent
0dc4e09960
commit
b7a24e6ca0
@ -135,6 +135,20 @@ class ChatController @Inject() (
|
||||
// curUserAdapter.addDateConverter()
|
||||
// curUserAdapter.addBindings(curUserKeys)
|
||||
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
|
||||
.selectionModel()
|
||||
.selectedItemProperty()
|
||||
|
Loading…
Reference in New Issue
Block a user