simplify a bit
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 29 May 2008 11:42:35 +0000 (13:42 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 29 May 2008 11:42:35 +0000 (13:42 +0200)
src/net/pterodactylus/jsite/gui/FileManager.java

index 8be6f11..26b6e14 100644 (file)
@@ -135,7 +135,7 @@ public class FileManager extends JDialog implements I18nable, ActionListener, Tr
                this.project = project;
                fileTreeRoot = new SortableTreeNode(project.getName());
                fileTreeModel = new DefaultTreeModel(fileTreeRoot);
-               fileCellRenderer = new FileCellRenderer(project);
+               fileCellRenderer = new FileCellRenderer();
                initActions();
                initComponents();
                pack();
@@ -382,17 +382,11 @@ public class FileManager extends JDialog implements I18nable, ActionListener, Tr
         */
        private class FileCellRenderer extends DefaultTreeCellRenderer {
 
-               /** The project. */
-               private final Project project;
-
-               public FileCellRenderer(Project project) {
-                       this.project = project;
-               }
-
                /**
                 * @see javax.swing.tree.TreeCellRenderer#getTreeCellRendererComponent(javax.swing.JTree,
                 *      java.lang.Object, boolean, boolean, boolean, int, boolean)
                 */
+               @Override
                public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) {
                        Component superCellRenderer = super.getTreeCellRendererComponent(tree, value, selected, expanded, leaf, row, hasFocus);
                        if (!(superCellRenderer instanceof JLabel)) {
@@ -420,7 +414,6 @@ public class FileManager extends JDialog implements I18nable, ActionListener, Tr
                                        completePathBuilder.append(File.separatorChar).append(((SortableTreeNode) rootPathNode).getUserObject());
                                }
                                String completePath = completePathBuilder.substring(1);
-                               System.out.println("completePath: " + completePath);
                                if (project.getDefaultFile().equals(completePath)) {
                                        superCellRenderer.setFont(superCellRenderer.getFont().deriveFont(Font.BOLD));
                                } else {