示例#1
0
 public TreeItem<ITreeNode> toTreeItems() {
   final TreeItem<ITreeNode> result = new TreeItem<>(null);
   for (ITreeNode child : root.children()) {
     result.getChildren().add(createTreeItem(child));
   }
   return result;
 }
示例#2
0
 private TreeItem<ITreeNode> createTreeItem(ITreeNode node) {
   final TreeItem<ITreeNode> result = new TreeItem<>(node);
   for (ITreeNode child : node.children()) {
     result.getChildren().add(createTreeItem(child));
   }
   return result;
 }