this.project = project;
fileTreeRoot = new SortableTreeNode(project.getName());
fileTreeModel = new DefaultTreeModel(fileTreeRoot);
- fileCellRenderer = new FileCellRenderer(project);
+ fileCellRenderer = new FileCellRenderer();
initActions();
initComponents();
pack();
*/
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)) {
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 {