0
我是Java 8世界的新手(使用lambdas,函数等)并构建JavaFX 8应用程序,我正努力为TreeTableView构建数据模型(TreeItem)。数据从ObservableList<Certificate>
从数据库中获取。具有ca=true
的证书对象可能有可通过issuerName
字段跟踪的子项。我的目标是建立一个TreeTableView与各列,其中证书被呈现为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;
...
在下一步要对这个观点有些添加/删除/编辑功能。
任何人都可以指导我如何做到这一点?