From: David ‘Bombe’ Roden Date: Mon, 26 May 2008 21:45:16 +0000 (+0200) Subject: add javadoc X-Git-Url: https://git.pterodactylus.net/?p=jSite2.git;a=commitdiff_plain;h=3a66be18848ee1b12b02721ae03b94185d227d72 add javadoc --- 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} */