@Override
    public Component getListCellRendererComponent(JList<?> list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
        super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
        Path entity = (Path) value;
        String text = null;
        if (entity == null || Files.isDirectory(entity)) {
            if (entity != null) {
                Path name = entity.getFileName();
                if (name == null) {
                    text = entity.toString();
                } else {
                    text = name.toString();
                }
            }
        } else {
            text = entity.getFileName().toString();
        }
        if (entity != null) {
            label.setIcon(fileSystemView.getSystemIcon(entity.toFile()));
            label.setToolTipText(entity.toString());
        }
        label.setText(text);
        if (isSelected) {
            label.setBackground(backgroundSelectionColor);
            label.setForeground(textSelectionColor);
        } else {
            label.setBackground(backgroundNonSelectionColor);
            label.setForeground(textNonSelectionColor);
        }
        return label;
    }