📜  对象的 javafx listview - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:32.054000             🧑  作者: Mango

代码示例1
listViewOfWords.setCellFactory(param -> new ListCell() {
    @Override
    protected void updateItem(Word item, boolean empty) {
        super.updateItem(item, empty);

        if (empty || item == null || item.getWord() == null) {
            setText(null);
        } else {
            setText(item.getWord());
        }
    }
});