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.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()
|
||||||
|
Loading…
Reference in New Issue
Block a user