0
私は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;
...
のように見えるとして私の目的は、証明書が提示されているさまざまな列とTreeTableViewを構築することで、一部は/このビューで/編集機能を削除、追加します。
私はどのように私はこれを達成することができますか?