【发布时间】:2017-03-03 09:23:48
【问题描述】:
我是 Java 8 世界的新手(使用 lambda、函数等)并正在构建 JavaFX 8 应用程序,我正在努力为 TreeTableView 构建数据模型(TreeItem)。数据以ObservableList<Certificate> 的形式从数据库中获取。带有ca=true 的证书对象可能有可以被issuerName 字段跟踪的孩子。我的目标是构建一个包含各种列的 TreeTableView,其中证书显示为
Root(a dummy node)
|
|--Certificate1 (could be ca=false with no issuer match to any ca OR ca=true with no child)
|--Certificate2
|--Certificate3 (ca=true)
|--Certifciate4 (issuer name machted with Certificate3)
|--Certificate5 (issuer name machted with Certificate3)
|--Certificate6
|--Certificate7 (ca=true)
|--Certifciate8 (issuer name machted with Certificate7)
|--Certificate9 (issuer name machted with Certificate7)
类 Certificate 看起来像
public class Certificate implements Serializable {
private static final long serialVersionUID = 1L;
private int id;
private String name;
private boolean ca;
private String issuerName;
...
下一步想要在这个视图上添加/删除/编辑功能。
谁能指导我如何做到这一点???
【问题讨论】: