首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >绑定TreeTableView

绑定TreeTableView
EN

Stack Overflow用户
提问于 2015-07-30 21:27:03
回答 1查看 579关注 0票数 1

如何绑定TreeTableView?这给了我一个错误:

代码语言:javascript
复制
tblTreeView.rootProperty().bind(model.transactionProperty());

where transactionProperty()

代码语言:javascript
复制
public SimpleListProperty<Document> transactionsProperty() {
        if(transactions == null){
            transactions = new SimpleListProperty<>();
        }
        return transactions;
    }
EN

回答 1

Stack Overflow用户

发布于 2015-07-30 22:43:52

代码语言:javascript
复制
TreeTableView<Document> treeTable = new TreeTableView<>();
ObjectProperty<TreeItem<Document>> rootProperty = treeTable.rootProperty();

它可以绑定到ObservableValue<TreeItem<S>>

代码语言:javascript
复制
ObjectProperty<TreeItem<Document>> modelProperty = new SimpleObjectProperty<>();
rootProperty.bind(modelProperty);

modelProperty.set(myDocument); // will update the bound root property
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/31725129

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档