|
@@ -20,7 +20,19 @@ import javax.swing.tree.TreePath;
|
|
|
//kann als JTree-daten benutzt werden oder als Verzeichnisbrowser-Grundlage
|
|
|
public abstract class DirectoryTree implements TreeModel
|
|
|
{
|
|
|
-
|
|
|
+
|
|
|
+ protected boolean autopopulateIDs;
|
|
|
+ public DirectoryTree()
|
|
|
+ {
|
|
|
+ autopopulateIDs=false;
|
|
|
+ }
|
|
|
+ public DirectoryTree(boolean apopIds)
|
|
|
+ {
|
|
|
+ autopopulateIDs=apopIds;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
protected ArrayList<TreeModelListener> tml = new ArrayList<>();
|
|
|
protected ArrayList<DirectoryTreeNode> directoryTree = new ArrayList<>();
|
|
|
|
|
@@ -189,7 +201,7 @@ public abstract class DirectoryTree implements TreeModel
|
|
|
{
|
|
|
|
|
|
path = clearPathFromInvalidSt00f(path);
|
|
|
- DirectoryTreeNode[] content = new DirectoryTreeNode[]{new DirectoryTreeNode(0+"", 0+"","Fotze",true)};
|
|
|
+ DirectoryTreeNode[] content = new DirectoryTreeNode[]{new DirectoryTreeNode(0+"", 0+"","Fotze",true,autopopulateIDs)};
|
|
|
DirectoryTreeNode rn = (DirectoryTreeNode) getRoot();
|
|
|
if(!path.equals("\\"))//rootdetector
|
|
|
{
|
|
@@ -225,7 +237,7 @@ public abstract class DirectoryTree implements TreeModel
|
|
|
//}
|
|
|
}
|
|
|
String pid = currentNode.getNodeID();
|
|
|
- insertDirectory(new DirectoryTreeNode(null, pid, PathSplitted[PathSplitted.length-1], true));
|
|
|
+ insertDirectory(new DirectoryTreeNode(null, pid, PathSplitted[PathSplitted.length-1], true,autopopulateIDs));
|
|
|
}
|
|
|
|
|
|
/*
|