@Override
    protected void paintExpandControl(Graphics g, Rectangle clipBounds, Insets insets,
                                      Rectangle bounds, TreePath path, int row, boolean isExpanded,
                                      boolean hasBeenExpanded, boolean isLeaf) {
        // if the given path is selected, then
        boolean isPathSelected = tree.getSelectionModel().isPathSelected(path);

        Icon expandIcon = isPathSelected ? fColorScheme.getSelectedExpandedIcon()
                : fColorScheme.getUnselectedExpandedIcon();
        Icon collapseIcon = isPathSelected ? fColorScheme.getSelectedCollapsedIcon()
                : fColorScheme.getUnselectedCollapsedIcon();

        Object categoryOrItem =
                ((DefaultMutableTreeNode) path.getLastPathComponent()).getUserObject();
        boolean setIcon = !(categoryOrItem instanceof SourceListCategory)
                || ((SourceListCategory) categoryOrItem).isCollapsable();

        setExpandedIcon(setIcon ? expandIcon : null);
        setCollapsedIcon(setIcon ? collapseIcon : null);

        super.paintExpandControl(g, clipBounds, insets, bounds, path, row, isExpanded, hasBeenExpanded, isLeaf);
    }