From: David ‘Bombe’ Roden Date: Thu, 29 May 2008 11:42:35 +0000 (+0200) Subject: simplify a bit X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=d95a61c01ee3dec33294fa8c624bb12f3cb0028b;p=jSite2.git simplify a bit --- diff --git a/src/net/pterodactylus/jsite/gui/FileManager.java b/src/net/pterodactylus/jsite/gui/FileManager.java index 8be6f11..26b6e14 100644 --- a/src/net/pterodactylus/jsite/gui/FileManager.java +++ b/src/net/pterodactylus/jsite/gui/FileManager.java @@ -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 {