Apply code review suggestions from @CyB3RC0nN0R 2

This commit is contained in:
delvh 2020-08-03 15:10:35 +02:00
parent 602abe8d3b
commit 615c317598
No known key found for this signature in database
GPG Key ID: 42B77E634CE94D82

View File

@ -35,8 +35,10 @@ public abstract class AbstractListCell<T, U extends Node> extends ListCell<T> {
@Override
protected final void updateItem(T item, boolean empty) {
super.updateItem(item, empty);
setGraphic(empty || item == null ? null : renderItem(item));
if (!empty) setCursor(Cursor.HAND);
if (!(empty || item == null)) {
setCursor(Cursor.HAND);
setGraphic(renderItem(item));
}
}
/**