From 3a66be18848ee1b12b02721ae03b94185d227d72 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Mon, 26 May 2008 23:45:16 +0200 Subject: [PATCH] add javadoc --- src/net/pterodactylus/jsite/gui/FileManager.java | 33 ++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/src/net/pterodactylus/jsite/gui/FileManager.java b/src/net/pterodactylus/jsite/gui/FileManager.java index faec4ae..a7d8c7c 100644 --- a/src/net/pterodactylus/jsite/gui/FileManager.java +++ b/src/net/pterodactylus/jsite/gui/FileManager.java @@ -259,7 +259,7 @@ public class FileManager extends JDialog implements I18nable { Node 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. */ } /** @@ -322,16 +322,45 @@ public class FileManager extends JDialog implements I18nable { } + /** + * 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 { + /** 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) { @@ -415,7 +444,7 @@ public class FileManager extends JDialog implements I18nable { // // INTERFACE Comparable // - + /** * {@inheritDoc} */ -- 2.7.4