Node<FileTreePath> fileTreePathRootNode = fileTreePathTree.getRootNode();
fileTreePathRootNode.removeAllChildren();
convertTree(File.separator, pathRootNode, fileTreePathRootNode.addChild(new FileTreePath(File.separator, project.getName())));
- /* TODO - now add entries to all file tree path tree nodes. */
+ /* TODO - now add entries to all file tree path tree nodes. */
}
/**
}
+ /**
+ * Container that is used to back the {@link FileTreeModel}. Each
+ * FileTreePath contains a complete path name, a filename, and the
+ * associated {@link Entry}, if any.
+ *
+ * @author David ‘Bombe’ Roden <bombe@freenetproject.org>
+ */
private static class FileTreePath implements Comparable<FileTreePath> {
+ /** The complete file path. */
private final String filePath;
+
+ /** The file name. */
private final String fileName;
+
+ /** The file entry, if any. */
private Entry fileEntry;
+ /**
+ * Creates a new file tree path with an auto-detected file name. The
+ * file name is everything after the last separator in the complete
+ * path, or the complete path itself if it does not contain any
+ * separators.
+ *
+ * @param filePath
+ * The complete file path
+ */
public FileTreePath(String filePath) {
this(filePath, null);
}
+ /**
+ * Creates a new file tree path with the given file path and file name.
+ *
+ * @param filePath
+ * The complete file path
+ * @param fileName
+ * The file name
+ */
public FileTreePath(String filePath, String fileName) {
this.filePath = filePath;
if (fileName == null) {
//
// INTERFACE Comparable
//
-
+
/**
* {@inheritDoc}
*/