void (@NotNull JList<? extends T> list, T t, int index, boolean selected, boolean hasFocus) { LayeredIcon layeredIcon = new LayeredIcon(2); layeredIcon.setIcon(EMPTY_ICON, 0); FileType value = myConverter.apply(t); Icon icon = value.getIcon(); if (icon != null) { layeredIcon.setIcon(icon, 1, (-icon.getIconWidth() + EMPTY_ICON.getIconWidth()) / 2, (EMPTY_ICON.getIconHeight() - icon.getIconHeight()) / 2); } setIcon(layeredIcon); String description = value.getDescription(); if (isDuplicated(description)) { setText(description + " (" + value.getName() + ")"); // NON-NLS (in this case, the name is acceptable) } else { setText(description); } }