X-Git-Url: http://git.nikiroo.be/?p=fanfix.git;a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Futils%2Fui%2FDataTree.java;h=6b3657da7f0f2dbc3a73506ea26aa70b8581b4fc;hp=e941a71d2ac00a238c0c6fd6a67932b7f08ca080;hb=b3b9a09308f124fc63b8fdad52c91c1027b2ac99;hpb=fa9ed2183664589496a443157f195a03862f0c66 diff --git a/src/be/nikiroo/utils/ui/DataTree.java b/src/be/nikiroo/utils/ui/DataTree.java index e941a71..6b3657d 100644 --- a/src/be/nikiroo/utils/ui/DataTree.java +++ b/src/be/nikiroo/utils/ui/DataTree.java @@ -10,7 +10,7 @@ import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.MutableTreeNode; public abstract class DataTree { - private DataNode data; + protected DataNode data; public DataNode loadData() throws IOException { return this.data = extractData(); @@ -65,24 +65,4 @@ public abstract class DataTree { return new DataNode(children, source.getUserData()); } - - // TODO: not in this class: - - public void loadInto(DefaultMutableTreeNode root, String filter) { - DataNode filtered = getRoot(filter); - for (DataNode child : filtered.getChildren()) { - root.add(nodeToNode(child)); - } - } - - private MutableTreeNode nodeToNode(DataNode node) { - // TODO: node.toString - DefaultMutableTreeNode otherNode = new DefaultMutableTreeNode( - node.toString()); - for (DataNode child : node.getChildren()) { - otherNode.add(nodeToNode(child)); - } - - return otherNode; - } }