Merge commit '8b2627ce767579eb616e262b3f45f810a88ec200'
[fanfix.git] / src / be / nikiroo / utils / ui / DataTree.java
index e941a71d2ac00a238c0c6fd6a67932b7f08ca080..6b3657da7f0f2dbc3a73506ea26aa70b8581b4fc 100644 (file)
@@ -10,7 +10,7 @@ import javax.swing.tree.DefaultMutableTreeNode;
 import javax.swing.tree.MutableTreeNode;
 
 public abstract class DataTree<E> {
-       private DataNode<E> data;
+       protected DataNode<E> data;
 
        public DataNode<E> loadData() throws IOException {
                return this.data = extractData();
@@ -65,24 +65,4 @@ public abstract class DataTree<E> {
 
                return new DataNode<E>(children, source.getUserData());
        }
-
-       // TODO: not in this class:
-
-       public void loadInto(DefaultMutableTreeNode root, String filter) {
-               DataNode<E> filtered = getRoot(filter);
-               for (DataNode<E> child : filtered.getChildren()) {
-                       root.add(nodeToNode(child));
-               }
-       }
-
-       private MutableTreeNode nodeToNode(DataNode<E> node) {
-               // TODO: node.toString
-               DefaultMutableTreeNode otherNode = new DefaultMutableTreeNode(
-                               node.toString());
-               for (DataNode<E> child : node.getChildren()) {
-                       otherNode.add(nodeToNode(child));
-               }
-
-               return otherNode;
-       }
 }